Vuforia Virtual button (virtual buttons) case one--button position calculation __ar

Source: Internet
Author: User

This blog by the Sea to a squealing original, welcome reprint, Reprint please indicate the source of the blog, thank you.


In the AR Technology Network group to see a lot of people ask the virtual button in the instance of the button coordinates are how to calculate, today we will talk about the principle of computing.

Question: How is the virtual button's position coordinates determined.


See above, the origin is in the upper-left corner, the vertical direction is the y axis, the horizontal direction is the x-axis, and the (1500,1050) pixel. The size of the button is (200,75).

The original pixel coordinates in the following table are the coordinate values of the upper-left and lower-right corners of the button's rectangular box respectively.

The right column is the coordinate value of the picture label after the size conversion. So what kind of transformation does it have?


The following illustration shows the 3D coordinate system in the SDK. The data on the right side of the table is the value that the original coordinate system translates into a coordinate system. You can see that the origin of the 3D coordinate system is in the center of the image, so it is not difficult to explain the negative values in the table above.

Here is a list of the corresponding calculation formulas.

Calculation is relatively simple, with a similar ratio on it, but we pay attention to the conversion unit.


Using similar relationships:

90/750 = (123.5-x)/123.5

Use this formula to figure out that X is 108.68.

Similarly, you can calculate the Y value, and then judge positive and negative, so get the coordinate value ( -108.68,-53.52)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.