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?

Was it helpful?

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top