Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV's matchTemplate tutorial code not giving expected results

Hi!

I've been having troubbles with OpenCV's matchTemplate function. The probability map that I got when runnin my code didn't seem correct to me.

I decided to code a test to ensure that I would get the same behavior than opencv's binary example "cpp-tutorial-MatchTemplate_Demo" with the images given in the online tutorial (the couple in a plane).

That's when I realized that the example code doesn't give me the expected results either.. Here are some screenshots of the template matching ran with the example code and example pictures

https://ibb.co/kKT2r5

https://ibb.co/kvYrjQ

https://ibb.co/nk7vB5

https://ibb.co/mWEaB5

https://ibb.co/gc4aB5

https://ibb.co/n4ifdk

I compiled OpenCV myself, after checking out the tag 3.2.0 I don't think I changed much of the cmake settings, except for WITH_QT=ON

I am recompiling with BUILD_TESTS=ON, maybe it'll bring additional information, if there's a unit test on it. I am looking forward to your input on this issue!

I'm running Arch Linux (Linux cerberus 4.12.8-2-ARCH #1 SMP PREEMPT Fri Aug 18 14:08:02 UTC 2017 x86_64 GNU/Linux)

OpenCV's matchTemplate tutorial code not giving expected results

Hi!

I've been having troubbles with OpenCV's matchTemplate function. The probability map that I got when runnin my code didn't seem correct to me.

I decided to code a test to ensure that I would get the same behavior than opencv's binary example "cpp-tutorial-MatchTemplate_Demo" with the images given in the online tutorial (the couple in a plane).

That's when I realized that the example code doesn't give me the expected results either.. Here are some screenshots of the template matching ran with the example code and example pictures

https://ibb.co/kKT2r5

https://ibb.co/kvYrjQ

https://ibb.co/nk7vB5

https://ibb.co/mWEaB5

https://ibb.co/gc4aB5

https://ibb.co/n4ifdkimage description

image description

image description

image description

image description

image description

I compiled OpenCV myself, after checking out the tag 3.2.0 I don't think I changed much of the cmake settings, except for WITH_QT=ON

I am recompiling with BUILD_TESTS=ON, maybe it'll bring additional information, if there's a unit test on it. I am looking forward to your input on this issue!

I'm running Arch Linux (Linux cerberus 4.12.8-2-ARCH #1 SMP PREEMPT Fri Aug 18 14:08:02 UTC 2017 x86_64 GNU/Linux)

OpenCV's matchTemplate tutorial code not giving expected results

Hi!

I've been having troubbles with OpenCV's matchTemplate function. The probability map that I got when runnin my code didn't seem correct to me.

I decided to code a test to ensure that I would get the same behavior than opencv's binary example "cpp-tutorial-MatchTemplate_Demo" with the images given in the online tutorial (the couple in a plane).

That's when I realized that the example code doesn't give me the expected results either.. Here are some screenshots of the template matching ran with the example code and example pictures

image description

image description

image description

image description

image description

image descriptionimage description

image description

image description

image description

image description

image description

I compiled OpenCV myself, after checking out the tag 3.2.0 I don't think I changed much of the cmake settings, except for WITH_QT=ON

I am recompiling with BUILD_TESTS=ON, maybe it'll bring additional information, if there's a unit test on it. I am looking forward to your input on this issue!

I'm running Arch Linux (Linux cerberus 4.12.8-2-ARCH #1 SMP PREEMPT Fri Aug 18 14:08:02 UTC 2017 x86_64 GNU/Linux)