24#include <linux/videodev2.h>
55 unsigned short constexpr Black = 0x8000;
57 unsigned short constexpr MedGrey = 0x8080;
59 unsigned short constexpr White = 0x80ff;
66 unsigned short constexpr MedTeal = 0x7090;
74 unsigned short constexpr MedPink = 0xff80;
83 unsigned short constexpr Black = 0x0000;
84 unsigned short constexpr Navy = 0x000F;
87 unsigned short constexpr Maroon = 0x7800;
88 unsigned short constexpr Purple = 0x780F;
89 unsigned short constexpr Olive = 0x7BE0;
92 unsigned short constexpr Blue = 0x001F;
93 unsigned short constexpr Green = 0x07E0;
94 unsigned short constexpr Cyan = 0x07FF;
95 unsigned short constexpr Red = 0xF800;
96 unsigned short constexpr Magenta = 0xF81F;
97 unsigned short constexpr Yellow = 0xFFE0;
98 unsigned short constexpr White = 0xFFFF;
99 unsigned short constexpr Orange = 0xFD20;
101 unsigned short constexpr Pink = 0xF618;
126 RawImage(
unsigned int w,
unsigned int h,
unsigned int f,
float fs, std::shared_ptr<VideoBuf> b,
size_t bindex);
143 void require(
char const * info,
unsigned int w,
unsigned int h,
unsigned int f)
const;
149 std::shared_ptr<VideoBuf>
buf;
162 template <
typename T>
166 template <
typename T>
172#include <jevois/Image/details/RawImageImpl.H>
A raw image as coming from a V4L2 Camera and/or being sent out to a USB Gadget.
float fps
Programmed frames/s as given by current video mapping, may not be actual.
bool coordsOk(int x, int y) const
Helper function to check that coords are within image bounds.
unsigned int fmt
Pixel format as a V4L2_PIX_FMT_XXX.
size_t bufindex
The index of the data buffer in the kernel driver.
RawImage()
Default constructor, uninitialized.
unsigned int bytesize() const
Helper function to get the total number of bytes in the RawImage, i.e., width * height * bytesperpix(...
void invalidate()
Invalidate the image by zero'ing out the pointer to pixel buffer and the dims and format.
T const * pixels() const
Shortcut access to pixels, read-only.
T * pixelsw()
Shortcut access to pixels, read-write.
unsigned int width
Image width in pixels.
unsigned int bytesperpix() const
Helper function to get the number of bytes/pixel given the RawImage pixel format.
unsigned int height
Image height in pixels.
void require(char const *info, unsigned int w, unsigned int h, unsigned int f) const
Require a particular image size and format, issue a fatal error message and throw if no match.
RawImage & operator=(RawImage const &other)=default
Default assignment.
RawImage(RawImage &&other)=default
Default move constructor.
std::shared_ptr< VideoBuf > buf
The pixel data buffer.
void clear()
Clear the pixels to all black.
bool valid() const
Check whether the image has a valid pixel buffer.
RawImage(RawImage const &other)=default
Default copy constructor.
unsigned short constexpr DarkGrey
RGB565 value for: 128, 128, 128.
unsigned short constexpr LightGrey
RGB565 value for: 192, 192, 192.
unsigned short constexpr Navy
RGB565 value for: 0, 0, 128.
unsigned short constexpr Orange
RGB565 value for: 255, 165, 0.
unsigned short constexpr Green
RGB565 value for: 0, 255, 0.
unsigned short constexpr Yellow
RGB565 value for: 255, 255, 0.
unsigned short constexpr DarkGreen
RGB565 value for: 0, 128, 0.
unsigned short constexpr White
RGB565 value for: 255, 255, 255.
unsigned short constexpr Blue
RGB565 value for: 0, 0, 255.
unsigned short constexpr Pink
RGB565 value for: F4 C2 C2.
unsigned short constexpr Purple
RGB565 value for: 128, 0, 128.
unsigned short constexpr Cyan
RGB565 value for: 0, 255, 255.
unsigned short constexpr DarkCyan
RGB565 value for: 0, 128, 128.
unsigned short constexpr Magenta
RGB565 value for: 255, 0, 255.
unsigned short constexpr Black
RGB565 value for: 0, 0, 0.
unsigned short constexpr Olive
RGB565 value for: 128, 128, 0.
unsigned short constexpr GreenYellow
RGB565 value for: 173, 255, 47.
unsigned short constexpr Maroon
RGB565 value for: 128, 0, 0.
unsigned short constexpr Red
RGB565 value for: 255, 0, 0.
unsigned short constexpr MedPurple
YUYV color value.
unsigned short constexpr Black
YUYV color value.
unsigned short constexpr LightPink
YUYV color value.
unsigned short constexpr White
YUYV color value.
unsigned short constexpr DarkTeal
YUYV color value.
unsigned short constexpr DarkGrey
YUYV color value.
unsigned short constexpr LightTeal
YUYV color value.
unsigned short constexpr MedGreen
YUYV color value.
unsigned short constexpr DarkPink
YUYV color value.
unsigned short constexpr DarkPurple
YUYV color value.
unsigned short constexpr MedGrey
YUYV color value.
unsigned short constexpr DarkGreen
YUYV color value.
unsigned short constexpr LightGreen
YUYV color value.
unsigned short constexpr MedPink
YUYV color value.
unsigned short constexpr LightGrey
YUYV color value.
unsigned short constexpr LightPurple
YUYV color value.
unsigned short constexpr MedTeal
YUYV color value.
Main namespace for all JeVois classes and functions.