Skip to content

imgproc: disable SIMD for compareHist(INTERSECT) if f64 is unsupported#27220

Merged
asmorkalov merged 3 commits intoopencv:4.xfrom
Kumataro:fix24757
Apr 10, 2025
Merged

imgproc: disable SIMD for compareHist(INTERSECT) if f64 is unsupported#27220
asmorkalov merged 3 commits intoopencv:4.xfrom
Kumataro:fix24757

Conversation

@Kumataro
Copy link
Copy Markdown
Contributor

Close #24757

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@Kumataro
Copy link
Copy Markdown
Contributor Author

This patch only works for architecture that only support float32 SIMD, like ARMv7 Neon.

@Kumataro
Copy link
Copy Markdown
Contributor Author

Similar to the fix below, I disabled the code block instead of deleting it.

#elif CV_SIMD && 0 //Disable vectorization for CV_COMP_CORREL if f64 is unsupported due to low precision

#elif CV_SIMD && 0 //Disable vectorization for CV_COMP_BHATTACHARYYA if f64 is unsupported due to low precision

@asmorkalov asmorkalov added bug platform: arm ARM boards related issues: RPi, NVIDIA TK/TX, etc labels Apr 10, 2025
@asmorkalov asmorkalov added this to the 4.12.0 milestone Apr 10, 2025
@asmorkalov asmorkalov self-requested a review April 10, 2025 12:03
@asmorkalov asmorkalov self-assigned this Apr 10, 2025
@Kumataro
Copy link
Copy Markdown
Contributor Author

I'm sorry I fixed test code to use EXPECT_DOUBLE_EQ() instead of EXPECT_FLOAT_EQ().
compareHist() returns double.

Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Tested manually with Jetson-tk1 (ARMv7+NEON).

@Kumataro
Copy link
Copy Markdown
Contributor Author

Thank you very much for manual test !

@asmorkalov asmorkalov merged commit c1d71d5 into opencv:4.x Apr 10, 2025
28 checks passed
@asmorkalov asmorkalov mentioned this pull request Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug platform: arm ARM boards related issues: RPi, NVIDIA TK/TX, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ARMv7 With NEON, "Imgproc_Hist_Compare" is failed.

2 participants