Note that there are some explanatory texts on larger screens.

plurals
  1. POAugmented reality: camera stream on OpenGL view
    primarykey
    data
    text
    <p>AR (augmented reality) seems to be what all iOs developer are looking at this days. I'm playing with a very classic pet project, rolling dices with textures and if possible the camera stream on a dice facet. I face a few issues for this last part and I have some questions for the experts:</p> <p>Getting the video stream requires AV Foundation : <code>AVCaptureVideoDataOutputSampleBufferDelegate</code> to get an image buffer, and then build a <code>UIImage</code> using Quartz function like <code>CGBitmapContextCreate</code>. This is demonstrated in <a href="http://www.benjaminloulier.com/articles/ios4-and-direct-access-to-the-camera" rel="nofollow">http://www.benjaminloulier.com/articles/ios4-and-direct-access-to-the-camera</a> or in the apple AV Foundation Programming Guide (see <a href="https://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/04_MediaCapture.html#//apple_ref/doc/uid/TP40010188-CH5-SW30" rel="nofollow">https://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/04_MediaCapture.html#//apple_ref/doc/uid/TP40010188-CH5-SW30</a>)</p> <p>Then I can create a texture like I did for my "still" images and use it with a <code>GLKBaseEffect</code> (or a shader?).</p> <p>Question 1: <code>GLKBaseEffect</code> seems really nice and simple, but should I aim for OpenGL 2 and shaders ? </p> <p>Now the RosyWriter demo from apple uses the Core Video <code>CVOpenGLESTextureCacheCreateTextureFromImage</code> function to bind directly the texture without creating an intermediary <code>UIImage</code>. This is - as stated in the demo description - new in IOS 5.</p> <p>Question 2: is this a better way to map the texture ?</p> <p>Question 3: There are a few interesting frameworks, like GPUImage, or even 3D Gaming frameworks that could be used too. Has anyone some feedback on using these ? The apple provided frameworks seem quite complete to me so far.</p> <p>Thanks a lot !</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload