uscauv-legacy / old-uscauv-ros-pkg

ROS software used on robots made by the USC AUV Team.
4 stars 6 forks source link

Shape Matcher Should Draw Matched Templates #27

Closed canondetortugas closed 11 years ago

canondetortugas commented 11 years ago

I already implemented this, but it is commented out because the drawn templates are mangled. I'm not sure where this is happening. If it's early enough in the chain, it could be affecting recognition, so it should be fixed asap.

canondetortugas commented 11 years ago

This is related to rotation. It seems like there are a few points on the contour that aren't being rotated, so just how messed up the contour is is a function of angle. This happens to the templates we load from file and to the shapes from the color classifier stream.

image

canondetortugas commented 11 years ago

Shape matcher is definitely failing to match valid shapes when they are rotated close to 90 degrees

canondetortugas commented 11 years ago

Confirmed by feeding in a static image consisting of the pipe template rotated 90 degrees. Failed to match. Going to draw the transformed contour and see if it is being mangled.

canondetortugas commented 11 years ago

Answer to the above question is yes. This indicates that the error is in the analyzeContours(...) function

canondetortugas commented 11 years ago

All points in the upper-left quadrant of the original contour have zero x value after conversion to polar