To convert a matix to vector in opencv
I have written a code for creating a matrix which describes the features
in a video.I use ROI for cropping the feature in images and saved it in a
matrix.The whole program is inside a for loop.Now how to plot these matrix
using imshow..
Mat patch;
for(unsigned int i=0;i<boundRect.size();i++)
{
Point centre=Point(boundRect[i].x+(boundRect[i].width)/2,boundRect[i].y+
(boundRect[i].height)/2);
circle(output,centre,5,CV_RGB(0,255,0),-1);
cv::Rect myROI(centre.x-40,centre.y+40,centre.x+40,centre.y-40);
patch=output(myROI);
}
No comments:
Post a Comment