Skip to content

ARMv7 With NEON, "Imgproc_Hist_Compare" is failed. #24757

@Kumataro

Description

@Kumataro

System Information

OpenCV version: 4.x
Operating System / Platform: Ubuntu 23.04 armv7
Compiler & compiler version: gcc version 12.3.0 (Ubuntu 12.3.0-1ubuntu1~23.04)
Device: Raspberry Pi 4B (8GB)

Detailed description

With ENABLE_NEON, Imgproc_Hist_Compare test is failed.

kmtr@ubuntu:~/work2/opencv$ git log -n 1
commit 953dddd26b5cdc32fc9c2fc21fdedef1fa6fb04d (HEAD -> 4.x, origin/HEAD, origin/4.x)
Merge: f399bdfa1a 53cd921ab4
Author: Alexander Smorkalov <2536374+asmorkalov@users.noreply.github.com>
Date:   Fri Dec 22 17:04:46 2023 +0300

    Merge pull request #24747 from asmorkalov:as/tune_vitb_cuda

    Increate Vit_b test threshold a bit for CUDA FP16.

Without ENABLE_NEON=ON => Passed

kmtr@ubuntu:~/work2/build4-main$ uname -a && ./bin/opencv_version --v | head -5 && ./bin/opencv_test_imgproc --gtest_filter="Imgproc_Hist_Compare*"
Linux ubuntu 6.2.0-1013-raspi #15-Ubuntu SMP PREEMPT Fri Sep  8 17:00:11 UTC 2023 armv7l armv7l armv7l GNU/Linux

General configuration for OpenCV 4.8.0-dev =====================================
  Version control:               4.8.0-570-g953dddd26b

  Platform:
CTEST_FULL_OUTPUT
OpenCV version: 4.8.0-dev
OpenCV VCS version: 4.8.0-570-g953dddd26b
Build type: Release
Compiler: /usr/bin/c++  (ver 12.3.0)
Parallel framework: pthreads (nthreads=4)
CPU features: N/A
OpenCL is disabled
TEST: Skip tests with tags: 'mem_2gb', 'verylong'
Note: Google Test filter = Imgproc_Hist_Compare*
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from Imgproc_Hist_Compare
[ RUN      ] Imgproc_Hist_Compare.accuracy
[       OK ] Imgproc_Hist_Compare.accuracy (291 ms)
[----------] 1 test from Imgproc_Hist_Compare (291 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (292 ms total)
[  PASSED  ] 1 test.

With ENABLE_NEON=ON => Failed

kmtr@ubuntu:~/work2/build4-main$ uname -a && ./bin/opencv_version --v | head -5 && ./bin/opencv_test_imgproc --gtest_filter="Imgproc_Hist_Compare*"
Linux ubuntu 6.2.0-1013-raspi #15-Ubuntu SMP PREEMPT Fri Sep  8 17:00:11 UTC 2023 armv7l armv7l armv7l GNU/Linux

General configuration for OpenCV 4.8.0-dev =====================================
  Version control:               4.8.0-570-g953dddd26b

  Platform:
CTEST_FULL_OUTPUT
OpenCV version: 4.8.0-dev
OpenCV VCS version: 4.8.0-570-g953dddd26b
Build type: Release
Compiler: /usr/bin/c++  (ver 12.3.0)
Parallel framework: pthreads (nthreads=4)
CPU features: NEON
OpenCL is disabled
TEST: Skip tests with tags: 'mem_2gb', 'verylong'
Note: Google Test filter = Imgproc_Hist_Compare*
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from Imgproc_Hist_Compare
[ RUN      ] Imgproc_Hist_Compare.accuracy
/home/kmtr/work2/opencv/modules/ts/src/ts.cpp:618: Failure
Failed

        failure reason: Bad accuracy
        test case #70
        seed: 00000000000c5aa2
-----------------------------------
        LOG:
The comparison result using the method #2 (Intersection)
        is inaccurate (=2.10718e+07, should be =2.10718e+07)
test_case_idx = 70

-----------------------------------
        CONSOLE: ..........................................
-----------------------------------

[  FAILED  ] Imgproc_Hist_Compare.accuracy (238 ms)
[----------] 1 test from Imgproc_Hist_Compare (239 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (239 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] Imgproc_Hist_Compare.accuracy

 1 FAILED TEST

Originally posted by @Kumataro in #24271 (comment)

Steps to reproduce

cmake -S opencv -B build4-main -DENABLE_NEON=on -GNinja`
cmake --build build4-main
cd build4-main
./bin/opencv_test_imgproc --gtest_filter="Imgproc_Hist_Compare*"

Issue submission checklist

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugplatform: armARM boards related issues: RPi, NVIDIA TK/TX, etc

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions