Thread: C++ Vision
View Single Post
  #6   Spotlight this post!  
Unread 14-03-2013, 00:58
faust1706's Avatar
faust1706 faust1706 is offline
Registered User
FRC #1706 (Ratchet Rockers)
Team Role: College Student
 
Join Date: Apr 2012
Rookie Year: 2011
Location: St Louis
Posts: 498
faust1706 is infamous around these partsfaust1706 is infamous around these parts
Re: C++ Vision

If you notice how poorly it draws the polygons, I dont rely on the corners it gives me. I adjusted aishack's program(http://www.aishack.in/2011/06/image-moments/) to tracking a coloured ball and applied the moment to the contour, and not the whole image. That gives me subpixel accuracy for the centers of the targets that doesnt budge when everything is still. Last year to find the center of the target, I averaged the corners of ApproxPoly. To fix Approxpoly's poor quality, I used contour-tree temporarily filled in the contour all white (im dealing with a binary image),then applied approxpoly, but around each corner it gave me, i applied a region of interest and then used cvcornerharris. Then I took those new corners, ordered them top to bottom, left to right, and drew the polygon around them. Of course I knew it was a square, but I could adjust the code to do it for any size polygon. We'll be at stl and terra houte if you by chance happen be going too.
__________________
"You're a gentleman," they used to say to him. "You shouldn't have gone murdering people with a hatchet; that's no occupation for a gentleman."

Last edited by faust1706 : 14-03-2013 at 02:55.
Reply With Quote