Skip to content

cv2.xfeatures2d.LATCH bug #25081

@WennPaper

Description

@WennPaper

System Information

OpenCV python version: 4.9.0

Detailed description

The function when used for image feature descriptor calculation, which should only compute image feature descriptor and output updated keypoints and corresponding descriptor, erroneously changes input image array values.

Steps to reproduce

import cv2

im = cv2.imread('im.jpg', 0)
detector = cv2.xfeatures2d.TBMR_create()
descriptor = cv2.xfeatures2d.LATCH_create()
keypoints_detector = detector.detect(im, None)

print(im)
keypoints_descriptor, descriptors = descriptor.compute(im, keypoints_detector)
print(im)

The two printed im should be identical, but they are not.

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions