YARP
Yet Another Robot Platform
IplImage.h File Reference
#include <cassert>
#include <cstdlib>
+ Include dependency graph for IplImage.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _IplImage
 
struct  _IplROI
 
struct  _IplConvKernel
 
struct  _IplConvKernelFP
 

Macros

#define HAVE_IPL
 
#define IPL_DEPTH_SIGN   0x80000000
 
#define IPL_DEPTH_1U   1
 
#define IPL_DEPTH_8U   8
 
#define IPL_DEPTH_16U   16
 
#define IPL_DEPTH_32F   32
 
#define IPL_DEPTH_8S   (int)(IPL_DEPTH_SIGN| 8)
 
#define IPL_DEPTH_16S   (int)(IPL_DEPTH_SIGN|16)
 
#define IPL_DEPTH_32S   (int)(IPL_DEPTH_SIGN|32)
 
#define IPL_DATA_ORDER_PIXEL   0
 
#define IPL_DATA_ORDER_PLANE   1
 
#define IPL_ORIGIN_TL   0
 
#define IPL_ORIGIN_BL   1
 
#define IPL_ALIGN_4BYTES   4
 
#define IPL_ALIGN_8BYTES   8
 
#define IPL_ALIGN_16BYTES   16
 
#define IPL_ALIGN_32BYTES   32
 
#define IPL_ALIGN_DWORD   IPL_ALIGN_4BYTES
 
#define IPL_ALIGN_QWORD   IPL_ALIGN_8BYTES
 
#define IPL_IMAGE_HEADER   1
 
#define IPL_IMAGE_DATA   2
 
#define IPL_IMAGE_ROI   4
 
#define IPL_IMAGE_MAGIC_VAL   ((int)sizeof(IplImage))
 
#define IPL_IMAGE_FILE_MAGIC_VAL   112
 
#define IPL_DEPTH_64F
 
#define IPLAPIIMPL(type, name, arg)   extern type name arg
 Definition for functions implemented within YARP_sig. More...
 
#define IPL_BORDER_CONSTANT   0
 
#define IPL_SIDE_TOP_INDEX   0
 
#define IPL_SIDE_BOTTOM_INDEX   1
 
#define IPL_SIDE_LEFT_INDEX   2
 
#define IPL_SIDE_RIGHT_INDEX   3
 
#define IPL_SIDE_TOP   (1<<IPL_SIDE_TOP_INDEX)
 
#define IPL_SIDE_BOTTOM   (1<<IPL_SIDE_BOTTOM_INDEX)
 
#define IPL_SIDE_LEFT   (1<<IPL_SIDE_LEFT_INDEX)
 
#define IPL_SIDE_RIGHT   (1<<IPL_SIDE_RIGHT_INDEX)
 
#define IPL_SIDE_ALL   (IPL_SIDE_RIGHT|IPL_SIDE_TOP|IPL_SIDE_LEFT|IPL_SIDE_BOTTOM)
 
#define IPL_DEPTH_MASK   0x7FFFFFFF
 
#define IPL_IMAGE_HEADER   1
 
#define IPL_IMAGE_DATA   2
 
#define IPL_IMAGE_ROI   4
 
#define IPL_IMAGE_TILE   8
 
#define IPL_IMAGE_MASK   16
 
#define IPL_IMAGE_ALL
 
#define IPL_IMAGE_ALL_WITHOUT_MASK
 
#define IPL_INTER_NN   0
 
#define IPL_INTER_LINEAR   1
 
#define IPL_INTER_CUBIC   2
 
#define IPL_INTER_SUPER   3
 
#define IPL_SMOOTH_EDGE   16
 
#define YARP_IMAGE_ALIGN   8
 

Typedefs

typedef long long int64
 
typedef unsigned long long uint64
 
typedef unsigned char uchar
 
typedef struct _IplImage IplImage
 
typedef struct _IplTileInfo IplTileInfo
 
typedef struct _IplROI IplROI
 
typedef struct _IplConvKernel IplConvKernel
 
typedef struct _IplConvKernelFP IplConvKernelFP
 

Functions

int _iplCalcPadding (int lineSize, int align)
 Computes the ipl image padding. More...
 
IplConvKerneliplCreateConvKernel (int nCols, int nRows, int anchorX, int anchorY, int *values, int nShiftR)
 WARNING: most of this is implemented for PAD_BYTES == 0. More...
 
IplConvKernelFPiplCreateConvKernelFP (int nCols, int nRows, int anchorX, int anchorY, float *values)
 
void iplGetConvKernel (IplConvKernel *kernel, int *nCols, int *nRows, int *anchorX, int *anchorY, int **values, int *nShiftR)
 
void iplGetConvKernelFP (IplConvKernelFP *kernel, int *nCols, int *nRows, int *anchorX, int *anchorY, float **values)
 
void iplDeleteConvKernel (IplConvKernel *kernel)
 
void iplDeleteConvKernelFP (IplConvKernelFP *kernel)
 
void iplConvolve2D (IplImage *srcImage, IplImage *dstImage, IplConvKernel **kernel, int nKernels, int combineMethod)
 
void iplConvolve2DFP (IplImage *srcImage, IplImage *dstImage, IplConvKernelFP **kernel, int nKernels, int combineMethod)
 
void iplConvolveSep2DFP (IplImage *srcImage, IplImage *dstImage, IplConvKernelFP *xKernel, IplConvKernelFP *yKernel)
 
void iplConvolveSep2D (IplImage *srcImage, IplImage *dstImage, IplConvKernel *xKernel, IplConvKernel *yKernel)
 
void iplAllocateImage (IplImage *image, int doFill, int fillValue)
 
void iplAllocateImageFP (IplImage *image, int doFill, float fillValue)
 
void iplDeallocateImage (IplImage *image)
 
IplImageiplCreateImageHeader (int nChannels, int alphaChannel, int depth, char *colorModel, char *channelSeq, int dataOrder, int origin, int align, int width, int height, IplROI *roi, IplImage *maskROI, void *imageId, IplTileInfo *tileInfo)
 
IplImageiplCloneImage (const IplImage *img)
 
void iplCopy (IplImage *srcImage, IplImage *dstImage)
 
void iplDeallocateHeader (IplImage *image)
 
void iplDeallocate (IplImage *image, int flag)
 
void iplSetBorderMode (IplImage *src, int mode, int border, int constVal)
 
void iplSet (IplImage *image, int fillValue)
 
void iplSetFP (IplImage *image, float fillValue)
 
void iplAddS (IplImage *srcImage, IplImage *dstImage, int value)
 
void iplAdd (IplImage *srcImageA, IplImage *srcImageB, IplImage *dstImage)
 
void iplSubtract (IplImage *srcImageA, IplImage *srcImageB, IplImage *dstImage)
 
void iplSubtractS (IplImage *srcImage, IplImage *dstImage, int value, bool flip)
 
void iplMultiplySFP (IplImage *srcImage, IplImage *dstImage, float value)
 
void iplAbs (IplImage *srcImage, IplImage *dstImage)
 
void iplThreshold (IplImage *srcImage, IplImage *dstImage, int threshold)
 
void iplColorToGray (IplImage *srcImage, IplImage *dstImage)
 
IplROIiplCreateROI (int coi, int xOffset, int yOffset, int width, int height)
 
void iplRGB2HSV (IplImage *rgbImage, IplImage *hsvImage)
 
void iplHSV2RGB (IplImage *hsvImage, IplImage *rgbImage)
 
void iplXorS (IplImage *srcImage, IplImage *dstImage, unsigned int value)
 

Macro Definition Documentation

◆ HAVE_IPL

#define HAVE_IPL

Definition at line 24 of file IplImage.h.

◆ IPL_ALIGN_16BYTES

#define IPL_ALIGN_16BYTES   16

Definition at line 75 of file IplImage.h.

◆ IPL_ALIGN_32BYTES

#define IPL_ALIGN_32BYTES   32

Definition at line 76 of file IplImage.h.

◆ IPL_ALIGN_4BYTES

#define IPL_ALIGN_4BYTES   4

Definition at line 73 of file IplImage.h.

◆ IPL_ALIGN_8BYTES

#define IPL_ALIGN_8BYTES   8

Definition at line 74 of file IplImage.h.

◆ IPL_ALIGN_DWORD

#define IPL_ALIGN_DWORD   IPL_ALIGN_4BYTES

Definition at line 78 of file IplImage.h.

◆ IPL_ALIGN_QWORD

#define IPL_ALIGN_QWORD   IPL_ALIGN_8BYTES

Definition at line 79 of file IplImage.h.

◆ IPL_BORDER_CONSTANT

#define IPL_BORDER_CONSTANT   0

Definition at line 283 of file IplImage.h.

◆ IPL_DATA_ORDER_PIXEL

#define IPL_DATA_ORDER_PIXEL   0

Definition at line 67 of file IplImage.h.

◆ IPL_DATA_ORDER_PLANE

#define IPL_DATA_ORDER_PLANE   1

Definition at line 68 of file IplImage.h.

◆ IPL_DEPTH_16S

#define IPL_DEPTH_16S   (int)(IPL_DEPTH_SIGN|16)

Definition at line 64 of file IplImage.h.

◆ IPL_DEPTH_16U

#define IPL_DEPTH_16U   16

Definition at line 60 of file IplImage.h.

◆ IPL_DEPTH_1U

#define IPL_DEPTH_1U   1

Definition at line 58 of file IplImage.h.

◆ IPL_DEPTH_32F

#define IPL_DEPTH_32F   32

Definition at line 61 of file IplImage.h.

◆ IPL_DEPTH_32S

#define IPL_DEPTH_32S   (int)(IPL_DEPTH_SIGN|32)

Definition at line 65 of file IplImage.h.

◆ IPL_DEPTH_64F

#define IPL_DEPTH_64F
Value:
64 /* for storing double-precision
floating point data in IplImage's */

Definition at line 161 of file IplImage.h.

◆ IPL_DEPTH_8S

#define IPL_DEPTH_8S   (int)(IPL_DEPTH_SIGN| 8)

Definition at line 63 of file IplImage.h.

◆ IPL_DEPTH_8U

#define IPL_DEPTH_8U   8

Definition at line 59 of file IplImage.h.

◆ IPL_DEPTH_MASK

#define IPL_DEPTH_MASK   0x7FFFFFFF

Definition at line 295 of file IplImage.h.

◆ IPL_DEPTH_SIGN

#define IPL_DEPTH_SIGN   0x80000000

Definition at line 56 of file IplImage.h.

◆ IPL_IMAGE_ALL

#define IPL_IMAGE_ALL
Value:
IPL_IMAGE_TILE|IPL_IMAGE_ROI|IPL_IMAGE_MASK)
#define IPL_IMAGE_MASK
Definition: IplImage.h:301
#define IPL_IMAGE_ROI
Definition: IplImage.h:299
#define IPL_IMAGE_DATA
Definition: IplImage.h:298
#define IPL_IMAGE_HEADER
Definition: IplImage.h:297

Definition at line 302 of file IplImage.h.

◆ IPL_IMAGE_ALL_WITHOUT_MASK

#define IPL_IMAGE_ALL_WITHOUT_MASK
Value:

Definition at line 304 of file IplImage.h.

◆ IPL_IMAGE_DATA [1/2]

#define IPL_IMAGE_DATA   2

Definition at line 298 of file IplImage.h.

◆ IPL_IMAGE_DATA [2/2]

#define IPL_IMAGE_DATA   2

Definition at line 298 of file IplImage.h.

◆ IPL_IMAGE_FILE_MAGIC_VAL

#define IPL_IMAGE_FILE_MAGIC_VAL   112

Definition at line 157 of file IplImage.h.

◆ IPL_IMAGE_HEADER [1/2]

#define IPL_IMAGE_HEADER   1

Definition at line 297 of file IplImage.h.

◆ IPL_IMAGE_HEADER [2/2]

#define IPL_IMAGE_HEADER   1

Definition at line 297 of file IplImage.h.

◆ IPL_IMAGE_MAGIC_VAL

#define IPL_IMAGE_MAGIC_VAL   ((int)sizeof(IplImage))

Definition at line 152 of file IplImage.h.

◆ IPL_IMAGE_MASK

#define IPL_IMAGE_MASK   16

Definition at line 301 of file IplImage.h.

◆ IPL_IMAGE_ROI [1/2]

#define IPL_IMAGE_ROI   4

Definition at line 299 of file IplImage.h.

◆ IPL_IMAGE_ROI [2/2]

#define IPL_IMAGE_ROI   4

Definition at line 299 of file IplImage.h.

◆ IPL_IMAGE_TILE

#define IPL_IMAGE_TILE   8

Definition at line 300 of file IplImage.h.

◆ IPL_INTER_CUBIC

#define IPL_INTER_CUBIC   2

Definition at line 309 of file IplImage.h.

◆ IPL_INTER_LINEAR

#define IPL_INTER_LINEAR   1

Definition at line 308 of file IplImage.h.

◆ IPL_INTER_NN

#define IPL_INTER_NN   0

Definition at line 307 of file IplImage.h.

◆ IPL_INTER_SUPER

#define IPL_INTER_SUPER   3

Definition at line 310 of file IplImage.h.

◆ IPL_ORIGIN_BL

#define IPL_ORIGIN_BL   1

Definition at line 71 of file IplImage.h.

◆ IPL_ORIGIN_TL

#define IPL_ORIGIN_TL   0

Definition at line 70 of file IplImage.h.

◆ IPL_SIDE_ALL

Definition at line 293 of file IplImage.h.

◆ IPL_SIDE_BOTTOM

#define IPL_SIDE_BOTTOM   (1<<IPL_SIDE_BOTTOM_INDEX)

Definition at line 290 of file IplImage.h.

◆ IPL_SIDE_BOTTOM_INDEX

#define IPL_SIDE_BOTTOM_INDEX   1

Definition at line 286 of file IplImage.h.

◆ IPL_SIDE_LEFT

#define IPL_SIDE_LEFT   (1<<IPL_SIDE_LEFT_INDEX)

Definition at line 291 of file IplImage.h.

◆ IPL_SIDE_LEFT_INDEX

#define IPL_SIDE_LEFT_INDEX   2

Definition at line 287 of file IplImage.h.

◆ IPL_SIDE_RIGHT

#define IPL_SIDE_RIGHT   (1<<IPL_SIDE_RIGHT_INDEX)

Definition at line 292 of file IplImage.h.

◆ IPL_SIDE_RIGHT_INDEX

#define IPL_SIDE_RIGHT_INDEX   3

Definition at line 288 of file IplImage.h.

◆ IPL_SIDE_TOP

#define IPL_SIDE_TOP   (1<<IPL_SIDE_TOP_INDEX)

Definition at line 289 of file IplImage.h.

◆ IPL_SIDE_TOP_INDEX

#define IPL_SIDE_TOP_INDEX   0

Definition at line 285 of file IplImage.h.

◆ IPL_SMOOTH_EDGE

#define IPL_SMOOTH_EDGE   16

Definition at line 311 of file IplImage.h.

◆ IPLAPIIMPL

#define IPLAPIIMPL (   type,
  name,
  arg 
)    extern type name arg

Definition for functions implemented within YARP_sig.

Definition at line 180 of file IplImage.h.

◆ YARP_IMAGE_ALIGN

#define YARP_IMAGE_ALIGN   8

Definition at line 313 of file IplImage.h.

Typedef Documentation

◆ int64

typedef long long int64

Definition at line 35 of file IplImage.h.

◆ IplConvKernel

typedef struct _IplConvKernel IplConvKernel

◆ IplConvKernelFP

◆ IplImage

typedef struct _IplImage IplImage

◆ IplROI

typedef struct _IplROI IplROI

◆ IplTileInfo

typedef struct _IplTileInfo IplTileInfo

Definition at line 40 of file IplImage.h.

◆ uchar

typedef unsigned char uchar

Definition at line 40 of file IplImage.h.

◆ uint64

typedef unsigned long long uint64

Definition at line 36 of file IplImage.h.

Function Documentation

◆ _iplCalcPadding()

int _iplCalcPadding ( int  lineSize,
int  align 
)
inline

Computes the ipl image padding.

Parameters
lineSizethe total length in bytes of the row of the image.
alignis the alignment bytes (e.g. typically 8).
Returns
the number of bytes to add to the line to round with modulo 8.

Definition at line 1489 of file IplImage.cpp.

◆ iplAbs()

void iplAbs ( IplImage srcImage,
IplImage dstImage 
)

Definition at line 1252 of file IplImage.cpp.

◆ iplAdd()

void iplAdd ( IplImage srcImageA,
IplImage srcImageB,
IplImage dstImage 
)

Definition at line 1022 of file IplImage.cpp.

◆ iplAddS()

void iplAddS ( IplImage srcImage,
IplImage dstImage,
int  value 
)

Definition at line 964 of file IplImage.cpp.

◆ iplAllocateImage()

void iplAllocateImage ( IplImage image,
int  doFill,
int  fillValue 
)

yAssert(image->widthStep == image->width * (image->depth & IPL_DEPTH_MASK) / 8 * image->nChannels);

Definition at line 667 of file IplImage.cpp.

◆ iplAllocateImageFP()

void iplAllocateImageFP ( IplImage image,
int  doFill,
float  fillValue 
)

Definition at line 701 of file IplImage.cpp.

◆ iplCloneImage()

IplImage* iplCloneImage ( const IplImage img)

Definition at line 857 of file IplImage.cpp.

◆ iplColorToGray()

void iplColorToGray ( IplImage srcImage,
IplImage dstImage 
)

Definition at line 1332 of file IplImage.cpp.

◆ iplConvolve2D()

void iplConvolve2D ( IplImage srcImage,
IplImage dstImage,
IplConvKernel **  kernel,
int  nKernels,
int  combineMethod 
)

__tmp_res = new char[dstImage->imageSize];

delete[] __tmp_res;

__tmp_res = new char[dstImage->imageSize];

Definition at line 174 of file IplImage.cpp.

◆ iplConvolve2DFP()

void iplConvolve2DFP ( IplImage srcImage,
IplImage dstImage,
IplConvKernelFP **  kernel,
int  nKernels,
int  combineMethod 
)

__tmp_res = new float[dstImage->imageSize / sizeof(float)];

delete[] __tmp_res;

__tmp_res = new float[dstImage->imageSize / sizeof(float)];

Definition at line 290 of file IplImage.cpp.

◆ iplConvolveSep2D()

void iplConvolveSep2D ( IplImage srcImage,
IplImage dstImage,
IplConvKernel xKernel,
IplConvKernel yKernel 
)

__tmp_res = new char[dstImage->imageSize];

delete[] __tmp_res;

__tmp_res = new char[dstImage->imageSize];

Definition at line 503 of file IplImage.cpp.

◆ iplConvolveSep2DFP()

void iplConvolveSep2DFP ( IplImage srcImage,
IplImage dstImage,
IplConvKernelFP xKernel,
IplConvKernelFP yKernel 
)

__tmp_res = new float[dstImage->imageSize / sizeof(float)];

delete[] __tmp_res;

__tmp_res = new float[dstImage->imageSize / sizeof(float)];

Definition at line 395 of file IplImage.cpp.

◆ iplCopy()

void iplCopy ( IplImage srcImage,
IplImage dstImage 
)

Definition at line 888 of file IplImage.cpp.

◆ iplCreateConvKernel()

IplConvKernel* iplCreateConvKernel ( int  nCols,
int  nRows,
int  anchorX,
int  anchorY,
int *  values,
int  nShiftR 
)

WARNING: most of this is implemented for PAD_BYTES == 0.

fixing the functions for != 0 is trivial though.

LATER: externd for PAD_BYTES != 0. NOT TESTED YET!

Definition at line 80 of file IplImage.cpp.

◆ iplCreateConvKernelFP()

IplConvKernelFP* iplCreateConvKernelFP ( int  nCols,
int  nRows,
int  anchorX,
int  anchorY,
float *  values 
)

Definition at line 108 of file IplImage.cpp.

◆ iplCreateImageHeader()

IplImage* iplCreateImageHeader ( int  nChannels,
int  alphaChannel,
int  depth,
char *  colorModel,
char *  channelSeq,
int  dataOrder,
int  origin,
int  align,
int  width,
int  height,
IplROI roi,
IplImage maskROI,
void *  imageId,
IplTileInfo tileInfo 
)

the 8 bytes stuff.

Definition at line 795 of file IplImage.cpp.

◆ iplCreateROI()

IplROI* iplCreateROI ( int  coi,
int  xOffset,
int  yOffset,
int  width,
int  height 
)

Definition at line 1357 of file IplImage.cpp.

◆ iplDeallocate()

void iplDeallocate ( IplImage image,
int  flag 
)

Definition at line 910 of file IplImage.cpp.

◆ iplDeallocateHeader()

void iplDeallocateHeader ( IplImage image)

delete[] image->imageData;

Definition at line 894 of file IplImage.cpp.

◆ iplDeallocateImage()

void iplDeallocateImage ( IplImage image)

delete[] image->imageData;

Definition at line 739 of file IplImage.cpp.

◆ iplDeleteConvKernel()

void iplDeleteConvKernel ( IplConvKernel kernel)

Definition at line 151 of file IplImage.cpp.

◆ iplDeleteConvKernelFP()

void iplDeleteConvKernelFP ( IplConvKernelFP kernel)

Definition at line 161 of file IplImage.cpp.

◆ iplGetConvKernel()

void iplGetConvKernel ( IplConvKernel kernel,
int *  nCols,
int *  nRows,
int *  anchorX,
int *  anchorY,
int **  values,
int *  nShiftR 
)

Definition at line 125 of file IplImage.cpp.

◆ iplGetConvKernelFP()

void iplGetConvKernelFP ( IplConvKernelFP kernel,
int *  nCols,
int *  nRows,
int *  anchorX,
int *  anchorY,
float **  values 
)

Definition at line 139 of file IplImage.cpp.

◆ iplHSV2RGB()

void iplHSV2RGB ( IplImage hsvImage,
IplImage rgbImage 
)

Definition at line 1474 of file IplImage.cpp.

◆ iplMultiplySFP()

void iplMultiplySFP ( IplImage srcImage,
IplImage dstImage,
float  value 
)

Definition at line 1237 of file IplImage.cpp.

◆ iplRGB2HSV()

void iplRGB2HSV ( IplImage rgbImage,
IplImage hsvImage 
)

Definition at line 1373 of file IplImage.cpp.

◆ iplSet()

void iplSet ( IplImage image,
int  fillValue 
)

Definition at line 944 of file IplImage.cpp.

◆ iplSetBorderMode()

void iplSetBorderMode ( IplImage src,
int  mode,
int  border,
int  constVal 
)

Definition at line 932 of file IplImage.cpp.

◆ iplSetFP()

void iplSetFP ( IplImage image,
float  fillValue 
)

Definition at line 951 of file IplImage.cpp.

◆ iplSubtract()

void iplSubtract ( IplImage srcImageA,
IplImage srcImageB,
IplImage dstImage 
)

Definition at line 1097 of file IplImage.cpp.

◆ iplSubtractS()

void iplSubtractS ( IplImage srcImage,
IplImage dstImage,
int  value,
bool  flip 
)

Definition at line 1172 of file IplImage.cpp.

◆ iplThreshold()

void iplThreshold ( IplImage srcImage,
IplImage dstImage,
int  threshold 
)

Definition at line 1286 of file IplImage.cpp.

◆ iplXorS()

void iplXorS ( IplImage srcImage,
IplImage dstImage,
unsigned int  value 
)

Definition at line 1481 of file IplImage.cpp.