【问题标题】:OpenCV Structured Light getProjPixel() exampleOpenCV 结构光 getProjPixel() 示例
【发布时间】:2019-11-26 02:54:21
【问题描述】:

我一直在尝试按照 OpenCv for Unity(它是 OpenCV java 的一个端口)上的结构化光格雷码教程重新创建结构光函数

https://docs.opencv.org/4.1.2/dc/da9/tutorial_decode_graycode_pattern.html

这些教程看起来很简单,但我认为它们现在可能已经过时了。例如,API 的 Graycode 部分不再有“解码”功能 https://docs.opencv.org/trunk/d1/dec/classcv_1_1structured__light_1_1GrayCodePattern.html

Mat disparityMap;
bool decoded = graycode->decode(captured_pattern, disparityMap, blackImages, whiteImages,
                                structured_light::DECODE_3D_UNDERWORLD);

相反,我认为我可能需要以某种方式使用 getProjPixel() 吗?我找不到任何其他使用此在线思想的示例。

这是我的粗略想法,也许如何使用它

for(int x = 0; x < 1920; x++)
        {
            for(int y = 0; y < 1080; y++)
            {
                Point thepoint= new Point(-1,-1);
                grayCode.getProjPixel(photosCam1, x, y, thepoint );
                projPix.Add(thepoint);
            }

        }

但我不完全知道接下来我会做什么来获得一个点云(最终是一个统一的网格),或者我是否朝着正确的方向前进

【问题讨论】:

  • 我现在可以确认,如果我运行该代码,它就会崩溃

标签: java android opencv unity3d


【解决方案1】:

不幸的是,看起来答案只是在谈到结构光模块时,OpenCV 的 Java 端口不完整。所以基本上没有办法为java(或后续的统一端口)解码捕获的图像

https://answers.opencv.org/question/222527/structured-light-module-missing-decode-function/?comment=222534#post-id-222534

太糟糕了!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-09-10
    • 1970-01-01
    • 2013-12-16
    • 2014-03-19
    • 1970-01-01
    • 1970-01-01
    • 2016-11-11
    • 2015-08-20
    相关资源
    最近更新 更多