After a whole night… fiuh… This is what I call “beautiful”.
cvFindContours and cvApproxPoly functions play the big role here. To remove the unexpected contours appear, filter it using how big the area the contours should have. To draw the nice red lines that adapt to sequence running (this is webcam), use cvPolyLine and cvCvtSeqToArray regarding to 4 points that is modeled by CvPoint. The green and blue circles are drawn using cvCircle.
Now time to stay away from the computer.
Advertisement

Itu gambarnya emang blur, ato koneksi ane yang lemot yak –”
Posted by Miftahgeek | 24 November 2010, 09:57