现在的位置: 首页 > 综合 > 正文

增强现实(AR) for ios-新手上路

2013年09月03日 ⁄ 综合 ⁄ 共 545字 ⁄ 字号 评论关闭

1.私有api

头文件添加:

extern "C" CGImageRef UIGetScreenImage();

使用时添加:

CGImageRef screenref = UIGetScreenImage();


2.摄像头回调

一 、生成capture session 实例



二 、实现回

AVCaptureVideoDataOutputSampleBufferDelegate 



YCbCr or RGBA

ios 默认 YCbCr
,OPEN GL 和CoreGraphics推荐前者

YCbCr =  

(Y) Luminance  + 

 (Cb/U) Blue Chrominance + (Cr/V) Red Chrominance ;


 


 

OpenCV 

 

Adding OpenCV to your Xcode 4 project 

1.download

 

opencv


2.Download build script by @cvtalks: 

下载

3.build script

sh BuildOpenCV.sh opencv/ opencv_ios_build

 

4. Add the newly-built static libraries (.a) files under Target->Build Settings 

5.设置路径

6.添加dummy cpp 文件

7.添加opencv 头文件

8.添加代码




抱歉!评论已关闭.