Go to the documentation of this file.
52 #ifndef __PCL_ColorFilterArray_h
53 #define __PCL_ColorFilterArray_h
58 #include <pcl/Diagnostics.h>
117 : m_pattern( pattern.Uppercase() )
122 if ( m_width < 1 || m_height < 1 ||
size_type( NumberOfElements() ) != m_pattern.Length() )
123 throw Error(
"Malformed CFA pattern" );
124 for (
auto element : m_pattern )
125 if ( !IsValidCFAElement( element ) )
126 throw Error(
"Invalid CFA pattern \'" + m_pattern +
"\'" );
184 return int( m_pattern.Length() );
193 return m_pattern.IsEmpty();
210 return m_pattern ==
"BGGR" || m_pattern ==
"GRBG" || m_pattern ==
"GBRG" || m_pattern ==
"RGGB";
223 if ( i < m_pattern.Length() )
234 m_width = m_height = 0;
244 return m_pattern == x.m_pattern && m_width == x.m_width && m_height == x.m_height;
254 return m_pattern < x.m_pattern;
264 return strchr(
"0RGBWCMY", element ) !=
nullptr;
345 #endif // __PCL_ColorFilterArray_h
char Element(int x, int y) const
Color filter array (CFA) structure.
GBRG Bayer filter representation.
bool operator==(const Array< T, A > &x1, const Array< T, A > &x2) noexcept
const IsoString & Pattern() const
Eight-bit string (ISO/IEC-8859-1 or UTF-8 string)
GRBG Bayer filter representation.
bool IsBayerFilter() const
int NumberOfElements() const
A simple exception with an associated error message.
const String & Name() const
BGGR Bayer filter representation.
RGGB Bayer filter representation.
static bool IsValidCFAElement(char element)
ColorFilterArray(const IsoString &pattern, int width, int height, const String &name=String())
bool operator<(const Array< T, A > &x1, const Array< T, A > &x2) noexcept