Log in or register to post comments

Place and scale image using augmented reality in android

March 20, 2014 - 3:46am #1

I am working on android app which do following things

  1. Opens the camera and place the user selected images over camera view
  2. on image user will play like moving image and zooming to find position
  3. App as to calculate the zooming position to real world as user zoom the image, as did in this appAugment!

some how i managed to achieve 1 and 2 things, but for third one i dont know how to calculate real world scaling to fit the object as user zoom is not happening.I appreciate your help to achieve this.

please respond to me. Thanks in advance

Place and scale image using augmented reality in android

March 20, 2014 - 5:14am #4

Ok, the scale of the 3D world is defined by the target size;

so, suppose you want to print an Image target on a 10cm x 5 cm card,

and suppose you want to use millimeters as your unit of measure (e.g. if your 3D models are defined in millimeters),

then you will simply need to create an Image Target with size 100 x 50 via the Target Manager (100mm = 10 cm, and 50mm = 5 cm, in this example).

The rest is just a direct consequence of this basic principle.

Read also the developer guide, where these concepts are explained.

https://developer.vuforia.com/resources/dev-guide/image-targets

 

Place and scale image using augmented reality in android

March 20, 2014 - 4:43am #3

Thanks for your reply, 

Actually, i dont want to find the distance between camera and object but i want to find actually space that particular item is going to occupying when you zoom in and zoom out on that object, the augment app did in same way.

 

Thanks a lot

 

Place and scale image using augmented reality in android

March 20, 2014 - 4:29am #2

Hi,

I am not sure if I fully understand what you mean, but sounds like you need to compute the distance of the camera from the target; this article explains the maths involved:

https://developer.vuforia.com/resources/dev-guide/distance-target

Log in or register to post comments