Skip to content

ximgproc: FBSFilter fails with eps over #2580

@tomoaki0705

Description

@tomoaki0705
System information (version)
  • OpenCV => recent 3.4 ( cabad90 ) + contrib ( f9c8cb8 )
  • Operating System / Platform => Ubuntu 18.04 (Aarch64) Jetson Nano
  • Compiler => GCC 7.5.0
Detailed description

Test FastBilateralSolverTest.ReferenceAccuracy fails but hard to judge with human eys

$ ./opencv_test_ximgproc --gtest_filter=FastBilateralSolverTest.ReferenceAccuracy
  :
[----------] 1 test from FastBilateralSolverTest
[ RUN      ] FastBilateralSolverTest.ReferenceAccuracy
#iterations:     25
estimated error: 0.00147801
#iterations:     25
estimated error: 0.000920876
#iterations:     25
estimated error: 0.0010467
/opencv_contrib/modules/ximgproc/test/test_fbs_filter.cpp:107: Failure
Expected: (cvtest::norm(res, ref, NORM_INF)) <= (1), actual: 41 vs 1
[  FAILED  ] FastBilateralSolverTest.ReferenceAccuracy (242 ms)
[----------] 1 test from FastBilateralSolverTest
  :
[  FAILED  ] 1 test, listed below:
[  FAILED  ] FastBilateralSolverTest.ReferenceAccuracy
  • result image
    result
  • reference (from opencv_extra)
    reference
  • diff of above 2 files
    diff

The test code is expecting bit-exact, but on platforms other than x86_64, I think bit-exact doesn't happen.
Loosening threshold is not really realistic, since diff 41 is bit too large (but this rarely happens)

I added a new comparison method in ts module, and modified to use that test when NOT on x86_64

I'll send a PR later

Steps to reproduce
Issue submission checklist
  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues,
    answers.opencv.org, Stack Overflow, etc and have not found solution
  • I updated to 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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions