improve transformation: vertical points is better than corners

This commit is contained in:
avana 2017-02-23 01:28:47 +01:00
parent bbd5210514
commit 8e30e3fe36

View file

@ -256,8 +256,9 @@ BookShape get_book_shape(cv::Mat img)
cv::Point middle2 = further_point_from_line(get_line(corn_3, corn_4), points1);
BookShape bs = BookShape(
corn_1, middle1, corn_2,
corn_4, middle2, corn_3);
vertical_points[1][vertical_points[1].size()-1], middle1, vertical_points[0][0],
vertical_points[1][0], middle2, vertical_points[0][vertical_points[0].size()-1]
);
return bs;
}