How can I draw a mark over the video?
I have made the following code , and when the user click the left side of mouse he should put a marker in the position, and when the second click as made , the first one should be erased , the same thing should happen with coordinates, someone can help me. I don't understand the draw marker function...
void onMouse(int event, int x, int y, int flags, void *param){
if(event == CV_EVENT_LBUTTONDOWN){
/**/
if(cntr == 0){
// cv::drawMarker(param, cv::Point(x, y), cv::Scalar(0, 0, 255), MARKER_CROSS, 10, 1);
waitKey(5);
cout << "POSITION:\n"<<y<<" "<<endl;
//destroy=true;
}else{
// cv::drawMarker(param, cv::Point(x, y), cv::Scalar(0, 0, 255), MARKER_CROSS, 10, 1);
cout <<y<<endl;
}
cntr = cntr + 1;
}
}
read docs, please