PlusLib
2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
|
A utility class that contains static functions for converting between various pixel encodings. More...
#include <src/PlusCommon/PixelCodec.h>
Static Public Member Functions | |
static void | BGRA32ToRGB24 (int width, int height, unsigned char *s, unsigned char *d) |
static PlusStatus | ConvertToBGR24 (ComponentOrdering outputOrdering, PixelEncoding inputCompression, int width, int height, unsigned char *s, unsigned char *d) |
static PlusStatus | ConvertToGray (int inputCompression, int width, int height, unsigned char *s, unsigned char *d) |
static PlusStatus | ConvertToGray (PixelEncoding inputCompression, int width, int height, unsigned char *s, unsigned char *d) |
static std::string | GetCompressionModeAsString (int inputCompression) |
static std::string | GetCompressionModeAsString (PixelEncoding inputCompression) |
static bool | IsConvertToGraySupported (int inputCompression) |
static bool | IsConvertToGraySupported (PixelEncoding inputCompression) |
static PlusStatus | MJPGToRGB24 (ComponentOrdering outputOrdering, int width, int height, unsigned char *s, unsigned char *d) |
static void | RGB24ToGray (int width, int height, unsigned char *s, unsigned char *d) |
static void | RGBA32ToBGR24 (int width, int height, unsigned char *s, unsigned char *d) |
static void | RGBA32ToGray (int width, int height, unsigned char *s, unsigned char *d) |
static void | RGBA32ToRGB24 (int width, int height, unsigned char *s, unsigned char *d) |
static void | RGBToBGR (int width, int height, unsigned char *s, unsigned char *d) |
static void | YUV422pToGray (int width, int height, unsigned char *s, unsigned char *d) |
static PlusStatus | YUV422pToRGB24 (ComponentOrdering outputOrdering, int width, int height, unsigned char *s, unsigned char *d) |
static void | YUVToRGB_Fast (ComponentOrdering outputOrdering, unsigned char *yuv, unsigned char *rgb) |
A utility class that contains static functions for converting between various pixel encodings.
Definition at line 46 of file PixelCodec.h.
Enumerator | |
---|---|
ComponentOrder_RGB | |
ComponentOrder_RGBA | |
ComponentOrder_BGR |
Definition at line 49 of file PixelCodec.h.
Enumerator | |
---|---|
PixelEncoding_ERROR | |
PixelEncoding_YUY2 | |
PixelEncoding_RGB24 | |
PixelEncoding_BGR24 | |
PixelEncoding_RGBA32 | |
PixelEncoding_MJPG |
Definition at line 56 of file PixelCodec.h.
|
inlinestatic |
Definition at line 260 of file PixelCodec.h.
|
inlinestatic |
Definition at line 197 of file PixelCodec.h.
|
inlinestatic |
Definition at line 146 of file PixelCodec.h.
|
inlinestatic |
Definition at line 169 of file PixelCodec.h.
|
inlinestatic |
Definition at line 103 of file PixelCodec.h.
|
inlinestatic |
Definition at line 120 of file PixelCodec.h.
|
inlinestatic |
Definition at line 67 of file PixelCodec.h.
|
inlinestatic |
Definition at line 83 of file PixelCodec.h.
|
inlinestatic |
Definition at line 375 of file PixelCodec.h.
|
inlinestatic |
Convert from RGB24 to grayscale Note that this method computes the intensity (simple averaging of the RGB components). This is not equivalent with the perceived luminance of color images (e.g., 0.21R + 0.72G + 0.07B or 0.30R + 0.59G + 0.11B)
Definition at line 301 of file PixelCodec.h.
|
inlinestatic |
Definition at line 272 of file PixelCodec.h.
|
inlinestatic |
Convert from RGBA32 to grayscale Note that this method computes the intensity (simple averaging of the RGB components). This is not equivalent with the perceived luminance of color images (e.g., 0.21R + 0.72G + 0.07B or 0.30R + 0.59G + 0.11B)
Definition at line 317 of file PixelCodec.h.
|
inlinestatic |
Definition at line 284 of file PixelCodec.h.
|
inlinestatic |
Definition at line 248 of file PixelCodec.h.
|
inlinestatic |
YUY2 conversion to grayscale. YUY2 coding is typically used for webcams source: http://sundararajana.blogspot.ca/2007/12/yuy2-to-rgb24-conversion.html
Definition at line 443 of file PixelCodec.h.
|
inlinestatic |
YUY2 conversion to RGB24. YUY2 coding is typically used for webcams source: http://sundararajana.blogspot.ca/2007/12/yuy2-to-rgb24-conversion.html
Definition at line 387 of file PixelCodec.h.
|
inlinestatic |
Conversion from YUV to RGB space Uses integer math, which is faster but more complex to read Equivalent with the following floating point math (simpler but slower) int Y = yuv[0] - 16; int U = yuv[1] - 128; int V = yuv[2] - 128;
int R = 1.164*Y + 1.596*V + 0.5; int G = 1.164*Y - 0.813*V - 0.391*U + 0.5; int B = 1.164*Y + 2.018*U + 0.5;
Definition at line 339 of file PixelCodec.h.