Re: making a composite from several images [message #6329] |
Tue, 04 June 1996 00:00 |
boswell
Messages: 7 Registered: October 1994
|
Junior Member |
|
|
gennari@universe.Hawaii.edu (Scott Gennari) writes:
: As an example, I have a series of gif images (4x4 for this example)
: with either 0 or 1 as the value and an additive composite is required
: for all pixels that had the value 1.
:
: n n+1 n+2 n+3 composite output
:
: 01 01 11 00 13
: 00 11 10 01 ... -----> 22
:
: speed isn't a huge concern but how would this be done?
Now this one is absolutely trivial, using the optional 2nd argument to TOTAL.
Place all your GIFs in one big 3D array, like so: IMAGE(4,4,100). Then get
your summed images with a summed=total(image,3).
Jonathan Boswell
FDA/CDRH
|
|
|
Re: making a composite from several images [message #6340 is a reply to message #6329] |
Mon, 03 June 1996 00:00  |
gennari
Messages: 25 Registered: April 1994
|
Junior Member |
|
|
Thanks for the responses to my first inquery. I have one more question
along the same line.
As an example, I have a series of gif images (4x4 for this example)
with either 0 or 1 as the value and an additive composite is required
for all pixels that had the value 1.
n n+1 n+2 n+3 composite output
01 01 11 00 13
00 11 10 01 ... -----> 22
speed isn't a huge concern but how would this be done?
thanks,
Scott
gennari@hawaii.edu
|
|
|
Re: making a composite from several images [message #6346 is a reply to message #6340] |
Sun, 02 June 1996 00:00  |
thompson
Messages: 584 Registered: August 1991
|
Senior Member |
|
|
gennari@universe.Hawaii.edu (Scott Gennari) writes:
> Hi all,
> Could someone outline a simple way to create a composite image from
> serveral images. I have about GIF 100 images, all 200x200 pixels in dimension,
> that have only two values, 0 and 255. I'd like to create a single image that
> shows an accumulation of all pixel location where that particular value (255)
> appeared in all images. Something like below.
> n n+1 composite
> 000 010 010
> 100 001 ..etc. ---> 101
> 101 111 111
> I'm running IDL 4.0.1
> Thanks for any suggestions,
> Scott Gennari
> gennari@Hawaii.Edu
The EQ operator will return either 0 or 1, so you can use that to build up your
image. For example,
COMPOSITE = INTARR(200,200)
FOR I_FILE = 0,99 DO BEGIN
READ_GIF, filename, TEMP
COMPOSITE = COMPOSITE + (TEMP EQ 255B)
ENDFOR
William Thompson
|
|
|