Ask Your Question

Revision history [back]

perspectiveTransform() fails

I'm trying to retrieve the position of my matched object, I'm using this tutorial https://docs.opencv.org/3.4.1/d7/dff/tutorial_feature_homography.html

So far my code is https://gist.github.com/Menuka5/de971b86d5260b1b9080ca3a7b541446

Instead FlannBasedMatcher which is given in the tutorial I use BFMatcher with NORM_L2.

Problem is when I go to perspectiveTransform it gives an error like below.

image description

I have no idea what makes the cv::Exception? Please help