opencv function "convertPointsFromHomogeneous" gives error message "Either the number of channels or columns or rows must be =1"

asked 2014-11-26 07:24:51 -0600

I'm trying to use method convertPointsFromHomogeneous as follows:

Mat coord(1, 3, CV_32F, 3),
    homo;
cout<<coord<<endl;
cv::convertPointsFromHomogeneous(coord, homo);

while I get the error message:

OpenCV Error: Incorrect size of input array (Either the number of channels or columns or rows must be =1) in cvConvertPointsHomogeneous, file ......\modules\c alib3d\src\fundam.cpp, line 865

the var coord has only one row, so where exactly is the error occurred?

edit retag flag offensive close merge delete