filterSpeckles函数的应用

本文介绍了一种用于过滤视差图中小斑点噪声的方法,该方法通过设置最大斑点尺寸和最大差异值来确定哪些区域被视为噪声。适用于16位的视差图像,能够有效去除小范围的噪声,保持较大连续区域的完整性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Filters off small noise blobs (speckles) in the disparity map
//用于过滤不同块的小斑点,可以在深度图中应用
C++: void filterSpeckles(InputOutputArray img, double newVal, int maxSpeckleSize, double maxDiff, InputOutputArray buf=noArray() )
Python: cv2.filterSpeckles(img, newVal, maxSpeckleSize, maxDiff[, buf]) → None
Parameters:

**img** – The input 16-bit signed disparity image
//输入的16位的视差图或者深度图


**maxSpeckleSize** – The maximum speckle size to consider it a speckle. Larger blobs are not affected by the algorithm
//斑点块的大小

**maxDiff** – Maximum difference between neighbor disparity pixels to put them into the same blob. Note that since StereoBM, StereoSGBM and may be other algorithms return a fixed-point disparity map, where disparity values are multiplied by 16, this scale factor should be taken into account when specifying this parameter value.
//

**buf** – The optional temporary buffer to avoid memory allocation within the function.
//

应用:见大疆guidance 视觉追踪demo

https://github.com/dji-sdk/Guidance-SDK/blob/master/doc/Guides/Visual_Tracking_tutorial/visual_Tracking_tutorial_cn.md

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值