开发者

How do I convert a 3 by 3 single channel Mat to a 1 by 3 triple channel array in OpenCV?

I have a 3 by 3 rotation matrix, created with the header cvCreateMat(3, 3, CV_32FC1). This is the matrix I get from calling cvRodrigues2. I want to rotate several points stored in an array of length N with 3 channels. To do this rotation I call cvMul(rotation, points), but this requires that the rotation matrix be an array. I therfore need to convert it开发者_StackOverflow社区 to a cvCreateMat(3, 1, CV_32FC3). Is there any way to do this in openCV (in C, if it makes any difference).


Using cvReshape (link to documentation). The second example is very alike to what you want (you just have to adapt the number of rows and channels).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜