By sbhuiyan
on Fri, 06/29/2012 - 22:38
How would one go about integrating the QCAR library into an existing application on the iOS?
How would one go about integrating the QCAR library into an existing application on the iOS?
Integrating into an existing app
Hi sbhuiyan
This is such a wide ranging and application specific question that could have many different answers.
Essentially the samples show the key things that Vuforia does:
Integrating into an existing app
Hello N,
Thank you for your quick response. Would you mind explaining what the 3D pose/matrix is and where I could find it in the example code?
Thanks!
Integrating into an existing app
hi sbhuiyan
If you look in the EAGLView.mm of the Image Targets app the code that tracks and renders is in renderFrameQCAR()
The pose or model view matrix give the position of the trackable. You can google "model view matrix" for more background info:
Integrating into an existing app
What do you think the best way is to get the camera feed?
Integrating into an existing app
See this thread
https://ar.qualcomm.at/content/qcarimage-uiimage
HTH
N
Integrating into an existing app
Thanks! This thread was quite helpful.
So when I integrate I seem to be getting this read out on my terminal:
2012-07-11 10:48:09.407 Atlas[14557:707] APPSTATUS_INITED
Integrating into an existing app
Hi sbhuiyan
You need to make sure that your equivalent to the EAGLView class adheres to the following protocol:
Integrating into an existing app
Hello N!
Thank you for your help. I thought that was something I had covered but upon double checking it, I found that I was wrong.
Integrating into an existing app
Hi sbhuiyan
In the sample code, the EAGLView contains the OpenGL ES Context into which the camera feed an 3D objects are drawn.
The RenderFrameQCAR is the loop called each frame and it shows that the camer feed is drawn first, with the 3D objects after.
Integrating into an existing app
Kind of. Really what I am trying to figure out is which view controller my app needs to handover control to.
Integrating into an existing app
One option might be to look at OverlayViewController.mm
...as this kind of controls things like changing datasets at the moment, and it provides a UI with buttons.
HTH
Integrating into an existing app
Hey, so I got the video feed up.
But now in landscape mode the video takes up half the screen and the orientation is set to the side.
Any ideas?
Integrating into an existing app
You could try looking at
- (void) handleARViewRotation:(UIInterfaceOrientation)interfaceOrientation
Integrating into an existing app
So I saw this method on the image targets example app and I had that replicated in my own application. However, this orientation issue still exists.
Integrating into an existing app
I think this might be because Portrait is considered the default orientation because this is the way the camera works on iOS.
Integrating into an existing app
If I force the device orientation into portrait and then back into landscape when AR is activated, the model fixes itself. As does the camera orientation
Integrating into an existing app
Many thanks for sharing this.
N