图像OpenCVSharp中的阈值深度距离

问题描述

这可能是一个愚蠢的问题,但是如何设置阈值才能更改相机的深度距离。现在我正在使用Cv2.threshold,但是使用otsu方法,整个图片将变为一种颜色,而不是不同种类的颜色。 使用的代码:

var colorizedDepth = colorizer.Process<VideoFrame>(depthFrame).DisposeWith(frames);
                            Mat testcd = new Mat(colorizedDepth.Height,colorizedDepth.Width,MatType.CV_8UC3,colorizedDepth.Data);
                            Mat testgd = new Mat();
                            Cv2.CvtColor(testcd,testgd,ColorConversionCodes.RGBA2GRAY);
                            Mat testbd = new Mat();
                            Cv2.Threshold(testgd,testbd,255,ThresholdTypes.Otsu | ThresholdTypes.Binary);
                            Cv2.ImShow("camera",testgd);
                            Cv2.WaitKey(0);

获取着色深度的代码来自包装器librealsense: https://github.com/IntelRealSense/librealsense/tree/master/wrappers/csharp 有人知道我在阈值上做错了什么,以便改变了深度距离吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)