Skip to content

Fix ORB inconsistency for masks with values 255 and 1.#26366

Merged
asmorkalov merged 5 commits intoopencv:4.xfrom
shyama7004:fix-orb.cpp
Dec 9, 2025
Merged

Fix ORB inconsistency for masks with values 255 and 1.#26366
asmorkalov merged 5 commits intoopencv:4.xfrom
shyama7004:fix-orb.cpp

Conversation

@shyama7004
Copy link
Copy Markdown
Contributor

Pull Request Readiness Checklist

The PR fixes : 25974

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

@asmorkalov asmorkalov self-requested a review October 25, 2024 12:23
@asmorkalov asmorkalov added this to the 4.11.0 milestone Oct 25, 2024
@sturkmen72
Copy link
Copy Markdown
Contributor

i think these lines can be changed like

        // Compute the resized image
        if( level != firstLevel )
        {
            resize(prevImg, currImg, sz, 0, 0, INTER_LINEAR_EXACT);
            if( !mask.empty() )
            {
                resize(prevMask, currMask, sz, 0, 0, INTER_LINEAR_EXACT);
                copyMakeBorder(currMask, extMask, border, border, border, border,
                    BORDER_CONSTANT + BORDER_ISOLATED);
            }

            copyMakeBorder(currImg, extImg, border, border, border, border,
                           BORDER_REFLECT_101+BORDER_ISOLATED);
        }

@shyama7004 shyama7004 mentioned this pull request Oct 31, 2024
3 tasks
@asmorkalov asmorkalov modified the milestones: 4.11.0, 4.12.0 Dec 18, 2024
@shyama7004 shyama7004 closed this Feb 10, 2025
@shyama7004 shyama7004 deleted the fix-orb.cpp branch February 10, 2025 14:56
@shyama7004 shyama7004 restored the fix-orb.cpp branch February 10, 2025 14:58
@shyama7004 shyama7004 reopened this Feb 10, 2025
@asmorkalov asmorkalov modified the milestones: 4.12.0, 4.13.0 May 5, 2025
@asmorkalov
Copy link
Copy Markdown
Contributor

Mask threshold cannot be removed as linear interpolation breaks values on edges.

@asmorkalov asmorkalov self-assigned this Dec 9, 2025
@asmorkalov asmorkalov merged commit 2bf4f5c into opencv:4.x Dec 9, 2025
48 of 51 checks passed
@asmorkalov asmorkalov mentioned this pull request Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ORB produces different result with different values in mask pixels

3 participants