# Use Scale Space Representation to Filter Single Image

Currently I hope to use scale space representation to filter one image. Features in one image can be filtered using an Gaussian smooth filter with one optimal sigma. It means different features in one image can be expressed best in different scale under scale space representation.

For example, I have one image with one tree in it. In the scale space representation, three sigma values are used and they are represented as sigma0, sigma1 and sigma2. The ground is best expressed in the smoothed image with sigma0 because it contains textures mainly. The branches are best expressed in the smoother image with sigma1 and the trunk is with the smoother image with sigma2. If I hope to filter the image, I hope that the filtered pixels for the group is from the smoothed image with sigma0. The filtered pixels for the branches are from the smoothed image with sigma1. The filtered pixels for the trunk are from the smoothed image with sigma2.

It requires that I need to determine in which smoothed image one pixel is expressed best. Is this idea plausible? I am trying to use differece-of-Gaussian of two successive smoothed images to perform the above task. Is there any other way to combine the three smoothed image?

I use MATLAB to implement the idea. The values of the three sigmas is 1.0, 2.0 and 3.0. The corresponding size of Gaussian kernel is 3, 5 and 7. I use the function fspecial to generate the kernel. Are the parameter reasonable? Please share your experience with the scale space representation to help me. You can provide some links to useful papers.

I used factor 5-6 going from the Standard Deviation (Std) of the Gaussian to the Kernel:

radius = ceil(6 * STD);


Though it means more computation power is required.

• Do you always use the factor for different tasks? Maybe it should depend on applications. Jan 22, 2015 at 12:02
• @JoggingSong, You're right. As more important the quality, the higher the factor. I'd wouldn't use anything less than 4.
– Royi
Feb 2, 2015 at 9:15
• I don't understand it fully, however your factor is pretty accurate. For one Gaussian filter with sigma equal to 2, I use Matlab function fspecial to generate the convolution kernel with argument hsize equal to 5 and 12 respectively. The value 5 is my choice and 12 is calculated from your formula. Then I use the function freqz2 to see the frequency response. The frequency response of the value 12 will decrease to zero quickly, however the frequency response will not decrease to zero for the value 5. Do you consider your processing from the perspective of frequency domain often? Feb 4, 2015 at 8:49
• The Fourier Transform of Gaussian Function is a Gaussian. Yet those are Gaussian Filters multiplied by a window (And sampled). Hence at the frequency domain they convoloved with the Sinc function. The wider the window the narrower the Sinc and hence the result you see.
– Royi
Feb 5, 2015 at 21:40
• It is easy for me to understand the concept of frequency for signals. However for images, the frequency is difficult to understand. How is the frequency for images defined? From one book, it says that "Spatial frequencies are measures of the number of oscillations (cycles) from dark to light per unit of length of the image". Do you mean the same definition for frequency? Feb 6, 2015 at 7:31