惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
D
Docker
月光博客
月光博客
MongoDB | Blog
MongoDB | Blog
Vercel News
Vercel News
美团技术团队
博客园 - 叶小钗
I
InfoQ
Jina AI
Jina AI
博客园 - 司徒正美
雷峰网
雷峰网
B
Blog
Y
Y Combinator Blog
A
About on SuperTechFans
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
大猫的无限游戏
大猫的无限游戏
Microsoft Security Blog
Microsoft Security Blog
Stack Overflow Blog
Stack Overflow Blog
腾讯CDC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Recent Announcements
Recent Announcements
V
V2EX
N
Netflix TechBlog - Medium

博客园 - Ethan_村长

自己开发iOS版按键精灵--TTouch iOS 基于OpenCV图像比较的常见方法 iOS越狱系统使用root权限运行命令 Mac CEF 支持mp3 mp4编译 iOS自动化测试需求实现(iOS按键精灵类似) [转]runtime 消息机制 [转]多线程 Mac读取Andriod屏幕截图 解决读取iphone名称中文乱码问题 windows或mac上对iOS设备截图 JPEG文件结构 使用libjpeg.framework压缩UIImage shell脚本删除指定mobileprovision iphone使用mac上的SOCKS代理 eclipse配置javah命令 [转]Android通过NDK调用JNI,使用opencv做本地c++代码开发配置方法 利用JNI技术在Android中调用、调试C++代码 iOS在线更新framework,使用NSBundle动态读取 CocoaPods pod install
ios获取左右眼图片景深图
Ethan_村长 · 2015-08-25 · via 博客园 - Ethan_村长
    cv::Mat leftMat,rightMat,depthMapMat;
    UIImageToMat(leftImage, leftMat);
    UIImageToMat(rightImage, rightMat);
    if (leftMat.type()>0) {
        cv::cvtColor(leftMat,leftMat,cv::COLOR_RGB2GRAY);
    }
    if (rightMat.type()>0) {
          cv::cvtColor(rightMat,rightMat,cv::COLOR_RGB2GRAY);
    }
    //int numDisparities = 0, int blockSize = 21
    cv::Ptr<cv::StereoBM> sbm = cv::StereoBM::create(32,21);
    sbm->compute(leftMat, rightMat, depthMapMat);
    depthMapMat.convertTo(depthMapMat,CV_8UC1);


    UIImage *depthMapImage=MatToUIImage(depthMapMat);
    leftMat.release();
    rightMat.release();
    depthMapMat.release();