TIFF and LibTiff Mail List Archive


2010.02.08 10:47 "[Tiff] fftw and TIFF files", by
2010.02.09 08:16 "Re: [Tiff] FFT on two TIFF images", by
2010.02.09 09:11 "Re: [Tiff] FFT on two TIFF images", by John
2010.02.09 15:03 "[Tiff] Comparing images to detect transmission errors", by Richard Nolde
2010.02.09 15:39 "Re: [Tiff] FFT on two TIFF images", by Lee Howard
2010.02.09 16:37 "Re: [Tiff] FFT on two TIFF images", by Bob Friesenhahn

2010.02.09 09:11 "Re: [Tiff] FFT on two TIFF images", by John

On 9 February 2010 08:16, Gil, Debora, VF-ES (dgilalv) STU <> wrote:

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

Another possibility might be the vips image processing library (I'm one of the maintainers). It uses libliff and libfftw and has convenient functions for doing various Fourier-domain correlation operations. It has a Python binding, so it's very easy to use.

It's LGPL. The Python binding doesn't currently work on WIndows. It comes with all the major Linux distributions.

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.

I guess there is no paper involved?

If that's the case a very simple solution would be just so subtract the two images and count the non-zeros. You could normalise to the image size and calculate an error rate.

In vips python, that would be:


from vipsCC import *

a = VImage.VImage ("image1.tif")
b = VImage.VImage ("image2.tif")

# average absolute difference

# vips unpacks 1 bit images to 8 bits 0/255, so divide by that avg = (a.subtract (b)).abs ().avg () / 255

# that'll be very small, so display as errors - per - megapixel print 'errors per million pixels:', avg * 1000000