Topic locked

Convert image target point to screen point

July 27, 2021 - 10:34pm #1

iOS 14.x

Vuforia SDK 9.8.5


How can we convert model coordinates to iOS UIView view/screen coordinates?

Can someone (Vuforia?) provide some sample code, for iOS (and ideally Android) native, that will consistently and reliably convert a point in the recognized image target's coordinate space to X,Y CGPoint location within the UIView where the CAMetalLayer is rendering Vuforia?

From searching the Internet, google, here, and stackoverflow, it looks like most Vuforia users today are using Unity, and I know Unity gives you these sorts of conversions essentially for free.  But they do not come for free on iOS and Android, and they are non-obvious, and the only "documentation" we can find blatently does not work.

For example, there is this:

Ancient FAQ Answer from 2012, which is incomplete, references the very-old "QCAR" functions, and does not work.

The Vuforia C++ API docs list Vuforia::Tool::projectPoint and Vuforia::Tool::projectPointToPlaneXY, but we haven't found any combination here that works.

I know this is a very common use case, so I would expect that it would be a readily-available function or group of functions in the SDK, but that doesn't seem to be the case.


Any help is greatly appreciated, and I'd recommend and request that the sample app be updated to demonstrate this functionality in the future.

Thank you!

Topic locked