Ask Your Question
3

Is there a rotatational template-matching function?

asked 2014-01-09 18:54:09 -0500

xaffeine gravatar image

I am familiar with matchTemplate(), which iteratively searches for an image within another image, incrementing it in x and/or y with every step.

Is there a "rotational" version of matchTemplate, which would try several rotations of the template instead of shifting it in x/y?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2014-01-12 02:26:20 -0500

Melgor gravatar image

As I know, there is no function, that calculate the invariant version of matchTemplate. There is some article, which introduce it, but you will have implement it. Link:Link to article

But, in OpenCv there is function, which compare histogram of objects and pattern. It is CalcBackProjPath. Histogram are invariant to rotation, so you can call it once. But it can be much slower, because it use normal Sliding Window. MatchTemplate in OpenCv use Fourier Transform, what really speed up finding interesting point.

edit flag offensive delete link more

Comments

I need to know the best-matching rotation.

xaffeine gravatar imagexaffeine ( 2014-01-13 13:43:35 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-01-09 18:54:09 -0500

Seen: 1,315 times

Last updated: Jan 12 '14