编译 CCV 改雷达触控
📅 2018年10月15日 / 🎨 开发日志 / 👓 250
记录一下编译 CCV 1.2
的问题
Github 库地址 https://github.com/nuigroup/ccv-tbeta
一、编译错误
编译错误主要是由 libs\QTDevWin\CIncludes\Icons.h
文件中的乱码问题引起的,修复一下即可。
二、修改关键位置
1. 跟踪源码
入口 apps\addonsExamples\VS2008\src\testApp.h
↓
主库 addons\ofxNCore\src\ofxNCore.h
↓
核心 addons\ofxNCore\src\Modules\ofxNCoreVision.h
2. 进入文件「ofxNCoreVision.cpp」
路径 addons\ofxNCore\src\Modules\ofxNCoreVision.cpp
主要修改几个函数:
2.1 初始化设备,选择摄像头或视频
void ofxNCoreVision::initDevice()
2.2 更新函数
void ofxNCoreVision::_update(ofEventArgs &e)
2.3 提交图像处理
void ofxNCoreVision::grabFrameToGPU(GLuint target)
和 void ofxNCoreVision::grabFrameToCPU()
撇开摄像头输入的部分不看,主要看视频文件输入的部分:
主要调用了 vidPlayer->getPixels()
函数
返回了一个 unsigned char *
类型指针变量初始值为 new unsigned char[width*height*3]
三、雷达开发思路
主要思路:将雷达数据转化为 unsigned char[]
格式的图像,替代到 vidPlayer->getPixels()
即可。
ofVideoPlayer.h
转ofLidarPlayer.h
loadMovie()
转loadLidarDriver()
加载 DLL
- 本文链接: https://me.juexe.cn/post/ccv-radar-touch.html
- 版权声明: 本博客所有文章均采用 CC BY-NC-SA 3.0 许可协议(转载请注明出处)。
留言(0)