点中的图像渐变 [英] Image gradient in the point
问题描述
我正在处理图像分割.我需要在该点计算图像梯度,所以我试图自己理解(因为我知道在具有一个普通方程式时如何计算梯度),但是我失败了.我正在谷歌搜索和谷歌搜索,但找不到合适的答案.
I'm working with the image segmentation. I need to compute image gradient in the point, so I was trying to understand by myself (because I know how to calculate gradient when having an ordinary equation) but I failed. I was googling... and googling but to find wright answer I couldn't.
任何人都可以说出或给出一些有关如何逐步计算点的图像梯度的信息吗?
Can anyone say or give some information how to compute image gradient in the point step by step?
推荐答案
图像 I(x,y)
的每个像素处的梯度就是2D向量(dI/dx,dI/dy)(x,y)
.具有中心有限差的近似 dI/dx
和 dI/dy
:
The gradient at each pixel of an image I(x, y)
is simply the 2D vector (dI/dx,dI/dy)(x, y)
. Approximate dI/dx
and dI/dy
with centered finite difference:
dI/dx(x, y) = (I(x + 1, y) - I(x - 1, y)) / 2 = (I(x + 1, y) - I(x, y) + I(x, y) - I(x - 1, y)) / 2
dI/dy(x, y) = (I(x, y + 1) - I(x, y - 1)) / 2 = (I(x, y + 1) - I(x, y) + I(x, y) - I(x, y - 1)) / 2
这篇关于点中的图像渐变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!