YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
Image.cpp File Reference
#include <yarp/sig/Image.h>
#include <yarp/os/Bottle.h>
#include <yarp/os/ConnectionReader.h>
#include <yarp/os/ConnectionWriter.h>
#include <yarp/os/Log.h>
#include <yarp/os/Time.h>
#include <yarp/os/Vocab.h>
#include <yarp/sig/ImageNetworkHeader.h>
#include <yarp/sig/impl/IplImage.h>
#include <cstdio>
#include <cstring>
#include <string>
#include <utility>
+ Include dependency graph for Image.cpp:

Go to the source code of this file.

Classes

class  ImageStorage
 
struct  pixelTypeIplParams
 

Macros

#define DBGPF1   if (0)
 

Functions

bool readFromConnection (Image &dest, ImageNetworkHeader &header, ConnectionReader &connection)
 This helper function groups code to avoid duplication.
 

Variables

const std::map< int, pixelTypeIplParamspixelCode2iplParams
 

Macro Definition Documentation

◆ DBGPF1

#define DBGPF1   if (0)

Definition at line 33 of file Image.cpp.

Function Documentation

◆ readFromConnection()

bool readFromConnection ( Image dest,
ImageNetworkHeader header,
ConnectionReader connection 
)
inline

This helper function groups code to avoid duplication.

It is not a member function of Image because there are problems with ImageNetworkHeader, anyhow the function is state-less and uses only parameters.

Definition at line 39 of file Image.cpp.

Variable Documentation

◆ pixelCode2iplParams

const std::map<int, pixelTypeIplParams> pixelCode2iplParams
Initial value:
= {
{VOCAB_PIXEL_MONO, {1, 8 }},
{VOCAB_PIXEL_YUV_420, {1, 8 }},
{VOCAB_PIXEL_YUV_444, {1, 8 }},
{VOCAB_PIXEL_YUV_422, {1, 16 }},
{VOCAB_PIXEL_YUV_411, {1, 8 }},
{VOCAB_PIXEL_MONO16, {1, 16 }},
{VOCAB_PIXEL_RGB, {3, 8 ,}},
{VOCAB_PIXEL_RGBA, {4, 8 ,}},
{VOCAB_PIXEL_BGRA, {4, 8 ,}},
{VOCAB_PIXEL_INT, {1, (int)( 0x80000000 |32) }},
{VOCAB_PIXEL_HSV, {3, 8 ,}},
{VOCAB_PIXEL_BGR, {3, 8 ,}},
{VOCAB_PIXEL_MONO_SIGNED, {1, (int)( 0x80000000 | 8) ,}},
{VOCAB_PIXEL_RGB_INT, {3, (int)( 0x80000000 |32) }},
{VOCAB_PIXEL_RGB_FLOAT, {3, 32 }},
{-2, {1, 16 }},
{-4, {1, (int)( 0x80000000 |32) }}
}
@ VOCAB_PIXEL_ENCODING_BAYER_BGGR16
Definition Image.h:59
@ VOCAB_PIXEL_YUV_420
Definition Image.h:64
@ VOCAB_PIXEL_RGBA
Definition Image.h:45
@ VOCAB_PIXEL_INT
Definition Image.h:47
@ VOCAB_PIXEL_MONO16
Definition Image.h:43
@ VOCAB_PIXEL_ENCODING_BAYER_BGGR8
Definition Image.h:58
@ VOCAB_PIXEL_YUV_444
Definition Image.h:65
@ VOCAB_PIXEL_BGRA
Definition Image.h:46
@ VOCAB_PIXEL_MONO_SIGNED
Definition Image.h:50
@ VOCAB_PIXEL_BGR
Definition Image.h:49
@ VOCAB_PIXEL_MONO_FLOAT
Definition Image.h:53
@ VOCAB_PIXEL_ENCODING_BAYER_RGGB8
Definition Image.h:62
@ VOCAB_PIXEL_ENCODING_BAYER_GRBG8
Definition Image.h:56
@ VOCAB_PIXEL_YUV_422
Definition Image.h:66
@ VOCAB_PIXEL_HSV
Definition Image.h:48
@ VOCAB_PIXEL_ENCODING_BAYER_GBRG16
Definition Image.h:61
@ VOCAB_PIXEL_ENCODING_BAYER_GRBG16
Definition Image.h:57
@ VOCAB_PIXEL_RGB_FLOAT
Definition Image.h:54
@ VOCAB_PIXEL_ENCODING_BAYER_GBRG8
Definition Image.h:60
@ VOCAB_PIXEL_MONO
Definition Image.h:42
@ VOCAB_PIXEL_RGB_INT
Definition Image.h:52
@ VOCAB_PIXEL_YUV_411
Definition Image.h:67
@ VOCAB_PIXEL_ENCODING_BAYER_RGGB16
Definition Image.h:63
@ VOCAB_PIXEL_RGB
Definition Image.h:44
A mini-server for performing network communication in the background.

Definition at line 245 of file Image.cpp.