RMVL  2.1.0-dev
Robotic Manipulation and Vision Library
载入中...
搜索中...
未找到
图像预处理模块

提供了二值化等图像预处理功能 更多...

图像预处理模块 的协作图:

枚举

enum  rm::PixChannel : uint8_t { rm::BLUE , rm::GREEN , rm::RED , rm::AUTO }
 像素通道枚举 更多...
 

函数

cv::Mat rm::binary (cv::Mat src, PixChannel ch1, PixChannel ch2, uint8_t threshold)
 通道相减二值化
 
cv::Mat rm::binary (cv::Mat src, uint8_t threshold)
 亮度阈值二值化
 

详细描述

提供了二值化等图像预处理功能

枚举类型说明

◆ PixChannel

enum rm::PixChannel : uint8_t

#include <rmvl/algorithm/pretreat.hpp>

像素通道枚举

枚举值
BLUE 

蓝色通道

GREEN 

绿色通道

RED 

红色通道

AUTO 

自动处理(未定义通道)

函数说明

◆ binary() [1/2]

cv::Mat rm::binary ( cv::Mat src,
PixChannel ch1,
PixChannel ch2,
uint8_t threshold )

#include <rmvl/algorithm/pretreat.hpp>

通道相减二值化

cv::Mat bin = src[ch1] - src[ch2];
参数
[in]src通道类型为 BGR 的原图像
[in]ch1通道1
[in]ch2通道2
[in]threshold相减阈值,像素通道相减的值若小于该阈值则置 0,大于则置 255
返回
二值图像

◆ binary() [2/2]

cv::Mat rm::binary ( cv::Mat src,
uint8_t threshold )

#include <rmvl/algorithm/pretreat.hpp>

亮度阈值二值化

参数
[in]src通道类型为 BGR 或 Mono8 的原图像
[in]threshold亮度阈值,像素亮度小于该阈值则置 0,大于则置 255
返回
二值图像