View Single Post
  #4   Spotlight this post!  
Unread 15-09-2010, 00:52
Dave Scheck's Avatar
Dave Scheck Dave Scheck is online now
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 574
Dave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond repute
Re: Modifying The 2010 Image Demo

Look at DetectEllipses inside MonoImage.cpp. That should be the foundation for your DetectRectangles. Just copy/paste the entire guts of DetectEllipses into DetectRectangles. At this point, all you need to do is replace references to ellipse with rectangle. The EllipseMatch will become RectangleMatch. The vector type will change, the vector variable name should be changed to rectangles.

Along the way, I would suggest reading and understanding exactly what the function is doing. That's the only way you'll really learn. Copy/Paste never taught anybody anything.

Give that a shot and if you really can't figure it out, send me a PM and I'll clarify more.
Reply With Quote