I have consumed the google cloud vision api to recognize a document with a table, but sometimes the image will be a little rotated, im triyng to get the value using the boundingPoly
of the key i want, but how do i get it if it's not on the same 'y'
.
I was thinking of making a 'line' above and below the boundingBox
and finding if the point is between that, but i dont know how to do it.
[18] => Array
(
[description] => Date
[boundingPoly] => Array
(
[vertices] => Array
(
[0] => Array
(
[x] => 698
[y] => 289
)
[1] => Array
(
[x] => 729
[y] => 289
)
[2] => Array
(
[x] => 729
[y] => 301
)
[3] => Array
(
[x] => 698
[y] => 301
)
)
)
)
[66] => Array
(
[description] => 25/03/2019
[boundingPoly] => Array
(
[vertices] => Array
(
[0] => Array
(
[x] => 1007
[y] => 290
)
[1] => Array
(
[x] => 1131
[y] => 290
)
[2] => Array
(
[x] => 1131
[y] => 307
)
[3] => Array
(
[x] => 1007
[y] => 307
)
)
)
)