2010.02.08 10:47 "[Tiff] fftw and TIFF files", by

2010.02.09 08:16 "Re: [Tiff] FFT on two TIFF images", by

Thanks Andy and Richard, some other people pointed out the possibility of using OpenImageIO. It looks good and I'll give it a try.

I have no experience working with TIFF images at all, but I'll tell you about the context I'm working. I have a program that sends a TIFF Image by fax, on the opposite end, I have another instance of the same program receiving the fax.

So, in the receiving part, I have both, the sent image and the received image. I want to compare them, to see if the line has caused any error. Both images are of course the same size. I have several types of images, some are multipage TIFF.

This is what made me thing about using the correlation to measure the resemblance. Doing the FFT with FFTW looked quite simple, but my lack of experience dealing with images is the main obstacle. I started reading about TIFF and tiles, scanlines, grayscale, rgba... but I didn't really understand many of the concepts... and still don't.

I appreciate all your answers, they've shed some light in the problem :)

-----Mensaje original-----

De: Andy Cave [mailto:andy.cave@hamillroad.com] Enviado el: martes, 09 de febrero de 2010 0:05 Para: Richard Nolde; Tiff Listserve; Gil, Debora, VF-ES (dgilalv) STU Asunto: Re: [Tiff] FFT on two TIFF images

Hi Richard, Debora,

----- Original Message -----

From: "Richard Nolde" <richard.nolde@cybox.com> To: "Tiff Listserve" <tiff@lists.maptools.org>; <debora.gil@vodafone.com> Sent: Monday, February 08, 2010 9:39 PM Subject: [Tiff] FFT on two TIFF images

  1. Fourier Transforms only work if the width of the sample is a power of two, which is pretty unlikely to be the case with faxes. You will need to pad each line out to a power of two with zeros before processing your data with an FFT.

Not true. Modern FFTs can compute FFTs on any sized data and incredibly fast too. The fastest FFTs around that can do that are FFTW (MIT) and MKL (Intel). FFTW is free for non-commercial use, otherwise it costs (but you get source). MKL is a lot cheaper if you want to buy it for commercial use, but you only get object (for one platform unless you purchase multiple licenses).

  1. It has been a long time since I wrote an FFT, so I'm not too sure about this next comment. You may want to check if there is any value in doing an FFT on bilevel images. I think it is more common to do FFTs on grayscale images where the rate of transition from light to dark can vary over a wide area instead of being a simple on/off transition.

You can do a lot of anaylsis by doing FFTs on 1 bit images. Probably things you've not thought of doing though.