JeVois  1.5
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...
 
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...
 

Function Documentation

◆ hFlipYUYV()

void jevois::rawimage::hFlipYUYV ( RawImage img)

Flip a YUYV RawImage horizontally while preserving color information.

This function is to allow one to use JeVois with the PhotoBooth app on a Mac, whih flips the image horizontally (about the vertical axis). Only YUYV pixels are supported. You might be able to use cv::flip() from OpenCV instead with other pixel types.

Definition at line 1278 of file RawImageOps.C.

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

Referenced by BOOST_PYTHON_MODULE().