Color filter array (CFA) structure.
More...
#include <ColorFilterArray.h>
ColorFilterArray describes a color filter array (CFA), such as one of the Bayer filters typically used in raw digital camera images.
- See also
- BayerFilterBGGR, BayerFilterGBRG, BayerFilterGRBG, BayerFilterRGGB
Definition at line 82 of file ColorFilterArray.h.
◆ ColorFilterArray() [1/4]
pcl::ColorFilterArray::ColorFilterArray |
( |
const IsoString & |
pattern, |
|
|
int |
width, |
|
|
int |
height, |
|
|
const String & |
name = String() |
|
) |
| |
|
inline |
Constructs a ColorFilterArray object.
- Parameters
-
pattern | A sequence of ASCII characters defining a CFA matrix. Each string character represents an element of the CFA matrix, which can be one of:
0 | A nonexistent or undefined CFA element. |
R | Red |
G | Green |
B | Blue |
W | White or panchromatic |
C | Cyan |
M | Magenta |
Y | Yellow |
The length of this string must be equal to the product of width by height. Otherwise an Error exception will be thrown. An exception will also be thrown if one or more invalid CFA elements are found in pattern. |
width | Horizontal dimension of the CFA matrix in pixels. |
height | Vertical dimension of the CFA matrix in pixels. |
name | An optional string identifying the type or model of CFA that is being described by this object. |
Definition at line 116 of file ColorFilterArray.h.
◆ ColorFilterArray() [2/4]
pcl::ColorFilterArray::ColorFilterArray |
( |
| ) |
|
|
default |
Constructs an empty ColorFilterArray object. An empty CFA has no pattern and zero dimensions.
◆ ColorFilterArray() [3/4]
◆ ColorFilterArray() [4/4]
◆ Element()
char pcl::ColorFilterArray::Element |
( |
int |
x, |
|
|
int |
y |
|
) |
| const |
|
inline |
Returns a copy of the CFA element at the specified x and y coordinates (pixel column and row, respectively). The top-left corner of the CFA is by convention located at coordinates x=y=0.
For a description of valid CFA elements, see the class constructor.
Definition at line 220 of file ColorFilterArray.h.
◆ Height()
int pcl::ColorFilterArray::Height |
( |
| ) |
const |
|
inline |
Returns the vertical dimension of this CFA structure in pixels.
Definition at line 174 of file ColorFilterArray.h.
◆ IsBayerFilter()
bool pcl::ColorFilterArray::IsBayerFilter |
( |
| ) |
const |
|
inline |
Returns true only if this object describes an RGB Bayer filter: BGGR, GRBG, GBRG, or RGGB.
Definition at line 208 of file ColorFilterArray.h.
◆ IsEmpty()
bool pcl::ColorFilterArray::IsEmpty |
( |
| ) |
const |
|
inline |
Returns true only if this is an empty ColorFilterArray object. An empty CFA has no pattern and zero dimensions.
Definition at line 191 of file ColorFilterArray.h.
◆ IsValidCFAElement()
static bool pcl::ColorFilterArray::IsValidCFAElement |
( |
char |
element | ) |
|
|
inlinestatic |
Returns true only if the specified character is a valid element of a CFA pattern specification. For a description of valid CFA elements, see the class constructor.
Definition at line 262 of file ColorFilterArray.h.
◆ Name()
const String& pcl::ColorFilterArray::Name |
( |
| ) |
const |
|
inline |
Returns a reference to the name of this CFA structure.
Definition at line 199 of file ColorFilterArray.h.
◆ NumberOfElements()
int pcl::ColorFilterArray::NumberOfElements |
( |
| ) |
const |
|
inline |
Returns the total number of elements (or pixels) in this CFA structure.
Definition at line 182 of file ColorFilterArray.h.
◆ operator<()
Returns true only if this ColorFilterArray object precedes another object x. This is a lexicographic comparison performed exclusively on the CFA patterns, ignoring matrix dimensions and filter names.
Definition at line 252 of file ColorFilterArray.h.
◆ operator=() [1/2]
Move assignment operator.
◆ operator=() [2/2]
Copy assignment operator.
◆ operator==()
Returns true iff this object represents the same CFA structure as another object x. This operator ignores the Name() components of both objects.
Definition at line 242 of file ColorFilterArray.h.
◆ Pattern()
const IsoString& pcl::ColorFilterArray::Pattern |
( |
| ) |
const |
|
inline |
Returns a reference to the CFA pattern in this object.
Definition at line 158 of file ColorFilterArray.h.
◆ Width()
int pcl::ColorFilterArray::Width |
( |
| ) |
const |
|
inline |
Returns the horizontal dimension of this CFA structure in pixels.
Definition at line 166 of file ColorFilterArray.h.
The documentation for this class was generated from the following file: