Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 2015-08-18 03:07:02 -0600

Nbb gravatar image

perspectiveTransform error

Hi forum,

Im trying to use perspectiveTransform but I keep getting error. I tried to follow the solution from this thread http://answers.opencv.org/question/18252/opencv-assertion-failed-for-perspective-transform/

_players[i].getCoordinates() is of type Point

_homography_matrix is a 3 x 3 Mat

    Mat temp_Mat = Mat::zeros(2, 1, CV_32FC2);

    for (int i = 0; i < _players.size(); i++)
    {
        cout << Mat(_players[i].get_Coordinates()) << endl;
        perspectiveTransform(Mat(_players[i].get_Coordinates()), temp_Mat, _homography_matrix);
    }

Also, how do I convert temp_Mat into type Point ?

OpenCV Error: Assertion failed (scn + 1 == m.cols) in cv::perspectiveTransform

perspectiveTransform error

Hi forum,

Im trying to use perspectiveTransform but I keep getting error. I tried to follow the solution from this thread http://answers.opencv.org/question/18252/opencv-assertion-failed-for-perspective-transform/

_players[i].getCoordinates() is of type Point

_homography_matrix is a 3 x 3 Mat

    Mat temp_Mat = Mat::zeros(2, 1, CV_32FC2);

    for (int i = 0; i < _players.size(); i++)
    {
        cout << Mat(_players[i].get_Coordinates()) << endl;
        perspectiveTransform(Mat(_players[i].get_Coordinates()), temp_Mat, _homography_matrix);
    }

Also, how do I convert temp_Mat into type Point ?

OpenCV Error: Assertion failed (scn + 1 == m.cols) in cv::perspectiveTransform

I have tried checking for the types my Mat using the link below.

stackoverflow.com/questions/10167534/how-to-find-out-what-type-of-a-mat-object-is-with-mattype-in-opencv

Still no success.

perspectiveTransform error

Hi forum,

Im trying to use perspectiveTransform but I keep getting error. I tried to follow the solution from this thread http://answers.opencv.org/question/18252/opencv-assertion-failed-for-perspective-transform/

_players[i].getCoordinates() is of type Point

_homography_matrix is a 3 x 3 Mat

    Mat temp_Mat = Mat::zeros(2, 1, CV_32FC2);

    for (int i = 0; i < _players.size(); i++)
    {
        cout << Mat(_players[i].get_Coordinates()) << endl;
        perspectiveTransform(Mat(_players[i].get_Coordinates()), temp_Mat, _homography_matrix);
    }

Also, how do I convert temp_Mat into type Point ?

OpenCV Error: Assertion failed (scn + 1 == m.cols) in cv::perspectiveTransform

I have tried checking for the types my Mat using the link below.

stackoverflow.com/questions/10167534/how-to-find-out-what-type-of-a-mat-object-is-with-mattype-in-opencv

Still no success.