# Revision history [back]

Hi,

I am not sure if I understood your question but it seems that you are asking how two multiply several points by an homography (3x3 matrix) at the same time, right? For this, you only need to concatenate the points as column vectors in a Mat and then you can do something like that:

cv::Mat_<double> imp;
imp   = H*im_point;

for (int i = 0; i < im_point.cols; i++) {
// normalize the point
imp(0,i) = imp(0,i)/imp(2,i);
imp(1,i) = imp(1,i)/imp(2,i);
}

cv::Mat res;
res = imp(cv::Range(0,2), cv::Range::all());
return res;


Notice that the points im_point must be in homogeneous coordinates. I hope that this helps, if not, please be more specific in your question...