1Pambayer User Manual(0)                                Pambayer User Manual(0)
2
3
4

NAME

6       pambayer - interpret Bayer patterns
7
8

SYNOPSIS

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

DESCRIPTION

19       This program is part of Netpbm(1).
20
21       pambayer reads a Bayer pattern in a 1-deep Netpbm image and produces  a
22       color image in PAM RGB format as output.
23
24       A Bayer pattern is what you get from the optical sensor in some digital
25       cameras.  Such a camera doesn't have a red, green, and blue  sensor  in
26       the  exact  same  place  for an individual pixel.  Instead, it has red,
27       green, and blue sensors laid out in a two dimensional array.  The  pat‐
28       tern  in  which  they  are laid out is the Bayer pattern.  The input to
29       pambayer is one sample value for each of those sensors, so some samples
30       are red, some are green, and some are blue.
31
32       pambayer turns that into a regular visual image with one pixel per sen‐
33       sor.  For the two components of each pixel that are missing in the cor‐
34       responding  Bayer  input,  pambayer averages the sample values from the
35       adjacent pixels that do have that component.
36
37       But you can have pambayer fill in black instead (see  the  -noninterpo‐
38       late option), which gives you a simpler representation of what the cam‐
39       era saw, on which you might do further processing.  Such an image still
40       looks  right,  though considerably dimmer, if you stand far enough away
41       and let your eyes do the interpolation.
42
43       The input image is a pseudo-PNM image (pseudo- because while the struc‐
44       ture  is  the  same,  the sample values have different meanings) or PAM
45       image of arbitrary tuple type.  pambayer looks at only the first  plane
46       of the input.
47
48       The  output  image is a PAM image of tuple type "RGB", i.e.  a standard
49       color image.  You can convert this to PPM with pamtopnm(1).
50
51       If you're interested in just one of the primary colors, use  pamchannel
52       on the output of pambayer to extract it.
53
54
55

OPTIONS

57       In  addition  to  the options common to all programs based on libnetpbm
58       (most notably -quiet, see
59        Common Options ⟨index.html#commonoptions⟩ ), pambayer  recognizes  the
60       following command line options:
61
62
63
64
65       -type=n
66              This tells which Bayer pattern the input is:
67
68
69
70       1      GBG/RGR/GBG matrix
71
72       2      RGR/GBG/RGR matrix
73
74       3      BGB/GRG/BGB matrix
75
76       4      GRG/BGB/GRG matrix
77
78
79              This option is mandatory.
80
81
82       -nointerpolate
83              Each  output  pixel  position corresponds to one position in the
84              input Bayer pattern, which means only one  of  the  three  color
85              components  is  supplied  by the input.  For the other two, this
86              option says to user zero.  Without it, pambayer instead interpo‐
87              lates  from  the  adjacent pixels that do have that color compo‐
88              nent.
89
90              This option was new in Netpbm 10.49 (December 2009).
91
92
93
94
95
96

SEE ALSO

98       cameratopam(1) pam(1)
99
100

HISTORY

102       pambayer was new in Netpbm 10.30 (October 2005).
103

DOCUMENT SOURCE

105       This manual page was generated by the Netpbm tool 'makeman'  from  HTML
106       source.  The master documentation is at
107
108              http://netpbm.sourceforge.net/doc/pambayer.html
109
110netpbm documentation            18 August 2005         Pambayer User Manual(0)
Impressum