Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

why composeRT function is showing error for column vectors?

$
0
0
So I'm basically try to get the combination of two rotation and translation transformations. Mat rvec1(1,3,CV_32F); rvec1.at(0,0) = 2.3; rvec1.at(0,1) = 4.5; rvec1.at(0,2) = 7.8; Mat rvec2(1,3,CV_32F); rvec2.at(0,0) = 2.1; rvec2.at(0,1) = 4; rvec2.at(0,2) = 1.2; Mat tvec1(1,3,CV_32F); tvec1.at(0,0) = 4; tvec1.at(0,1) = 2; tvec1.at(0,2) = 3; Mat tvec2(1,3,CV_32F); tvec2.at(0,0) = 2; tvec2.at(0,1) = 3; tvec2.at(0,2) = 13; Mat rvec3,tvec3; //-> Calling composeRT function composeRT(rvec1, tvec1, rvec2, tvec2, rvec3, tvec3); But i'm getting this error- OpenCV Error: Assertion failed (_rvec1->rows == 3 && _rvec1->cols == 1 && CV_ARE_SIZES_EQ(_rvec1, _rvec2)) in cvComposeRT, file /home/kevmepls/opencv-2.4.9/modules/calib3d/src/calibration.cpp, line 407 terminate called after throwing an instance of 'cv::Exception' what(): /home/kevmepls/opencv-2.4.9/modules/calib3d/src/calibration.cpp:407: error: (-215) _rvec1->rows == 3 && _rvec1->cols == 1 && CV_ARE_SIZES_EQ(_rvec1, _rvec2) in function cvComposeRT Aborted (core dumped) If i make the inputs as row vectors, then no errors arises. So why is error coming when inputs are column vectors?

Viewing all articles
Browse latest Browse all 19555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>