Bypass Vuforia's handling of the camera image and pose

↘锁芯ラ 提交于 2019-12-23 02:54:20

问题


I want to bypass Vuforia's display handling of the camera image and pose of framemarkers on iOS, is this possible?


回答1:


In - (void)QCAR_onUpdate:(QCAR::State *)state you can grab the camera data and the marker poses.

Camera image data

QCAR::Frame frame = state->getFrame();

for (int i = 0; i < frame.getNumImages(); i++) {
    const QCAR::Image *image = frame.getImage(i);
    if (image->getFormat() == kQCARFrameFormat) {

        const void *pixelData = image->getPixels();
        int width = image->getWidth();
        int height = image->getHeight();

    }
}

Marker poses

NSMutableArray *mutableFramemarkers = [[NSMutableArray alloc] initWithCapacity:state->getNumTrackableResults()];
for (int i = 0; i < state->getNumTrackableResults(); i++) {
    const QCAR::TrackableResult *trackableResult = state->getTrackableResult(i);
    const QCAR::MarkerResult *markerResult = static_cast<const    QCAR::MarkerResult *>(trackableResult);
    const QCAR::Marker &marker = markerResult->getTrackable();
    QCAR::Matrix44F qcarPose = QCAR::Tool::convertPose2GLMatrix(trackableResult->getPose());
}


来源:https://stackoverflow.com/questions/41952037/bypass-vuforias-handling-of-the-camera-image-and-pose

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!