How can I get defined width and height in xml of an trackable image? As I saw, I think it is related with QCAR::ImageTarget; however, I do not know how to use it
yes i had resolved in the same way.
assert(result->getType() == QCAR::TrackableResult::IMAGE_TARGET_RESULT);
const QCAR::ImageTargetResult* imageResult = static_cast<
const QCAR::ImageTarget& imageTarget = imageResult->getTrackable();
thanks a lot :)
Specifically for the code you
Specifically for the code you mention, the sample code I report here below compiles correcty, and you can use it as reference:
#include <QCAR/TrackableResult.h#include <QCAR/ImageTarget.h>
for(int tIdx = 0; tIdx < state.getNumTrackableResults(); tIdx++)
const QCAR::TrackableResult* result = state.getTrackableResult(tIdx);
const QCAR::ImageTargetResult* imageTargetResult = static_cast<const QCAR::ImageTargetResult*>(result);
const QCAR::Trackable& trackable = result->getTrackable();
const QCAR::ImageTarget& imageTarget = static_cast<const QCAR::ImageTarget&>(trackable);
Hi, Vuforia 2.0 has
Hi, Vuforia 2.0 has introduced some changes in the API;
these are explained in detail in the migration guide here:
Note that the migration guide has three sections:
-one section about new API
-one section about modified API
-one section about how to migrate your code using Image Targets as a reference
I hope this will answer your questions.
Re: How can I get defined width and height in xml of an trackabl
If you know your trackable is an ImageTarget you can cast it and call getSize:
QCAR::ImageTarget* imageTarget = static_cast<QCAR::ImageTarget*>(trackable); QCAR::Vec2F targetSize = imageTarget->getSize();
Make sure you add the ImageTarget.h include:
Are you sure you want to delete this message?
Are you sure you want to delete this conversation?