DSPRelated.com
Forums

inversie filtering?

Started by walala November 1, 2003
Dear all,

I have an image and had been processed by a certain filter(I sort of can
guess the filter out)

how can I inverse that process and restore the original image?

Thanks a lot,

Michael.



walala wrote:

> Dear all, > > I have an image and had been processed by a certain filter(I sort of can > guess the filter out) > > how can I inverse that process and restore the original image? > > Thanks a lot, > > Michael.
There is no direct reverse of convolution, but convolution in the spacial domain amounts to multiplication in the (2D) frequency domain. So FFT the altered image, divide that by the FFT of the guessed-at filter's impulse response, then IFFT. There are limits, of course: dividing by small numbers makes things blow up. See Smith's "Scientist and Engineer's Guide ..." for more detail. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Jerry Avins wrote:
> walala wrote: > >> Dear all, >> >> I have an image and had been processed by a certain filter(I sort of can >> guess the filter out) >> >> how can I inverse that process and restore the original image? >> >> Thanks a lot, >> >> Michael. > > > There is no direct reverse of convolution, but convolution in the > spacial domain amounts to multiplication in the (2D) frequency domain. > So FFT the altered image, divide that by the FFT of the guessed-at > filter's impulse response, then IFFT. There are limits, of course: > dividing by small numbers makes things blow up.
Even worse, if the filter has frequency response zero at some frequency(ies), then it is not possible to recover the original image (in the general case -- of course, for some particular signals that happen to have no spectral contents at those frequencies, then no problem). In those cases (I guess you're talking about estimating an image from a blurr photograph, or a photograph in which the camera moved, and thus the image shows motion-blurr -- the filter in those cases does completely eliminate some frequencies), what you do is as Jerry suggests, but putting a limit to the gain of your inverse filter. A practical limit is often given by the signal-to-noise ratio of your system; if your image was digitized with 8-bits of resoution, then there is no point in trying to amplify more than 256 times; you'll be amplifying just noise). I'm not sure if the actual practical limit is exactly the S/N ratio (it sounds reasonable that the limit you impose should be less than that, but I'm not 100% sure... Maybe a bit of trial and error would help -- that, or try to find the details in an Image Processing reference) HTH, Carlos -- Carlos --
inverse modeling is still an open problem. it helps if u have more than one
image that underwent the same filtering operation. then it may be possible
to design an inverse filter (provided it exists) with a few practical
constraints. if u need more info on onverse modeling, i'd be happy to
explain in detail.

if u have only one image, don't even try for modeling...
i'm not sure about the idea of dividing it by the fft thing.. i guess u r
trying to "whiten" the image, which may not provide the best result. usually
a bag of tricks like histogram equalization, edge sharpening etc are used,
which u can find in any standard image processing textbook

hope this helps
ganesan.
research associate
university of florida.

"Carlos Moreno" <moreno_at_mochima_dot_com@x.xxx> wrote in message
news:ceTob.64719$zH1.1451138@weber.videotron.net...
> Jerry Avins wrote: > > walala wrote: > > > >> Dear all, > >> > >> I have an image and had been processed by a certain filter(I sort of
can
> >> guess the filter out) > >> > >> how can I inverse that process and restore the original image? > >> > >> Thanks a lot, > >> > >> Michael. > > > > > > There is no direct reverse of convolution, but convolution in the > > spacial domain amounts to multiplication in the (2D) frequency domain. > > So FFT the altered image, divide that by the FFT of the guessed-at > > filter's impulse response, then IFFT. There are limits, of course: > > dividing by small numbers makes things blow up. > > Even worse, if the filter has frequency response zero at some > frequency(ies), then it is not possible to recover the original > image (in the general case -- of course, for some particular > signals that happen to have no spectral contents at those > frequencies, then no problem). > > In those cases (I guess you're talking about estimating an > image from a blurr photograph, or a photograph in which the > camera moved, and thus the image shows motion-blurr -- the > filter in those cases does completely eliminate some > frequencies), what you do is as Jerry suggests, but putting > a limit to the gain of your inverse filter. A practical > limit is often given by the signal-to-noise ratio of your > system; if your image was digitized with 8-bits of resoution, > then there is no point in trying to amplify more than 256 > times; you'll be amplifying just noise). > > I'm not sure if the actual practical limit is exactly the > S/N ratio (it sounds reasonable that the limit you impose > should be less than that, but I'm not 100% sure... Maybe > a bit of trial and error would help -- that, or try to > find the details in an Image Processing reference) > > HTH, > > Carlos > -- > > > Carlos > -- >