[SciPy-User] Image with black points

Bruno George bgeorge98121 at gmail.com
Tue Apr 26 22:10:32 EDT 2011


Hi,
You know the two images are mirroring (flopped) to each other?

Bruno George

On Mon, Apr 25, 2011 at 10:15 AM, Zachary Pincus <zachary.pincus at yale.edu>wrote:

> On Apr 24, 2011, at 10:22 PM, Paulo Henrique Junqueira Amorim wrote:
>
> > Hi,
> >
> > I'm computing the 1D fft from image, and saving the image of
> > frequency.
> >
> > But the saved image appears black point's (example image), it seems
> > that do not belong.
> >
> > Is this correct? How could I remove it?
> >
> > Example image - http://img818.imageshack.us/i/fftthreshold.png/
> >
> > Code:
> >
> > import scipy
> > import numpy
> >
> > r = scipy.misc.pilutil.imread('face.jpg', 'F')
> >
> > fft = numpy.fft.fftshift(numpy.fft.fft(r).real)
> > fft_2d = numpy.log10(numpy.abs(fft))
> > pil_array = scipy.misc.pilutil.toimage(fft_2d)
> >
> > scipy.misc.pilutil.imsave('fft.tif', pil_array)
> >
>
> If you could provide the input image that would be helpful for people
> trying to determine what the issue is.
>
> As a stab in the dark -- have you checked (from python) what the
> values of at the "black points" are? Are they NaNs? (Perhaps from the
> log10 operation?)
>
> Zach
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20110426/7cf8fea1/attachment.html>


More information about the SciPy-User mailing list