Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting Normalized Vertex to Vertex in Google Cloud Vision

Any idea how can I convert Normalized Vertex to Vertex? Normalized Vertex gives me relative position on an image whereas the Vertex returns coordinates based on the scale of the image. I have a set of Normalized Vertex that I would like to convert it to regular Vertex.

https://cloud.google.com/vision/docs/reference/rest/v1p2beta1/images/annotate#normalizedvertex

like image 395
Arvind Kandaswamy Avatar asked Oct 24 '25 00:10

Arvind Kandaswamy


1 Answers

If you know the size of your image (it's width and height), you can simply multiply it with your NorrmalizedVertex. You should multiply the x field of your NormalizedVertex with the width of the picture to get the x field of the Vertex and multiply the y field of your NormalizedVertex with the height of the image to get the y of the Vertex.

like image 199
rilla Avatar answered Oct 26 '25 22:10

rilla