|
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.
|