Log in or register to post comments

Resize a picture and use it as Image Target

February 27, 2015 - 7:22am #1

Hello, 

I use the UserDefinedTarget technology and I want to do something which is particular..

I want to take a photo and then crop it to have a piece of the photo as ImageTarget.. I don't know if it possible or not but il will be very practical.. 

As you can see on the ScreenShot, I just want to have the part of the image which is in the white rectangle.. but I really don't know how to do that..

If somenone can help or advise me ? 

BR

AttachmentSize
Image icon Screenshot_2015-02-27-16-15-48.png1.19 MB

Resize a picture and use it as Image Target

March 9, 2015 - 2:57am #7

Ok that's what I'm doing at this time.

So I take the width of the screen and then calculate the corresponding height to fot with the business card dimension.

I Make a new Rect width the dimensions and users just have to fit the card with the rect to have a almost good target.. 

But the problem of the size is not good.. So I'll see what it si possible to do.

So, Thank you so much for helping.

 

Have a nice day,

BR

Gauthier

Resize a picture and use it as Image Target

March 9, 2015 - 2:50am #6

Yes, I understand what you're saying;

in fact, the best way of handling this is to instruct users of the App to hold the device in front of the target (e.g. the business card) so that the business card fits the camera view as much as possible;

for example, you could implement some overlay 2D graphics on the camera view that provides some visual / text indication to the user (the user could then tap a Button to take the snapshot when ready, like in the UDT sample app).

 

 

Resize a picture and use it as Image Target

March 9, 2015 - 2:38am #5

I already have defined the scale of the target. I know that it is arbitrary.

But there is something that I don't understand : 

How can I be sure that the object which will be displayed on the target always have the same size.

You know if the user take a photo of the target more or less far from it, the target will not be exactly what it has to be..

In my case I want users to take a business card as target. But if they take this not correctly the target is not just the card and then the size is not wright.. 

Maybe I'm not clear but I hope you'll understand my problem.. 

Thank in advance,

 

Gauthier

 

 

Resize a picture and use it as Image Target

March 6, 2015 - 11:37am #4

You define the scale of the target (image) via the API when you create the UDT (check the API reference); the scale is arbitrary (i.e. chosen by you), as the camera image is 2D and Vuforia does not have a way to determine the real world 3D size of it (for that, it would need a 3D / depth sensor).

Once you have set the scale with the API, you can then have your 3D model sized according to the chosen scale.

 

 

Resize a picture and use it as Image Target

March 6, 2015 - 2:57am #3

Ok I understand that.. 

I already have a on-screen frame which allows users to take the picture correctly.. 

But how to be sure that the 3D models which appear on the target alwas have the same scale..

it's a very important point of my project and the scale of the model depends of the size of the target... 

I don't know how to implement that.. 

If you have any solutions.. 

BR

Gauthier

Resize a picture and use it as Image Target

March 4, 2015 - 9:20pm #2

You can use an on-screen frame to help the user to position desired target in an ideal way for UDT, but it's Vuforia which controls and evaluates the camera feed to determine the area that will become the target. Here's a couple helpful links that explain more:

https://developer.vuforia.com/forum/faq/can-i-feed-vuforia-my-images-or-video

https://developer.vuforia.com/library/articles/Best_Practices/Recommended-User-Defined-Target-Attributes

https://developer.vuforia.com/library/articles/Training/User-Defined-Targets-Guide

 

Log in or register to post comments