How to remove too close correlation peaks
3 views (last 30 days)
Show older comments
I am working with normxcorr2, in particular I am working with the recognition of meshes within a network.
In my case I am interested in cutting out every single mesh inside the network (I draw a cropping rectangle around the correlation peak, and the size of the cropping rectangle is equal to the size of the recognition pattern inserted) to then add up all the images that I cut out and average, in order to find an average shirt. To do this I run normxcorr2 by inserting a pattern to be recognized, and inserting a threshold value for the correlation at 0.2, in this way I manage to obtain the selection of all meshes in the image.
The problem is that since the correlation threshold value is so low (0.2), I get many unwanted peaks, that is, in addition to finding the peaks in the center of the true links, there are also peaks in non-central areas, which are unwanted.
To mitigate the problem I am memorizing all the cooridnate of the peaks, and then I make the distance between the stored points through pdist2.
I also tried to eliminate the points that are less than half the size of the pattern inserted for recognition, but unfortunately I always have some false positives.
Basically what I would need is to eliminate the correlation peaks too close, for example to avoid cropped images that contains only half mesh, or directly avoid that matlab goes to find two peaks too close via normxcorr2 (the minimum distance that I am considering is half the size of the pattern).
Last time ImageAnalyst had helped me on the same network, with a similar problem, I hope if he reads he has any suggestions for me.
Thanks you all in advance.
0 Comments
Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!