Ask Your Question

ag's profile - activity

2013-01-22 01:35:31 -0600 commented question solvePNP() - Assertion failed

I faced with 'assertion failed' problem in another place of this function (OpenCV 2.4.3) According to the documentation objectPoints have to be 3xN/Nx3 1-channel or 1xN/Nx1 3-channel (the same for imagePoints). In my case it works only for default method flag=CV_ITERATIVE. In case of CV_P3P or CV_EPNP 3-channel arrays must be. Otherwise Assertion failed (CV_IS_MAT(_src) && CV_IS_MAT(_dst) && (_src->rows == 1 || _src->cols == 1) && (_dst->rows == 1 || _dst->cols == 1) && _src->cols + _src->rows - 1 == _dst->rows + _dst->cols - 1 && (CV_MAT_TYPE(_src->type) == CV_32FC2 || CV_MAT_TYPE(_src->type) == CV_64FC2) ... in cvUndistortPoints, file OpenCV-2.4.3/modules/imgproc/src/undistort.cpp, line 279