Skip to content

Commit 1ad3ad5

Browse files
Merge pull request #3646 from Dhanwanth1803:latch
Fixes #25081:Latch input corruption fix #3646 Fixes opencv/opencv#25081 As mentioned by WennPaper making it `grayImage = image.clone();` will make a deep copy. It prevents the `InputArray` from being modified. - [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 - [ ] 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 --- Co-authored-by: Dhanwanth1803 <dhanwanthvarala@gmail,com> Co-authored-by: Dmitry Kurtaev <[email protected]>
1 parent bbce2ef commit 1ad3ad5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: modules/xfeatures2d/src/latch.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ namespace cv
519519
switch (image.type())
520520
{
521521
case CV_8UC1:
522-
grayImage = image;
522+
grayImage = sigma_ ? image.clone() : image;
523523
break;
524524
case CV_8UC3:
525525
cvtColor(image, grayImage, COLOR_BGR2GRAY);

0 commit comments

Comments
 (0)