YARP
Yet Another Robot Platform
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 <yarp/sig/impl/DeBayer.h>
#include <cstdio>
#include <cstring>
#include <string>
+ 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. More...
 

Variables

const pixelTypeIplParams iplPixelTypeMono {1, 8 , "GRAY", "GRAY"}
 
const pixelTypeIplParams iplPixelTypeMono16 {1, 16 , "GRAY", "GRAY"}
 
const std::map< int, pixelTypeIplParamspixelCode2iplParams
 

Macro Definition Documentation

◆ DBGPF1

#define DBGPF1   if (0)

Definition at line 36 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 48 of file Image.cpp.

Variable Documentation

◆ iplPixelTypeMono

const pixelTypeIplParams iplPixelTypeMono {1, 8 , "GRAY", "GRAY"}

Definition at line 302 of file Image.cpp.

◆ iplPixelTypeMono16

const pixelTypeIplParams iplPixelTypeMono16 {1, 16 , "GRAY", "GRAY"}

Definition at line 303 of file Image.cpp.

◆ pixelCode2iplParams

const std::map<int, pixelTypeIplParams> pixelCode2iplParams
Initial value:
= {
{VOCAB_PIXEL_ENCODING_BAYER_GRBG8, iplPixelTypeMono},
{VOCAB_PIXEL_ENCODING_BAYER_BGGR8, iplPixelTypeMono},
{VOCAB_PIXEL_ENCODING_BAYER_GBRG8, iplPixelTypeMono},
{VOCAB_PIXEL_ENCODING_BAYER_RGGB8, iplPixelTypeMono},
{VOCAB_PIXEL_YUV_420, iplPixelTypeMono},
{VOCAB_PIXEL_YUV_444, iplPixelTypeMono},
{VOCAB_PIXEL_YUV_422, iplPixelTypeMono},
{VOCAB_PIXEL_YUV_411, iplPixelTypeMono},
{VOCAB_PIXEL_ENCODING_BAYER_GRBG16, iplPixelTypeMono16},
{VOCAB_PIXEL_ENCODING_BAYER_BGGR16, iplPixelTypeMono16},
{VOCAB_PIXEL_ENCODING_BAYER_GBRG16, iplPixelTypeMono16},
{VOCAB_PIXEL_ENCODING_BAYER_RGGB16, iplPixelTypeMono16},
{VOCAB_PIXEL_RGB, {3, 8 , "RGB", "RGB" }},
{VOCAB_PIXEL_RGBA, {4, 8 , "RGBA", "RGBA"}},
{VOCAB_PIXEL_BGRA, {4, 8 , "BGRA", "BGRA"}},
{VOCAB_PIXEL_INT, {1, (int)( 0x80000000 |32) , "GRAY", "GRAY"}},
{VOCAB_PIXEL_HSV, {3, 8 , "HSV", "HSV" }},
{VOCAB_PIXEL_BGR, {3, 8 , "RGB", "BGR" }},
{VOCAB_PIXEL_MONO_SIGNED, {1, (int)( 0x80000000 | 8) , "GRAY", "GRAY"}},
{VOCAB_PIXEL_RGB_INT, {3, (int)( 0x80000000 |32) , "RGB", "RGB" }},
{VOCAB_PIXEL_MONO_FLOAT, {1, 32 , "GRAY", "GRAY"}},
{VOCAB_PIXEL_RGB_FLOAT, {3, 32 , "RGB", "RGB" }},
{-2, iplPixelTypeMono16},
{-4, {1, (int)( 0x80000000 |32) , "GRAY", "GRAY"}}
}
const pixelTypeIplParams iplPixelTypeMono
Definition: Image.cpp:302
const pixelTypeIplParams iplPixelTypeMono16
Definition: Image.cpp:303

Definition at line 305 of file Image.cpp.