1 #ifndef CVD_CONVERT_IMAGE_H 2 #define CVD_CONVERT_IMAGE_H 5 #include <cvd/internal/convert_pixel_types.h> 6 #include <cvd/internal/rgb_components.h> 14 template <class From, class To, class Conv = typename Pixel::DefaultConversion<From, To>::type,
int both_pod = std::is_trivially_copyable<From>::value&& std::is_trivially_copyable<To>::value>
19 for(
int r = 0; r < from.
size().y; r++)
30 for(
int y = 0; y < from.
size().y; y++)
31 memcpy(to[y], from[y], from.
size().x *
sizeof(T));
41 template <
class Conv,
class C,
class D>
49 template <
template <
class From,
class To>
class Conv,
class C,
class D>
57 template <
class C,
class D>
71 template <
class D,
class Conv,
class C>
75 convert_image<Conv>(from, to);
79 template <
class D,
template <
class From,
class To>
class Conv,
class C>
83 convert_image<Conv>(from, to);
92 template <
class D,
class C>
109 template <
class D1,
class D2,
class C>
118 #ifndef DOXYGEN_IGNORE_INTERNAL 167 template <
class In,
class Out>
178 template <
class In,
class Out>
185 template <
class InOut>
188 static const bool is = 1;
Can two types be converted with CVD::convert_image?
Definition: convert_image.h:170
A colour consisting of red, green and blue components.
Definition: rgb.h:25
All classes and functions are within the CVD namespace.
Definition: argb.h:6
ImageRef size() const
What is the size of this image?
Definition: image.h:557
void resize(const ImageRef &size)
Resize the image (destroying the data).
Definition: image.h:731
Definition: convert_image.h:122
All pixel types which are DefaultConvertible can be converted freely from one to another.
Definition: convert_pixel_types.h:464
Definition: convert_image.h:15
unsigned char byte
An 8-bit datatype.
Definition: byte.h:8
A generic image class to manage a block of arbitrarily padded data as an image.
Definition: image.h:273
void convert_image(const BasicImage< bayer_bggr > &from, BasicImage< byte > &to)
Convert Bayer pattern of various forms to greyscale data.
Definition: convert_pixel_types.h:441
A full image which manages its own data.
Definition: image.h:623
std::pair< Image< D1 >, Image< D2 > > convert_image_pair(const BasicImage< C > &from)
Convert an image from one type to another using the default, returning a pair of images.
Definition: convert_image.h:110
Input images have incompatible dimensions.
Definition: image.h:42
Can individual pixels of two types be converted with ConvertPixels::convert()? E.g.
Definition: convert_image.h:179