improve transformation: vertical points is better than corners
This commit is contained in:
parent
bbd5210514
commit
8e30e3fe36
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue