IMGREAD Name
IMGREAD Purpose
Read part of a large image. Category
Calling Sequence
out = imgread( x1, y1, [x2, y2]) Inputs
x1 = starting pixel (first=0). in
y1 = starting image line (first=0). in
x2 = optional last pixel. in
y2 = optional last image line. in
Keyword Parameters
Keywords
SS=ss subsample factor for x and y (1=every pixel=def).
XSS=sx subsample factor in x.
YSS=sy subsample factor in y.
NX=nx number of output pixels in x (def=512).
NY=ny number of output pixels in y (def=512).
/REBIN means average pixels instead of subsampling.
The averaged image will appear shifted from the
subsampled image by an amount depending on the number
of pixels averaged. This happens because the subsampled
pixels are from the lower left corner of the averaged
pixels.
VALUE=v value for out-of-range parts of subimage (def=0).
If VALUE is not given then output image is trimmed
to be within the image being read.
ERROR=err error flag.
0: OK, -1: part of subimage falls outside main image.
-2: not open for read, -3: parameter value error.
SHOW=s print a dot after every s lines is read.
/EXAMPLES lists some example calls.
/DEBUG does a debug stop.
Outputs
Common Blocks
img_com
Notes
Notes: Image opened by IMGREAD. Image need not be closed.
If x2, y2 are given they take precedence over NX and NY.
If x2, y2 are given and subsample factor is not 1 then
x2, y2 may not be included in output image.
Modification History
Ray Sterner, 13 Mar, 1991
R. Sterner, 17 Sep, 1991 --- added /REBIN, modified common.
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.