Image processing using the frequency domain - duplicate image

I need to understand the way this picture can be fixed
need to get only one instance of the dog.
This is what we have learned :
  1. low pass filter
  2. high pass filter
  3. homomorphic filter
is there any way using the above to fix the image? I've included the fft image so maybe you can point out the thing I should be seeing that makes the image blurry as it is.
asking for theoretical help mostly , thanks

2 件のコメント

Image Analyst
Image Analyst 2013 年 1 月 19 日
Avoid the problem in the first place. Lay off the caffeine so you can keep the camera still, or train Sean's dog to be more still. ;-)
gromit park
gromit park 2016 年 10 月 13 日
Th right FFT is the result of left image?

サインインしてコメントする。

 採用された回答

Matt J
Matt J 2013 年 1 月 19 日
編集済み: Matt J 2013 年 1 月 19 日

0 投票

If F(k) is the spectrum of the dog, then F(k)*exp(-2*pi*j*dot(t,k)) is the spectrum of the dog translated by t and the spectrum of the blurry dog is their superposition
F(k)*(1+exp(-2*pi*j*dot(t,k)))
I suspect you're being asked to filter out the (1+exp(-2*pi*j*dot(t,k))). You need to know t in order to do so, but t dictates the orientation of the sinusoidal pattern of lines you're seeing in the background in the spectrum you've shown. Some sort of edge/line detection should do it.

10 件のコメント

Despairy
Despairy 2013 年 1 月 20 日
Lets say I get the x y positions of the main dog and the x0 y0 that 2nd dog is in ( f(x+x0,y+y0) )
now this is my result
seems like the right dog, but why is the sudden color change? do i need to multiply by anything? or is the division wrong?
and thank you for your previous answers :)
Image Analyst
Image Analyst 2013 年 1 月 20 日
FYI, for more info on Matt's equation, see equations SF8 and SF9 on this page. But what "color change" are you referring to? It's a monochrome image, isn't it?
Despairy
Despairy 2013 年 1 月 20 日
編集済み: Despairy 2013 年 1 月 20 日
I meant the "clouds" appearing in the image.
or should I use another method after fixing the blur?
edit: I think the result image is not symmetric perhaps?
Matt J
Matt J 2013 年 1 月 20 日
Possibly you haven't used enough zero padding.
Despairy
Despairy 2013 年 1 月 20 日
編集済み: Despairy 2013 年 1 月 20 日
I canceled the padding since it gives me an even worse image.
Here's the code, can't seem to find whats wrong. uncancelling the zero padding gives a bad image with black vertical lines.
thanks again
image :
edit: fftshift ifftshit errors if you want/need/etc the correct code message me ^.^ just preventing spoilers :O zrzwskiiii
Matt J
Matt J 2013 年 1 月 20 日
編集済み: Matt J 2013 年 1 月 20 日
Try getting rid of the ifftshift/fftshift.
Also, this should be
exp(-2*pi*1i*((u-1)*x0/x+(v-1)*y0/y))
Despairy
Despairy 2013 年 1 月 20 日
awesome, any explanation why the fftshift may ruin the operations? from what I know about it, it only moves the 4 pieces around but keeps the correct information.
thanks for all of your help.
Matt J
Matt J 2013 年 1 月 20 日
編集済み: Matt J 2013 年 1 月 20 日
fftshifting wouldn't have been a problem if you had also fftshifted the
(1+exp(-2*pi*1i*((u-1)*x0/x+(v-1)*y0/y)));
Without doing so, you were using different coordinate origins for different spectra.
Image Analyst
Image Analyst 2013 年 1 月 20 日
Have you ever looked at the spectrum without fftshift()? If so, you'll notice the "origin" is at the 4 corners so your filter will have to go out only until the middle of the image and you'll have to flip things around as you process the other 3 quadrants so that their origins are in the same place, then you'll have to unflip then to put their origins back. It might be easier to fftshift your filter, but if you don't you'll have to extract quadrants, call things like flipud(), fliplr() or transpose to get the origin where it needs to be.
Despairy
Despairy 2013 年 1 月 21 日
Yeah, I've looked on every middle phase matrix and just realized that a while back.
Thanks again for everything, D

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeFourier Analysis and Filtering についてさらに検索

質問済み:

2013 年 1 月 19 日

コメント済み:

2016 年 10 月 13 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by