Parker Schuh | 6691f19 | 2017-01-14 17:01:02 -0800 | [diff] [blame] | 1 | #ifndef _AOS_VISION_BLOB_HIERARCHICAL_CONTOUR_MERGE_H_ |
| 2 | #define _AOS_VISION_BLOB_HIERARCHICAL_CONTOUR_MERGE_H_ |
| 3 | |
| 4 | #include <vector> |
| 5 | |
| 6 | #include "aos/vision/blob/contour.h" |
| 7 | #include "aos/vision/blob/range_image.h" |
| 8 | |
Stephan Pleines | d99b1ee | 2024-02-02 20:56:44 -0800 | [diff] [blame] | 9 | namespace aos::vision { |
Parker Schuh | 6691f19 | 2017-01-14 17:01:02 -0800 | [diff] [blame] | 10 | |
| 11 | struct FittedLine { |
| 12 | Point st; |
| 13 | Point ed; |
| 14 | }; |
| 15 | |
| 16 | // Merges a contour into a list of best fit lines where the regression value is |
| 17 | // merge_rate and only emit lines at least min_len pixels long. |
| 18 | void HierarchicalMerge(ContourNode *stval, std::vector<FittedLine> *fit_lines, |
| 19 | float merge_rate = 4.0, int min_len = 15); |
| 20 | |
Stephan Pleines | d99b1ee | 2024-02-02 20:56:44 -0800 | [diff] [blame] | 21 | } // namespace aos::vision |
Parker Schuh | 6691f19 | 2017-01-14 17:01:02 -0800 | [diff] [blame] | 22 | |
| 23 | #endif // _AOS_VISION_BLOB_HIERARCHICAL_CONTOUR_MERGE_H_ |