JeVois
1.20
JeVois Smart Embedded Machine Vision Toolkit
|
Share this page: |
|
|
|
|
|
|
Go to the documentation of this file.
24 #include <linux/videodev2.h>
55 static unsigned short const Black = 0x8000;
56 static unsigned short const DarkGrey = 0x8050;
57 static unsigned short const MedGrey = 0x8080;
58 static unsigned short const LightGrey = 0x80a0;
59 static unsigned short const White = 0x80ff;
61 static unsigned short const DarkGreen = 0x0000;
62 static unsigned short const MedGreen = 0x0040;
63 static unsigned short const LightGreen = 0x00ff;
65 static unsigned short const DarkTeal = 0x7070;
66 static unsigned short const MedTeal = 0x7090;
67 static unsigned short const LightTeal = 0x70b0;
69 static unsigned short const DarkPurple = 0xa030;
70 static unsigned short const MedPurple = 0xa050;
71 static unsigned short const LightPurple = 0xa080;
73 static unsigned short const DarkPink = 0xff00;
74 static unsigned short const MedPink = 0xff80;
75 static unsigned short const LightPink = 0xffff;
83 static unsigned short const Black = 0x0000;
84 static unsigned short const Navy = 0x000F;
85 static unsigned short const DarkGreen = 0x03E0;
86 static unsigned short const DarkCyan = 0x03EF;
87 static unsigned short const Maroon = 0x7800;
88 static unsigned short const Purple = 0x780F;
89 static unsigned short const Olive = 0x7BE0;
90 static unsigned short const LightGrey = 0xC618;
91 static unsigned short const DarkGrey = 0x7BEF;
92 static unsigned short const Blue = 0x001F;
93 static unsigned short const Green = 0x07E0;
94 static unsigned short const Cyan = 0x07FF;
95 static unsigned short const Red = 0xF800;
96 static unsigned short const Magenta = 0xF81F;
97 static unsigned short const Yellow = 0xFFE0;
98 static unsigned short const White = 0xFFFF;
99 static unsigned short const Orange = 0xFD20;
100 static unsigned short const GreenYellow = 0xAFE5;
101 static unsigned short const Pink = 0xF81F;
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>
const T * pixels() const
Shortcut access to pixels, read-only.
unsigned int bytesperpix() const
Helper function to get the number of bytes/pixel given the RawImage pixel format.
void clear()
Clear the pixels to all black.
RawImage & operator=(RawImage const &other)=default
Default assignment.
unsigned int bytesize() const
Helper function to get the total number of bytes in the RawImage, i.e., width * height * bytesperpix(...
A raw image as coming from a V4L2 Camera and/or being sent out to a USB Gadget.
size_t bufindex
The index of the data buffer in the kernel driver.
float fps
Programmed frames/s as given by current video mapping, may not be actual.
bool valid() const
Check whether the image has a valid pixel buffer.
void invalidate()
Invalidate the image by zero'ing out the pointer to pixel buffer and the dims and format.
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.
unsigned int width
Image width in pixels.
T * pixelsw()
Shortcut access to pixels, read-write.
unsigned int height
Image height in pixels.
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.
std::shared_ptr< VideoBuf > buf
The pixel data buffer.
RawImage()
Default constructor, uninitialized.