.\" RCSid "$Id: rcrop.1,v 1.1 2022/03/15 00:25:50 greg Exp $" .TH RCROP 1 3/14/2022 RADIANCE .SH NAME rcrop - crop RADIANCE matrix or picture .SH SYNOPSIS .B "rcrop row0 col0 nrows ncols" [ .B input [ .B output ] ] .SH DESCRIPTION .I Rcrop copies the indicated section of a matrix or RADIANCE picture. The four required arguments are the initial row (scanline) to copy, the initial column, the number of rows to copy, and the number of columns to include per row. Note that rows are numbered from 0 at the top of a matrix or picture, and columns are changing fastest in the input, which can have any number of components per matrix element. .PP One cannot specify crop boundaries outside the matrix dimension limits. If a 0 value is specified for the number of rows to copy, then all rows will be copied, starting from row0. Similarly, a 0 value for the number of columns to copy implies all columns >= col0 will be copied. .PP Using .I rcrop on a RADIANCE picture rather than .I pcompos(1) corrects the view parameters if present, and preserves the exposure in a way that is compatible with .I evalglare(1). However, one must remember that rows correspond to Y coordinates, and the orientation is reversed from a standard picture, where Y=0 is the bottom scanline. .PP If no input file is given, data will be taken from the standard input. If no output file is specified, data will be copied to the standard output. All matrix formats are supported, including text (ASCII), binary float and double. Data is copied verbatim, i.e., there is no internal conversion to another representation, although white space may change in text files. .SH EXAMPLES To crop a matrix down to 15 rows by 19 columns, starting at row 10 and column 12: .IP "" .2i rcrop 10 12 15 19 input.mtx > output.mtx .PP To extract column 35 from a matrix: .IP "" .2i rcrop 0 35 0 1 orig.mtx > col35.mtx .PP To crop a picture to (X by Y) = (1500 by 1000), starting from upper-left corner: .IP "" .2i rcrop 0 0 1000 1500 orig.hdr cropped.hdr .SH AUTHOR Greg Ward .SH "SEE ALSO" evalglare(1), pcompos(1), rcalc(1), rcollate(1), rfluxmtx(1), rmtxop(1)