Scale and Rotation Pattern Compatibility in opencv

I want to use a template image to find a target in another image. But the target has a zoom and rotation, as well as a target-target with noise that matches the color of the target. Like fig. enter image description here I want to get the target using an ellipse, not a rectangle. Like pic2.

How can i do this. I am trying to use the matchtemplate function, but the result is not good. Also I tried to use matchShapes () to do this, but the function needs to enter two outlines for comparison. target is mixed with noise, the coutour from the target image is not the coutour that I need. I have no idea. Can you help me and give me advice? Thanks in advance!

enter image description here

+3


source to share


2 answers


You can try Generic Hough Transform (GHT) to find outlines using a pattern. As I remember, in opencv (gpu) the implementation was ready to use (opencv / samples / gpu / generalized_hough.cpp on my machine)



Here's a helpful source link as well: http://www.itriacasa.it/generalized-hough-transform/instructions.html

+1


source


You need to calculate scale and rotational functions. There are several function descriptors that assert these properties. Scale invariance is often emulated by matching many different target scales. Another way might be to normalize the scale and rotation of the target first.



Take a look here: https://dsp.stackexchange.com/questions/4893/scale-and-rotation-invariant-feature-descriptors

0


source







All Articles