Pixel coordinates opencv, c++
I need to know how to extract all pixels locations for the frame and put them in a matrix in order to make some operations on them. 2D frames, so it will be (x,y) coordinates.
I Have obtained a rotation matrix and translation matrices of features between 2 frames in captured vid开发者_StackOverflow社区eo, now I wanna use these matrices to multiply it by the image in order to correct the video frames
I prefer to use opencv functions.
If I understand correctly, you want to apply the transformation to the whole image to create a warped image. There is no need to do this on a pixel list.
You should use cvWarpAffine() with your matrix to get the warped image.
Efficient direct pixel access in openCV http://opencv.willowgarage.com/wiki/faq#Howtoaccessimagepixels
精彩评论