Question

I have a simple program which converts Euclidean to homogeneous space by appending 1’s to the tuple of point coordinates. My original matrix is a 2x3 one and after conversion it needs to be a 3x3 one. Here is my code http://pastebin.com/HWhj7Fcd but I dont know why I have this error:

OpenCV Error: Assertion failed (npoints >= 0 && (src.depth() == CV_32F || src.depth() == CV_32S)) in convertPointsToHomogeneous

Can anybody tell what I need to change?

Était-ce utile?

La solution

this was a simple float and double error!!!actually the code that I posted is part of another code. So,in some places I used double vector and then defined the Mat matrix as float Mat matrix_l(2,3,CV_32F). I just had to put everything float and it worked.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top