用于配置腐蚀操作的结构体。
1 2 3 4 5 6 7 8 | struct BlurConfig { Size kernelSize = Size(3, 3); MorphShape morphShape = MorphShape::MORPH_RECT; std::pair<int, int> anchor = std::make_pair(-1, -1); uint32_t iterations = 1; BorderType borderType = BorderType::BORDER_REPLICATE; std::vector<double> borderValue; }; |
参数名 |
说明 |
---|---|
kernelSize |
卷积核尺寸,kernelSize的宽和高取值范围为[3,9],且卷积核宽高相同。默认值为“3*3”。 |
morphShape |
卷积形状,当前仅支持MORPH_RECT。MORPH_RECT的介绍可参见MorphShape。 |
anchor |
卷积核的锚点,默认值为“(-1,-1)”,表示锚位于kernel中心位置,暂不支持配置。 |
iterations |
腐蚀操作迭代次数,默认为“1”,取值范围为[1, 100]。 |
borderType |
边界填充类型,当前仅支持BORDER_REPLICATE。“BORDER_REPLICATE”介绍可参见BorderType。 |
borderValue |
边界填充值,存放颜色分量的值,取值范围为[0,255]。 预埋参数,暂不支持配置。 |