Log in or register to post comments

Books Demo does not track target

April 20, 2017 - 12:58pm #1

I hope this is not repetitive, but I could not find an answer.    I have the IoS Sample Books installed and working on my iPad with no issues, works great. So,

I want to use my own targets, and created a cloud database, uploaded target images, and meta that point to json, etc.  I have some custom images I created, as well as a copy of the "Cloud Recognition in Vuforia" book cover and json, that are in my custom cloud database.

Again I run the app with access and secret keys (default) pointing to "samples" cloud DB, and all works.   I change ONLY the access key and secret key to point to my cloud DB.   Everything "almost" works.   It correctly finds my targets, and meta, and json, and provides correct content in overlay.   However, when the target is acquired, the overlay disappears instead of being "attached" to target.     I assume there is some other linkage or setting  somewhere, and it must be either in the target definition (but not sure where) or their is some hidden magic with the JSON definition (which appears unlikely, but possible based on some forum comments).   Is "targetID" magic, or is it just a unique identifier (ID of the matched target)?   Or is there a "hidden" layer in the target image?

Any suggestions of why the overlay will not attached to target?

 

Note: according to this link, there is no magic, just upload png/jpg and change keys.  But as mentioned above, it does not fully work.

https://library.vuforia.com/articles/Solution/How-To-Add-Your-Own-Cloud-Database-to-the-Cloud-Reco-Sample

UPDATE: Solved.  Issue is target image size.  Docs suggest size unit defaults to "meters", so I had  0.25 or 1.0

The books demo is values closer to 300.  So bigger value is " smaller" image,  smaller value is bigger displayed image.   Values under maybe 10 result in huge image, and not displayed.   Not sure of why a value of "300" maps to a width of 8.5 inches width of a book....

 

UPDATE: Check BookEAGLView.mm,    The size is defined here:

float kXObjectScale = 400.0f;

float kYObjectScale = 192;

const float kZObjectScale = 3.0f;

So target image at 100% has a width of 400.   So an overlay width would likely be 200-300.

 

 

Log in or register to post comments