Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OK, I have a suggestion: change to HSV, so you can threshold the H channel for orange range and then apply moments to find out the center of the orange mass. Then center of the image you have it (x=rows/2, y=cols/2) and the center of mass you have detected it. All you need to do, now, is to call the function cv::line, with the 2 points (using cv::Point, instead of CvSeq and CvPoint pointers). Hough transform is used for detecting the lines, not for drawing them.