{ Macros for importing and averaging uncompressed QuickTime movies captured using VideoSpigot frame grabber and Screenplay software. It is relatively easy to import "None" compressed grayscale quicktime movies into Image. I have written the following macros, the first of which imports large (320x240) quicktime movies rapidly and the second macro can import and average frames while importing any size uncompressed quicktime movie. Thus you can capture the movie at high frame rates from an application supplied with a frame grabber, save it under "None" compression and 256 levels of gray, and import it with frame averaging into Image. These macros are part of a larger set of macros that I wrote for analyzing velocities of moving objects on video (such as actin filaments or sperm). I plan to make the complete set of macros and documentation available as soon my paper using these macros is published. I hope that this is helpful. Any bugs can be reported to Doug Root at UT Austin (ddr@emx.cc.utexas.edu). } macro 'Import 320x240 Quicktime Movie'; { From Doug Root at UT Austin, ddr@emx.cc.utexas.edu Imports a series of 320x240 images contained in a single file, in this case an uncompressed Quicktime movie with an arbitrary number slices. } var offset,i,PicSize,HdrSize,width,height:integer; begin HdrSize:= 0; width:= 320; height:=240; PicSize:=width*height; offset:=HdrSize; SetImport('8-bit'); for I:=1 to 100 do begin {Macro will terminate at eof} SetCustom(width,height,offset); Import(''); offset:=offset+PicSize; end; end; macro 'Import 320x240 Movie to Stack'; var HdrSize,width,height:integer; begin HdrSize:= 0; width:= 320; height:=240; SetImport('8-bit'); SetCustom(width,height,HdrSize,100); Import(''); end; macro 'Average Quicktime Movie'; { Imports and averages an uncompressed Quicktime movie with an arbitrary number slices. Contact ddr@emx.cc.utexas.edu for questions. } var h:integer w:integer a:integer b:integer c:integer d:integer e:integer offset,i,PicSize,HdrSize,width,height:integer; begin HdrSize:= 0; h:=GetNumber('Enter height.',240); w:=GetNumber('Enter width.',320); a:=GetNumber('Frames to Average.',1); b:=GetNumber('Acquision Frequency.',1); width:= w; height:=h; PicSize:=width*height; offset:=HdrSize; SetImport('8-bit'); SetNewSize(width,height); MakeNewStack('AVGstack'); c:=1; d:=c+a-1; e:=c-1; MakeNewStack('AVG'); for I:=c to d do begin offset:=e*PicSize; SetCustom(width,height,offset); Import(''); e:=e+a; SelectAll; Copy; Dispose; SelectWindow('AVG'); AddSlice; Paste; end; SelectWindow('AVG'); ChooseSlice(1); DeleteSlice; AverageSlices; SelectWindow('Average'); SelectAll; Copy; Dispose; SelectWindow('AVG'); Dispose; Paste; c:=c+b; d:=d+b; e:=c-1; for I:=1 to 10000 do begin {Macro will terminate at eof} MakeNewStack('AVG'); for I:=c to d do begin offset:=e*PicSize; SetCustom(width,height,offset); Import(''); e:=e+a; SelectAll; Copy; Dispose; SelectWindow('AVG'); AddSlice; Paste; end; SelectWindow('AVG'); ChooseSlice(1); DeleteSlice; AverageSlices; SelectWindow('Average'); SelectAll; Copy; Dispose; SelectWindow('AVG'); Dispose; AddSlice; Paste; c:=c+b; d:=d+b; e:=c-1; end; end;