[Image-SIG] Saving 16bit tiffs
scott.rifkin at yale.edu
Sun Feb 15 17:05:19 EST 2004
I am trying to do the following:
1) read a 16-bit tiff image
2) extract a rectangle from it
3) do a two-dimensional Fourier transform on the extracted rectangle-I do
this by the getdata function, reshaping it into a Numeric array, and
calling fft2d on it.
4) remove some of the lower frequency contribution
5) take the inverse Fourier transform
6)paste that back into the original image
7) save the image as a 16-bit tiff to a new file
I've narrowed down one problem to step 6.
Here's the code skipping the fft stuff (I might ask about that in a
future post). This just reads the image, crops it, gets the data, puts
the data back, pastes it back, and saves it to a different file.
cr=im.crop(tuple(bound)) #bound is a 4 tuple with the rectangle coords
when i run it, the three print statements come out as:
something weird has happened in the putdata part.
thanks in advance for any help,
More information about the Image-SIG