Lecture 22: Image Processing (33)
brandonlouie

There is some intuition behind being able to identify this as a sharpening filter without applying it to an image. If we were to overlay this matrix over the matrix describing an image, we will see that the center pixel aligns with the larger weight (5) and the surrounding pixels are aligned with no or lesser weights (0 and -1). Hence, we can conclude that this filter puts emphasis on a particular pixel and less emphasis surrounding the pixel, thus we can conclude that this filter is a sharpening filter

henrykhaung

I am a bit confused on how convolution with this matrix/filter results in sharpening an image. To my understanding, the filter is some kind of pattern that we want to detect in the image, but I am not sure what convolution does. I guess my question is what does convolution do

S-Muddana

@henrykhaung In image processing, convolution involves sliding a small matrix, called a kernel or a filter, over the pixels of an image. At each position, the kernel is multiplied element-wise with the corresponding pixels in the image, and the results are summed up. This process is repeated for every pixel in the image, resulting in a new image where each pixel value is a combination of its neighbors, based on the values in the kernel.

For example, in the context of image sharpening, a sharpening kernel might have positive values at the center and negative values around it. When convolving this kernel with an image, pixels along edges get boosted, making them appear sharper.

Liaminamerica2

I find it fascinating that sharpening and blurring a photo uses the same algorithm but different matrices for determining pixel values. After researching, I discovered many filters you could use on your images using convolution such as Unshapen, Median, and Bilateral. All these filters have their unique purpose when used on an image.

anavmehta12

This is a sharpening filter as it enhances the center pixel by weighting it heavily and subtracts the values from the top, bottom, left, and right pixel values from this new weighted value.

SudhanvaKulkarni123

@brandonlouei I was thinking of that too! the middle pixel places emphasis on pixel (i,j), and the others on (i-1,j), (I, j-1), etc. Using this, we can also easily create blurring filters by shifting the wights to be more focussed on the surrounding pixels rather than the pixel itself. Though I wonder if there must be some kind of constraint on the coefficients so that the image maintains its brightness and other properties. Perhaps we can enforce that the sum of the coefficients must be 1? not sure

aayushg55

Convolution with this filter results in sharpening an image because it amplifies high-frequency content. The large weight on the center pixel and the negative weights on neighboring pixels serve to bring out changes between pixels, boosting edges and fine details in the resulting image.

jefforee

Looking up convolution in image processing, I found out identity matrix is just 1 in the center with 0s all around it. This explains the 5 in the middle to sharpen the current pixel and blur the surrounding ones.

You must be enrolled in the course to comment