Archive for the ‘Denoising’ Category

Image Denoising – contd

July 4, 2006

Today I have finally completed the image denoising plug-in which I started writing last week. Previously the code could only handle grayscale images and that too of specific resolution (power of 2). Now the implementation is generalized and gave pretty good results on testing under various levels of noise. The main problem I faced during this time was in understanding how the gimp processed colored images using a single array. I had the concept right, but was reading images by the Matlab format which reverses the x and y coordinates. I didn’t realize what I was doing wrong until I asked Simon (my mentor) about it.

Once I fixed that, I was getting results but they did not seem satisfactory for images of dimension say 240×260. I stored this image in a 512×512 array and set the necessary values to the image pixels and set the rest of the values to 0. As you can see, a large part of the image will be 0 and thus the overal image noise becomes small. For this reason it was not denoising the image properly. The solution was to extend the image in each direction to create 2*(240*260) image and read the values of 512×512 array accordingly. This way the noise level remains the same and the denoising is done successfully. Some examples of how the denoising is performing are shown here.

Noisy Image 2 noisy image
Noisy Image 2 denoised image

Blurred 2 blurred image
Noisy Image noisy image 2
Denoised Image denoised image 2

There is a lot of noise in the first image and the corresponding denoised is not that good but this is understandable considering the amount of information lost due to noise.  Notice what happens the the first noisy image is blurred.  The noise is gone but the image is severally blurred which is not good.  Clearly this denoising method is superior and restores the basic image even if the noise is a lot.  The noise in the second image is not that much and hence the denoised image looks much better.

Image Denoising

June 29, 2006

I have been rather lazy about blogging about the work I am doing, but today I was pretty excited about the work done so thought of putting them online as well :). I started out writing a jpeg2000 load plug-in but was experiencing some problems using an external library. It was getting frustrating so I thought I would suspend that work and concentrate on other goals that I had in mind.

I have got a working denoising plug-in which is currently a little selective in its functionality, but works well. I will be working on making it more flexiable during the next couple of days. The results are shown below. Denoising basically attempts to remove noise from an image (here the noisy cats image). One way to remove noise is to blur the image, but this is not very effective as it removes high frequency components in an image.

Cats with noise

noisy image
Blurred cats image

blurred image

Denoising cats image

denoised image
original cats image

original image

The current implementation tries to restore high frequency and the results look better than the blurred images. More testing will be done to further confirm this. In the next couple of days I will be working on generalizing the implementation. It currently only works on sqaured images with dimension of the form 2^m by 2^m. There are memory allocation issues the size is not of this form. Also, the implementation currently uses Daubechies wavelet of length 8. This can be changed for better results. Additionally, I will also work on improving the speed of the code. All this should not take more than 2 days.