高斯模糊 - GaussianBlur
函数简介
对图像执行高斯模糊,降低噪声并平滑图像。
接口名称
GaussianBlur
DLL调用
int64_t GaussianBlur(int64_t instance, int64_t ptr, int32_t kernelSize);
参数说明
参数名 | 类型 | 说明 |
---|---|---|
instance | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
ptr | 长整数型 | 图像指针。 |
kernelSize | 整数型 | 高斯核大小(奇数)。 |
示例
long image = LoadImage(ola, "D:/test/img.png");
if (image) {
long result = GaussianBlur(ola, image, 5);
if (result) {
FreeImagePtr(ola, result);
}
FreeImagePtr(ola, image);
}
返回值
返回处理后的图像句柄,失败返回0。
注意事项
- 处理后的图像需调用
FreeImagePtr
释放。