Commit Graph

11 Commits

Author SHA1 Message Date
Mohammad Sohail Shaikh
9713041d8f Merge pull request #30831 from sohailshk:fix/brisk-non-continuous
features2d: fix BRISK on sub-matrix images - #30831

`BRISK_Impl::smoothedIntensity()` indexes the image with its width as the row stride in the direct-pixel paths. For an image that is a region of a larger one (`img(roi)`) the row step differs from the width, so those samples were read from the wrong rows. `detect()`/`compute()` on such an image returned wrong keypoint angles (the orientation uses these samples) and wrong descriptor bytes (maximum byte difference 255), and both depended on the pixels around the region. The function now uses `image.step`; the integral image is a fresh continuous matrix and is unchanged. Proposed to 4.x because BRISK is no longer in the main repository on 5.x (it moved to opencv_contrib).

`Features2d_BRISK.descriptors_of_sub_matrix` computes keypoints, angles and descriptors on a continuous image and on a region of a larger image with unrelated pixels around it and requires identical output. On 4.x it fails (1 descriptor mismatch, 68 angle mismatches) and passes with the change. Continuous images are unchanged. Checks run on macOS arm64 (Release); the BRISK tests that read opencv_extra images were not run. The open PR #28194 also edits `brisk.cpp` (keypoint orientation in `compute()`) at different lines.

Thank you for taking a look.

### Pull Request Readiness Checklist

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

- [x] I agree to contribute to the project under Apache 2 License.
- [x] 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
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2026-11-17 16:56:10 +03:00
Primary-H
a7bb1d1e1e features2d: improve detector parameter validation 2026-05-31 23:40:50 +08:00
okriof
ef42baf9f0 Merge pull request #13361 from okriof:brisk_getset
* Get/Set functions for BRISK parameters, issue #11527.

Allows setting threshold and octaves parameters after creating a brisk object. These parameters do not affect the initial pattern initialization and can be changed later without re-initialization.

* Fix doc parameter name.

* Brisk get/set functions tests. Check for correct value and make tests independent of default parameter values.

* Add dummy implementations for BRISK get/set functions not to break API in case someone has overloaded the Feature2d::BRISK interface. This makes BRISK different from the other detectors/descriptors on the other hand, where get/set functions are pure virtual in the interface.
2018-12-05 18:44:23 +03:00
Alexander Alekhin
4a297a2443 ts: refactor OpenCV tests
- removed tr1 usage (dropped in C++17)
- moved includes of vector/map/iostream/limits into ts.hpp
- require opencv_test + anonymous namespace (added compile check)
- fixed norm() usage (must be from cvtest::norm for checks) and other conflict functions
- added missing license headers
2018-02-03 19:39:47 +00:00
Vadim Pisarevsky
162384a838 fixed several test failures; currently 9 out of 73 tests fail 2014-10-17 14:56:58 +04:00
Roman Donchenko
2c4bbb313c Merge commit '43aec5ad' into merge-2.4
Conflicts:
	cmake/OpenCVConfig.cmake
	cmake/OpenCVLegacyOptions.cmake
	modules/contrib/src/retina.cpp
	modules/gpu/doc/camera_calibration_and_3d_reconstruction.rst
	modules/gpu/doc/video.rst
	modules/gpu/src/speckle_filtering.cpp
	modules/python/src2/cv2.cv.hpp
	modules/python/test/test2.py
	samples/python/watershed.py
2013-08-27 13:26:44 +04:00
Roman Donchenko
e9a28f66ee Normalized file endings. 2013-08-21 18:59:25 +04:00
Andrey Kamaev
c98c246fc2 Move border type constants and Moments class to core module 2013-04-10 19:14:24 +04:00
Andrey Kamaev
2a6fb2867e Remove all using directives for STL namespace and members
Made all STL usages explicit to be able automatically find all usages of
particular class or function.
2013-02-25 15:04:17 +04:00
Vadim Pisarevsky
06a13d9ba0 replaced jpegs with png's. Accuracy tests pass; performance tests were not tried yet 2012-10-02 23:07:46 +04:00
Vincent Rabaud
13ded36ecb initial addition of BRISK with some tests 2012-08-30 16:28:39 +04:00