How do you get coordinates that you can use directly

sakai 106 Reputation points
2022-09-30T00:29:55.52+00:00

I'm working on a computer vision project and the coordinates I get are not directly usable. How do you convert them?

Computer Vision
Computer Vision
An Azure artificial intelligence service that analyzes content in images and video.
417 questions
0 comments No comments
{count} vote

Accepted answer
  1. YutongTie-MSFT 53,971 Reputation points Moderator
    2022-09-30T02:42:32.8+00:00

    Hello @sakai

    Thanks for using Microsoft Q&A platform, I think you are mentioning Form Recognizer OCR API and you have questions about the value of boundingBoxes, below I will give an example to explain it so that you can convert it to the coordinate you want to use:

    Example:

       'boundingBox': [  
                    57.1,  
                    683.3,  
                    100.2,  
                    683.3,  
                    100.2,  
                    673.3,  
                    57.1,  
                    673.3  
                  ]  
    

    Those values represent the vertices of the bounding box as below:

      (57.1,683.3) X1,Y1---->x2,y2(100.2,683.3)  
                      |                |  
                      |                |  
      (57.1,673.3) X4,Y4<----x3,y3(100.2,673.3)  
    

    The (0,0) is on the bottom left as you can see.

    // Azure Bounding box is like this                       
    //                                                     0---->1  
    //                                                    |     |  
    //                                         Y          |     |  
    //                                         ↑         3<----2  
    //                                  Origin . → X  
    

    If you want to measure the boundingBoxes, you can use above vertices to do the calculation.

    Hope this helps!

    Regards,
    Yutong

    -Please kindly accept the answer if you feel helpful, thanks!

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.