1Pambayer User Manual(0) Pambayer User Manual(0)
2
3
4
6 pambayer - interpret Bayer patterns
7
8
10 pambayer -type={1|2|3|4} [-nointerpolate] [pamfile]
11
12 Minimum unique abbreviation of option is acceptable. You may use dou‐
13 ble hyphens instead of single hyphen to denote options. You may use
14 white space in place of the equals sign to separate an option name from
15 its value.
16
17
18
20 This program is part of Netpbm(1).
21
22 pambayer reads a Bayer pattern in a 1-deep Netpbm image and produces a
23 color image in PAM RGB format as output.
24
25 A Bayer pattern is what you get from the optical sensor in some digital
26 cameras. Such a camera doesn't have a red, green, and blue sensor in
27 the exact same place for an individual pixel. Instead, it has red,
28 green, and blue sensors laid out in a two dimensional array. The pat‐
29 tern in which they are laid out is the Bayer pattern. The input to
30 pambayer is one sample value for each of those sensors, so some samples
31 are red, some are green, and some are blue.
32
33 pambayer turns that into a regular visual image with one pixel per sen‐
34 sor. For the two components of each pixel that are missing in the cor‐
35 responding Bayer input, pambayer averages the sample values from the
36 adjacent pixels that do have that component.
37
38 But you can have pambayer fill in black instead (see the -noninterpo‐
39 late option), which gives you a simpler representation of what the cam‐
40 era saw, on which you might do further processing. Such an image still
41 looks right, though considerably dimmer, if you stand far enough away
42 and let your eyes do the interpolation.
43
44 The input image is a pseudo-PNM image (pseudo- because while the struc‐
45 ture is the same, the sample values have different meanings) or PAM
46 image of arbitrary tuple type. pambayer looks at only the first plane
47 of the input.
48
49 The output image is a PAM image of tuple type "RGB", i.e. a standard
50 color image. You can convert this to PPM with pamtopnm(1).
51
52 If you're interested in just one of the primary colors, use pamchannel
53 on the output of pambayer to extract it.
54
55
56
58 -type=n
59 This tells which Bayer pattern the input is:
60
61
62
63 1 GBG/RGR/GBG matrix
64
65 2 RGR/GBG/RGR matrix
66
67 3 BGB/GRG/BGB matrix
68
69 4 GRG/BGB/GRG matrix
70
71
72 This option is mandatory.
73
74
75 -nointerpolate
76 Each output pixel position corresponds to one position in the
77 input Bayer pattern, which means only one of the three color
78 components is supplied by the input. For the other two, this
79 option says to user zero. Without it, pambayer instead interpo‐
80 lates from the adjacent pixels that do have that color compo‐
81 nent.
82
83 This option was new in Netpbm 10.49 (December 2009).
84
85
86
87
88
89
91 cameratopam(1) pam(1)
92
93
95 pambayer was new in Netpbm 10.30 (October 2005).
96
98 This manual page was generated by the Netpbm tool 'makeman' from HTML
99 source. The master documentation is at
100
101 http://netpbm.sourceforge.net/doc/pambayer.html
102
103netpbm documentation 18 August 2005 Pambayer User Manual(0)