verticals are clearly only 2

This commit is contained in:
boyska 2017-01-13 13:47:51 +01:00
parent 9d629d20de
commit af800e3870

View file

@ -84,12 +84,13 @@ int main(int argc, char *argv[])
// cv::waitKey(0);
#endif
std::vector<std::vector<cv::Point>> verticals;
verticals.push_back(find_longest_line(hull, (maxdistances[0]+1)%hull.size(), maxdistances[1]));
std::vector<cv::Point> verticals[2];
// 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]+1 << 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);
// theta is the angle of the line connecting point 1 and 2; it will be the