I am new in image processing and c++ programming. this is what i have done until now to be able to keep the coordinate of some certain points in a sequence of frame:
I could find the center of a circle in the frame1.
cv::HoughCircles( tmp2, circles, CV_HOUGH_GRADIENT, 1, 300, 300, 100);
for( size_t i = 0; i < circles.size(); i++ ){
Point center(cvRound(circles[i][0]), cvRound(circles[i][1]));
cout << "center" << center.x << ", " << center.y << endl;
Vector.push_back(std::make_pair(center.x,center.y)); //coordinates of center points
int radius = cvRound(circles[i][2]);
// circle center
circle( tmp2, center, 3, 1 , -1, 8, 0 );
// circle outline
circle( tmp2, center, radius, 1 , 3, 8, 0 );
}
}
- what is this center point contains? does it contain pixel value in that point?
- if I have for example, 3 circle in frame1...is that a good way to copy(make_pair) them in a vector?
- how to track these center points in the frame2 to find their new coordinates?
thanks in advance..