VisionCpp  0.0.1
Classes | Namespaces | Macros | Typedefs
pixel.hpp File Reference

This file contains definition of underlying pixel types used in VisionCpp. More...

#include "../framework/tools/tuple.hpp"
Include dependency graph for pixel.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  visioncpp::internal::AssignValueToArray< conds, K, PixelType, Params >
 
struct  visioncpp::internal::AssignValueToArray< false, K, PixelType, Params... >
 
struct  visioncpp::pixel::Storage< LHSScalar, Channels >
 

Namespaces

 visioncpp
 VisionCpp namespace.
 
 visioncpp::internal
 Internal implementations.
 
 visioncpp::pixel
 Contains VisionCpp pixel type definitions.
 

Macros

#define REGISTER_OPERATORS(Op, T)
 

Typedefs

typedef Storage< float, 1 > visioncpp::pixel::F32C1
 
typedef Storage< float, 2 > visioncpp::pixel::F32C2
 
typedef Storage< float, 3 > visioncpp::pixel::F32C3
 
typedef Storage< float, 4 > visioncpp::pixel::F32C4
 
typedef Storage< unsigned char, 1 > visioncpp::pixel::U8C1
 
typedef Storage< unsigned char, 2 > visioncpp::pixel::U8C2
 
typedef Storage< unsigned char, 3 > visioncpp::pixel::U8C3
 
typedef Storage< unsigned char, 4 > visioncpp::pixel::U8C4
 

Detailed Description

This file contains definition of underlying pixel types used in VisionCpp.

Generic form of the pixel is as follow:
{F/U/S}{SIZE_OF_CHANNEL}C{NUMBER_OF_CHANNELS}
F32C4 - represents float[4]
U8C3 - represents unsigned char[3]

Definition in file pixel.hpp.

Macro Definition Documentation

◆ REGISTER_OPERATORS

#define REGISTER_OPERATORS (   Op,
 
)
Value:
template <typename RHSScalar> \
T &operator Op##=(const RHSScalar &val) { \
for (int i = 0; i < elements; i++) { \
m_data[i] Op## = val; \
} \
return *this; \
} \
T &operator Op##=(const T &val) { \
for (int i = 0; i < elements; i++) { \
m_data[i] Op## = val[i]; \
} \
return *this; \
} \
friend T operator Op(T lhs, const T &rhs) { \
for (int i = 0; i < elements; i++) { \
lhs[i] Op## = rhs[i]; \
} \
return lhs; \
}

Definition at line 55 of file pixel.hpp.