Log in or register to post comments

inconsitent cloud target size

January 21, 2014 - 9:20am #5

Hi,

we are facing issue with cloud recognition in vuforia 2.8.9

when we create new cloud target in cloud DB over API we set target pic width to 200.

When I log in web target manager and check the target there it is also saying it is 200 width as any other targets we have there.

However new targets which we create, when they are detected, CloudTarget object (in unity scene) get changed in scale to some funny random number close to 275 e.g 277.54434 

All content is then showing bigger than it should as we map content to 200.

However this is not happening for older created targets. They scale CloudTarget object correctly to 200.

I just can't figure out what the problem could be.

 

I did confirm same behaviour in vuforia cloud sample project 2.8.9 fresh downloaded.

Imported to new plain unity project, changed cloud acces keys to our DB and tried this new created target 

  • Target ID: 501aaba4c0144b8783fa8f651a0d9f62
  • when run in unity editor and this target was recognized, it scaled cloudTarget object to 296.2963
  • while when older target in our db
  • Target ID: 4d7a099584e64a609175b3db0d8700da

was recognized, cloudTarget object was properly set to 200.

How ever this does not appear to be a problem in older vuforia SDK, when I scan new cloud target with older mobile app it does show properly.

can you help me with this please?

 

thanks

Stan

 

inconsitent cloud target size

January 21, 2014 - 10:17am #4

Hi stan,

are the targets square or rectangular ?

It could be that the new scaling reflects the width / height aspect ratio of the target; in previous versions this was not correctly computed, so this might explain the behaviour you are seeing.

 

inconsitent cloud target size

January 21, 2014 - 11:08am #3

Hi Alessandro,

they are both rectangular but different orientation.

Old one (correct one) is landscape and new one is portrait.

Still don't understand how target "width" is related to width / height aspect ratio of the target.

S.

 

inconsitent cloud target size

January 21, 2014 - 11:03pm #2

The "width" that you enter through the Target Manager (when creating the target)  refers to the horizontal size of your image; the vertical size (height) is then computed automatically by the Target Manager;

so, if your image is portrait (i.e. the height is larger than the width, and width is set to 200, then the height will be some value larger than 200 (e.g. 277 as in your example).

So, the Target size should reflect this.

Does it make sense ?

 

inconsitent cloud target size

January 22, 2014 - 12:27am #1

Hi,

If you say it this way then it makes some sense.

However this is not what is happening.

Actually yes it probably does calculate scale of target as you said because it does have more than 200 only for portrait targets.

However scale is changed to all axis. Not only height of the target is set to calculated one. So it makes content much wider than 200 which is wrong.

Even in case it would keep horizontal scale 200 and set only vertical one to calculated to match size of real target, it does not play well in real situation.

Imagine you put a square image as a content inside portrait (lets say A4 format) target. Then if you send to unity metadata to tell it create this square image 200 in width and 200 in height, if you render such plane as a child of target object and you scale height of target object (parent), then your square image plane becomes rectangular and not square anymore. 

So to get a square content in this new behaviour, it would mean that we would need to recalculate height of it when defining metadata reflecting target sides ratio and to send in metadata not square but some rectangle and then in unity it would apear as square.

So from practical point of view this does not make much sense.

S.

Log in or register to post comments