MichaelFYang/far_planner

Contour extraction

qiran1122 opened this issue · 1 comments

Hello, thank you very much for this wonderful project, I am new to this project and would like to ask you a few questions.
What does the TopoFilterContours function in contour_detector.cpp in Far Planner do (I understand that it is removing sub-contours, but if it is sub-contours, then why not set the contour retrieval mode to RETR_EXTERNAL directly in Extract Contours cv::findContours?). );
Or is it the PointInsideAPoly function in utility.h, I understand that this should be to determine whether the robot is within the contour, why in the function TopoFilterContours there is a judgment of the function PointInsideAPoly.
I look forward to hearing from you. Thank!!!

We're removing contours that are inside obstacles (sub-contours). The PointInsideAPoly function determines whether the contours are obstacles inside or outside. In short, the contours and the robot's position together determine the topological relationships.