0

I am using Laplacian of Gaussian for edge detection using a combination of what is described in http://homepages.inf.ed.ac.uk/rbf/HIPR2/log.htm and http://wwwmath.tau.ac.il/~turkel/notes/Maini.pdf

Simply put, I'm using this equation :

for(int i = -(kernelSize/2); i<=(kernelSize/2); i++)
    {

        for(int j = -(kernelSize/2); j<=(kernelSize/2); j++)
        {

            double L_xy = -1/(Math.PI * Math.pow(sigma,4))*(1 - ((Math.pow(i,2) + Math.pow(j,2))/(2*Math.pow(sigma,2))))*Math.exp(-((Math.pow(i,2) + Math.pow(j,2))/(2*Math.pow(sigma,2))));
            L_xy*=426.3;
        }

    }

and using up the L_xy variable to build the LoG kernel.

The problem is, when the image size is larger, application of the same kernel is making the filter more sensitive to noise. The edge sharpness is also not the same.

Let me put an example here...

Suppose we've got this image:Original image

Using a value of sigma = 0.9 and a kernel size of 5 x 5 matrix on a 480 × 264 pixel version of this image, we get the following output:

Small Image

However, if we use the same values on a 1920 × 1080 pixels version of this image (same sigma value and kernel size), we get something like this:enter image description here

[Both the images are scaled down version of an even larger image. The scaling down was done using a photo editor, which means the data contained in the images are not exactly similar. But, at least, they should be very near.]

Given that the larger image is roughly 4 times the smaller one... I also tried scaling the sigma by factor of 4 (sigma*=4) and the output was... you guessed it right, a black canvas.

Could you please help me realize how to implement a LoG edge detector that finds the same features from an input signal, even if the incoming signal is scaled up or down (scaling factor will be given).

4

1 回答 1

2

查看您的图像,我想您正在使用 24 位 RGB。当您增加 sigma 时,滤波器的响应会相应减弱,因此您在具有较大内核的较大图像中获得的值接近于零,这些值要么被截断,要么非常接近于零,以至于您的显示器无法区分。

为了使不同尺度的差异具有可比性,您应该使用尺度空间微分算子(Lindeberg 等人):

尺度空间微分

本质上,微分算子应用于高斯核函数G_{\sigma}( \sigma^{\gamma}L是输入图像,LoG是高斯图像的拉普拉斯算子。

当微分阶数为 2 时,\gamma通常设置为 2。

然后你应该在两个图像中得到非常相似的幅度。

资料来源:

[1] 林德伯格:“计算机视觉中的尺度空间理论”1993

[2] 弗兰吉等人。《多尺度血管增强滤波》1998

于 2013-05-15T14:34:11.813 回答