verticals are clearly only 2
This commit is contained in:
parent
9d629d20de
commit
af800e3870
1 changed files with 4 additions and 3 deletions
|
@ -84,12 +84,13 @@ int main(int argc, char *argv[])
|
||||||
// cv::waitKey(0);
|
// cv::waitKey(0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::vector<std::vector<cv::Point>> verticals;
|
std::vector<cv::Point> verticals[2];
|
||||||
verticals.push_back(find_longest_line(hull, (maxdistances[0]+1)%hull.size(), maxdistances[1]));
|
// Between the two corners on the same side, the longest line is the vertical border of the book
|
||||||
|
verticals[0] = find_longest_line(hull, (maxdistances[0]+1)%hull.size(), maxdistances[1]);
|
||||||
std::cout << maxdistances[1] << std::endl;
|
std::cout << maxdistances[1] << std::endl;
|
||||||
std::cout << maxdistances[1]+1 << std::endl;
|
std::cout << maxdistances[1]+1 << std::endl;
|
||||||
std::cout << (maxdistances[1]+1)%hull.size() << std::endl;
|
std::cout << (maxdistances[1]+1)%hull.size() << std::endl;
|
||||||
verticals.push_back(find_longest_line(hull, (maxdistances[1]+1)%hull.size(), maxdistances[0]));
|
verticals[1] = find_longest_line(hull, (maxdistances[1]+1)%hull.size(), maxdistances[0]);
|
||||||
free(maxdistances);
|
free(maxdistances);
|
||||||
|
|
||||||
// theta is the angle of the line connecting point 1 and 2; it will be the
|
// theta is the angle of the line connecting point 1 and 2; it will be the
|
||||||
|
|
Loading…
Reference in a new issue