本文介绍了绕过 Vuforia 对相机图像和姿势的处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我想在 iOS 上绕过 Vuforia 对相机图像和帧标记姿势的显示处理,这可能吗?

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

推荐答案

- (void)QCAR_onUpdate:(QCAR::State *)state 中,您可以抓取相机数据和标记姿势.

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

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();

    }
}

标记姿势

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());
}

这篇关于绕过 Vuforia 对相机图像和姿势的处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 16:44