Open Nadafy opened 6 months ago
Hi, was just about to create the a duplicate when I found your report. I have similar code also based on OpenCvSharp4 and the latest nuget available and observed the same. In my result I have a lot of matches on a diagonal line, my guess is that something is wrong when passing the value to the underlying opencv library. To confirm that it wasn't some issue with the input images and the configuration of the parameter valuem I rewrote the code in python3 and it worked.
I am experiencing an inconsistency in the results of the MatchTemplate method between OpenCVSharp and EmguCV. When using the same template image and search image, the EmguCV version of the code consistently finds a best match with a similarity score of approximately 0.99, while the OpenCVSharp version of same code does not find any matches at all. Also if you save the match result as an image for debugging, it looks completely irrelevant!
Steps to reproduce:
I am on windows, Visual Studio 2022, OpenCvSharp4.Windows 4.8.0.20230708 from NuGet
Sample Code: