ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rcrop.1
Revision: 1.2
Committed: Tue Mar 15 04:41:45 2022 UTC (3 years, 2 months ago) by greg
Branch: MAIN
Changes since 1.1: +12 -2 lines
Log Message:
feat(rcrop): Added support for cropping encoded depth and normal files

File Contents

# User Rev Content
1 greg 1.2 .\" RCSid "$Id: rcrop.1,v 1.1 2022/03/15 00:25:50 greg Exp $"
2 greg 1.1 .TH RCROP 1 3/14/2022 RADIANCE
3     .SH NAME
4     rcrop - crop RADIANCE matrix or picture
5     .SH SYNOPSIS
6     .B "rcrop row0 col0 nrows ncols"
7     [
8     .B input
9     [
10     .B output
11     ]
12     ]
13     .SH DESCRIPTION
14     .I Rcrop
15     copies the indicated section of a matrix or RADIANCE picture.
16     The four required arguments are the initial row (scanline) to copy,
17     the initial column, the number of rows to copy, and the number of columns
18     to include per row.
19     Note that rows are numbered from 0 at the top of a matrix or picture,
20     and columns are changing fastest in the input, which can have any number
21     of components per matrix element.
22     .PP
23     One cannot specify crop boundaries outside the matrix dimension limits.
24     If a 0 value is specified for the number of rows to copy, then all rows
25     will be copied, starting from row0.
26     Similarly, a 0 value for the number of columns to copy implies all
27     columns >= col0 will be copied.
28     .PP
29     Using
30     .I rcrop
31     on a RADIANCE picture rather than
32     .I pcompos(1)
33     corrects the view parameters if present,
34     and preserves the exposure in a way that is compatible with
35     .I evalglare(1).
36     However, one must remember that rows correspond to Y
37     coordinates, and the orientation is reversed from a standard
38     picture, where Y=0 is the bottom scanline.
39     .PP
40 greg 1.2 The
41     .I rcrop
42     tool also works on encoded normal vector files produced by
43     .I rcode_norm(1)
44     and encoded depth files produced by
45     .I rcode_depth(1).
46     However, it is not able to crop identifier files produced by
47     .I rcode_ident(1).
48     .PP
49 greg 1.1 If no input file is given, data will be taken from the standard input.
50     If no output file is specified, data will be copied to the standard output.
51     All matrix formats are supported, including text (ASCII), binary float
52     and double.
53     Data is copied verbatim, i.e., there is no internal conversion to
54     another representation, although white space may change in text files.
55     .SH EXAMPLES
56     To crop a matrix down to 15 rows by 19 columns,
57     starting at row 10 and column 12:
58     .IP "" .2i
59     rcrop 10 12 15 19 input.mtx > output.mtx
60     .PP
61     To extract column 35 from a matrix:
62     .IP "" .2i
63     rcrop 0 35 0 1 orig.mtx > col35.mtx
64     .PP
65     To crop a picture to (X by Y) = (1500 by 1000),
66     starting from upper-left corner:
67     .IP "" .2i
68     rcrop 0 0 1000 1500 orig.hdr cropped.hdr
69     .SH AUTHOR
70     Greg Ward
71     .SH "SEE ALSO"
72 greg 1.2 evalglare(1), pcompos(1), rcalc(1), rcode_depth(1),
73     rcode_ident(1), rcode_norm(1), rcollate(1), rfluxmtx(1), rmtxop(1)