JeVois  1.20
JeVois Smart Embedded Machine Vision Toolkit
Share this page:
jevois::rawimage Namespace Reference

Enumerations

enum  Font {
  Font5x7, Font6x10, Font7x13, Font8x13bold,
  Font9x15bold, Font10x20, Font11x22, Font12x22,
  Font14x26, Font15x28, Font16x29, Font20x38
}
 Available fonts for writeText() More...
 

Functions

cv::Mat cvImage (RawImage const &src)
 Create an OpenCV image from the existing RawImage data, sharing the pixel memory rather than copying it. More...
 
cv::Mat convertToCvGray (RawImage const &src)
 Convert RawImage to OpenCV doing color conversion from any RawImage source pixel to OpenCV gray byte. More...
 
cv::Mat convertToCvBGR (RawImage const &src)
 Convert RawImage to OpenCV doing color conversion from any RawImage source pixel to OpenCV BGR byte. More...
 
cv::Mat convertToCvRGB (RawImage const &src)
 Convert RawImage to OpenCV doing color conversion from any RawImage source pixel to OpenCV RGB byte. More...
 
cv::Mat convertToCvRGBA (RawImage const &src)
 Convert RawImage to OpenCV doing color conversion from any RawImage source pixel to OpenCV RGB-A byte. More...
 
void byteSwap (RawImage &img)
 Swap pairs of bytes in a RawImage. More...
 
void paste (RawImage const &src, RawImage &dest, int dx, int dy)
 Paste an image within another of same pixel type. More...
 
void pasteGreyToYUYV (cv::Mat const &src, RawImage &dest, int dx, int dy)
 Paste a grey byte image into a YUYV image. More...
 
void pasteBGRtoYUYV (cv::Mat const &src, RawImage &dst, int dx, int dy)
 Paste a BGR byte image into a YUYV image. More...
 
void pasteRGBtoYUYV (cv::Mat const &src, RawImage &dst, int dx, int dy)
 Paste a RGB byte image into a YUYV image. More...
 
void roipaste (RawImage const &src, int x, int y, unsigned int w, unsigned int h, RawImage &dest, int dx, int dy)
 Paste an ROI from an image to within another of same pixel type. More...
 
void drawDisk (RawImage &img, int x, int y, unsigned int rad, unsigned int col)
 Draw a disk in a YUYV image. More...
 
void drawCircle (RawImage &img, int x, int y, unsigned int rad, unsigned int thick, unsigned int col)
 Draw a circle in a YUYV image. More...
 
bool clipLine (int wxmin, int wymin, int wxmax, int wymax, int &x1, int &y1, int &x2, int &y2)
 Clip a line to fit inside a viewport [wxmin...wxmax[ x [wymin...wymax[. More...
 
void drawLine (RawImage &img, int x1, int y1, int x2, int y2, unsigned int thick, unsigned int col)
 Draw a line in a YUYV image. More...
 
void drawRect (RawImage &img, int x, int y, unsigned int w, unsigned int h, unsigned int thick, unsigned int col)
 Draw a rectangle in a YUYV image. More...
 
void drawRect (RawImage &img, int x, int y, unsigned int w, unsigned int h, unsigned int col)
 Draw a rectangle in a YUYV image. More...
 
void drawFilledRect (RawImage &img, int x, int y, unsigned int w, unsigned int h, unsigned int col)
 Draw a filled rectangle in a YUYV image. More...
 
void writeText (RawImage &img, std::string const &txt, int x, int y, unsigned int col, Font font=Font6x10)
 Write some text in an image. More...
 
void writeText (RawImage &img, char const *txt, int x, int y, unsigned int col, Font font=Font6x10)
 Write some text in an image. More...
 
void convertCvBGRtoRawImage (cv::Mat const &src, RawImage &dst, int quality)
 Convert a BGR cv::Mat to RawImage with already-allocated pixels and pixel type. More...
 
void convertCvRGBtoRawImage (cv::Mat const &src, RawImage &dst, int quality)
 Convert a RGB cv::Mat to RawImage with already-allocated pixels and pixel type. More...
 
void convertCvRGBAtoRawImage (cv::Mat const &src, RawImage &dst, int quality)
 Convert an RGBA cv::Mat to RawImage with already-allocated pixels and pixel type. More...
 
void convertCvGRAYtoRawImage (cv::Mat const &src, RawImage &dst, int quality)
 Convert a Gray cv::Mat to RawImage with already-allocated pixels and pixel type. More...
 
void unpackCvRGBAtoGrayRawImage (cv::Mat const &src, RawImage &dst)
 Split an RGBA cv::Mat into a 4x taller grey RawImage with already-allocated pixels. More...
 
void hFlipYUYV (RawImage &img)
 Flip a YUYV RawImage horizontally while preserving color information. More...
 
void convertCvRGBtoCvYUYV (cv::Mat const &src, cv::Mat &dst)
 OpenCV does not provide conversion from RGB to YUYV in cvtColor(), so this function provides it. More...
 
void convertCvBGRtoCvYUYV (cv::Mat const &src, cv::Mat &dst)
 OpenCV does not provide conversion from BGR to YUYV in cvtColor(), so this function provides it. More...
 
void convertCvGRAYtoCvYUYV (cv::Mat const &src, cv::Mat &dst)
 OpenCV does not provide conversion from GRAY to YUYV in cvtColor(), so this function provides it. More...
 
void convertCvRGBAtoCvYUYV (cv::Mat const &src, cv::Mat &dst)
 OpenCV does not provide conversion from RGBA to YUYV in cvtColor(), so this function provides it. More...
 
void convertBayerToYUYV (RawImage const &src, RawImage &dst)
 Convert from Bayer to YUYV, only used internally by Camera class. More...
 
void convertGreyToYUYV (RawImage const &src, RawImage &dst)
 Convert from Grey (monochrome) to YUYV, only used internally by Camera class. More...
 

Function Documentation

◆ convertBayerToYUYV()

void jevois::rawimage::convertBayerToYUYV ( RawImage const &  src,
RawImage dst 
)

Convert from Bayer to YUYV, only used internally by Camera class.

Both src and dst should already have allocated buffers of correct sizes.

Definition at line 1593 of file RawImageOps.C.

References cvImage(), jevois::RawImage::fmt, jevois::RawImage::height, LFATAL, jevois::RawImage::pixelsw(), and jevois::RawImage::width.

Referenced by jevois::CameraDevice::get().

◆ convertGreyToYUYV()

void jevois::rawimage::convertGreyToYUYV ( RawImage const &  src,
RawImage dst 
)

Convert from Grey (monochrome) to YUYV, only used internally by Camera class.

Both src and dst should already have allocated buffers of correct sizes.

Definition at line 1613 of file RawImageOps.C.

References cvImage(), jevois::RawImage::fmt, jevois::RawImage::height, LFATAL, and jevois::RawImage::width.

Referenced by jevois::CameraDevice::get().