blob: 9dd471dc93da5174b71bf4f0d526f925a47c56cb [file] [log] [blame]
Parker Schuh6691f192017-01-14 17:01:02 -08001#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
9namespace aos {
10namespace vision {
11
12struct FittedLine {
13 Point st;
14 Point ed;
15};
16
17// Merges a contour into a list of best fit lines where the regression value is
18// merge_rate and only emit lines at least min_len pixels long.
19void HierarchicalMerge(ContourNode *stval, std::vector<FittedLine> *fit_lines,
20 float merge_rate = 4.0, int min_len = 15);
21
22} // namespace vision
23} // namespace aos
24
25#endif // _AOS_VISION_BLOB_HIERARCHICAL_CONTOUR_MERGE_H_