<< Chapter < Page Chapter >> Page >

Image Deblur

Image Resizing

Before implement the deblurring, we resize the blurred image B by mk to compensate for the difference between blur size k and code length m. Inthe resized image, the blur size is m instead of k.

Frequency Domain Deblur

  • Coded: We obtain the frequency response of the filter H(k) and the frequency content of the blurred image B(k) through DFT. Thesystem can be represented in frequency domain as B j ( k ) = H ( k ) X j ( k ) + N ( k ) where B j ( k ) and X j ( k ) are the DFT of the j-th column of the blurred image and the original image, respectively. N ( k ) represents the noise. We divide B j ( k ) by H ( k ) to obtain X j ( k ) . We then took the inverse DFT of X ( k ) to obtain the recovered image.
  • Boxcar: We use almost the same frequency domain deblur approach as used for the coded filter. The primary difference betweenthe two approaches is the following: the frequency response of a boxcar filter is a sinc function, which contains zeros at certainpoints. We added a small number to the zeros to avoid division-by-zero problems. So H ( k ) in this case is a slightly modified version of the H ( k ) used for the coded filter.

Time Domain Deblur

  • Coded: We first generate a circulant matrix whose characteristic vector contains the code sequence. Then we kick out thewrap-around part of the circulant matrix and take only the left n columns, which construct the foreground smear matrix Af whose length matches that of the blurred image B . Then we concatenate Af with the background contribution vectors to generate the matrix A for the linear system B = A X , where B is the blurred image and X is the original image. Then we use least square estimation to find the solution for this system,which gives the deblurred image X , the estimate of X . Background contribution vectors are b k = a b s ( 1 - A f * o n e s ( n , 1 ) ) , where n is the length of the original image. The first m elements in bk account for the background contribution at the top of the blurred image, and the last m elements account for that at the bottom.Thus we generate two vectors of length n + m - 1 . The first m elements of the first vector are the first m elements in bk , and the last m elements of the second vectorare the last m elements in bk . The rest elements of the two vectors are all zeros. These two vectors are then concatenated to Af to generate the smear matrix A .
  • Boxcar: We use basically the same approach as used in time domain deblurring, except that we use the 52-length boxcar as the characteristic vector ofthe matrix Af .

Over-exposure Compensation:

The deblurred image might have some element values above 1 or below 0. We set all the values below 0 to 0 and all above 1 to 1.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Elec 301 projects fall 2015. OpenStax CNX. Jan 04, 2016 Download for free at https://legacy.cnx.org/content/col11950/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Elec 301 projects fall 2015' conversation and receive update notifications?

Ask