cv2 拉普拉斯函数中的 alpha 值是哪个
我正在尝试将拉普拉斯滤波器应用于以下文本中的图像。
cv.Laplacian(src, ddepth[, dst[, ksize[, scale[, delta[, borderType]]]]])
但我不确定哪个值是 alpha。
文本:
我们对图像应用 α = 0.2 的 3×3 拉普拉斯滤波器,并取其绝对值以忽略梯度方向。对于彩色图像,我们将滤波器分别应用于每个红色、绿色和蓝色通道,然后取通道的平均值。最后,我们将拉普拉斯图像大小调整为 100 × 100,并将图像总和标准化为 1。这使我们能够通过对每组中所有拉普拉斯图像取平均值来轻松计算专业照片和快照的边缘空间分布。
I am trying to apply Laplacian filter to image from following text.
cv.Laplacian(src, ddepth[, dst[, ksize[, scale[, delta[, borderType]]]]])
But I am not sure which value is alpha.
Text:
we apply a 3×3 Laplacian filter with α = 0.2 to the image, and take its absolute value to ignore the direction of the gradients. For color images, we apply the filter to each of the red, green, and blue channels separately and then take the mean across the channels. Finally, we resize Laplacian image size to 100 × 100 and normalize the image sum to 1. This allows us to easily calculate the edge spatial distribution of the professional photos and snapshots by taking the mean across all the Laplacian images in each set.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据我的经验,使用参数(可能是 alpha)进行图像锐化通常如下完成:
就卷积核而言,将
So
并添加为
上面可能需要裁剪,因为它可能会超调。
因此,或者可能更好的是,
So
并将它们相加为
So 这些将在 Python/OpenCV 中实现为 cv2.filter2D()。
请注意,通常使用拉普拉斯算子的负数。
In my experience, the use of an argument, possibly, alpha, for image sharpening is often done as follows:
In terms of a convolution kernel that would be
So
and adding as
The above may need clipping as it may overshoot.
So, alternately and probably better would be,
So
and adding together as
So these would be implemented in Python/OpenCV as cv2.filter2D().
Note, that the negative of the Laplacian is typically used.