Sample Batch Listing
This is a sample batch listing that runs under the VICAR image processing
system developed at Jet Propulsion Laboratory over the past thirty years.
Following the listing is a line-by-line explaination.
1. procedure
2.
3. body
4.
5. ! Victoria Harbor, Hong Kong compressed SPOT image
6.
7. label-cre vicr.raw viccir0.r nl=844 ns=700 'byte
8. label-cre vicg.raw viccir0.g nl=844 ns=700 'byte
9. label-cre vicb.raw viccir0.b nl=844 ns=700 'byte
10. dcl copy viccir0.g vicnat0.red
11. f2 (viccir0.b viccir0.r) vicnat0.gre func="(in1*0.75)+(in2*0.25)"
12. f2 (viccir0.b viccir0.r) vicnat0.blu func="(in1*0.75)-(in2*0.25)"
13. vtiff-fromvic (vicnat0.red vicnat0.gre vicnat0.blu) vicnat0.tif
14.
15. end-proc
- Lines 1, 3, and 15 are required lines in a VICAR batch
job.
- Line 5 is a comment.
- Lines 7, 8, and 9 create a VICAR label on each of the
three input images, (red, green, and blue). The parameters indicate
the number of lines, number of samples, and number of bits per pixel.
- Line 13 converts a red, green, and blue VICAR image into TIFF
format.
- Line 10 copies the green input image to the red output image.
- Line 11 performs image math on the blue and red input image to
produce the green output image. This step takes 75% of the blue
input pixel value and adds to it 25% if the red input pixel
value.
- Line 12 also performs image math on the on the blue and red
input image to produce the blue output image. This step takes 75% of
the blue input pixel value and subtracts 25% of the red input
image pixel value.