YARP
Yet Another Robot Platform
IplImage.cpp File Reference
#include <cstdio>
#include <cstring>
#include <yarp/os/Log.h>
#include <yarp/sig/impl/IplImage.h>
+ Include dependency graph for IplImage.cpp:

Go to the source code of this file.

Functions

bool compareHeader (IplImage *A, IplImage *B)
 
int PAD_BYTES (int len, int pad)
 this might turn out to be useful. More...
 
template<class T >
T * AllocAligned (int size)
 
template<class T >
void FreeAligned (T *ptr)
 
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 iplSetROI (IplROI *roi, 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)
 
int _iplCalcPadding (int lineSize, int align)
 Computes the ipl image padding. More...
 

Variables

static int implemented_yet = 1
 

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 1468 of file IplImage.cpp.

◆ AllocAligned()

template<class T >
T* AllocAligned ( int  size)

((rem != 0) ? (YARP_IMAGE_ALIGN - rem) : 0);

Definition at line 37 of file IplImage.cpp.

◆ compareHeader()

bool compareHeader ( IplImage A,
IplImage B 
)

Definition at line 19 of file IplImage.cpp.

◆ FreeAligned()

template<class T >
void FreeAligned ( T *  ptr)

Definition at line 50 of file IplImage.cpp.

◆ iplAbs()

void iplAbs ( IplImage srcImage,
IplImage dstImage 
)

Definition at line 1237 of file IplImage.cpp.

◆ iplAdd()

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

Definition at line 1012 of file IplImage.cpp.

◆ iplAddS()

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

Definition at line 954 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 663 of file IplImage.cpp.

◆ iplAllocateImageFP()

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

Definition at line 696 of file IplImage.cpp.

◆ iplCloneImage()

IplImage* iplCloneImage ( const IplImage img)

Definition at line 850 of file IplImage.cpp.

◆ iplColorToGray()

void iplColorToGray ( IplImage srcImage,
IplImage dstImage 
)

Definition at line 1314 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 288 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 499 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 391 of file IplImage.cpp.

◆ iplCopy()

void iplCopy ( IplImage srcImage,
IplImage dstImage 
)

Definition at line 881 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 82 of file IplImage.cpp.

◆ iplCreateConvKernelFP()

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

Definition at line 110 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 788 of file IplImage.cpp.

◆ iplCreateROI()

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

Definition at line 1339 of file IplImage.cpp.

◆ iplDeallocate()

void iplDeallocate ( IplImage image,
int  flag 
)

Definition at line 902 of file IplImage.cpp.

◆ iplDeallocateHeader()

void iplDeallocateHeader ( IplImage image)

delete[] image->imageData;

Definition at line 887 of file IplImage.cpp.

◆ iplDeallocateImage()

void iplDeallocateImage ( IplImage image)

delete[] image->imageData;

Definition at line 733 of file IplImage.cpp.

◆ iplDeleteConvKernel()

void iplDeleteConvKernel ( IplConvKernel kernel)

Definition at line 153 of file IplImage.cpp.

◆ iplDeleteConvKernelFP()

void iplDeleteConvKernelFP ( IplConvKernelFP kernel)

Definition at line 162 of file IplImage.cpp.

◆ iplGetConvKernel()

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

Definition at line 127 of file IplImage.cpp.

◆ iplGetConvKernelFP()

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

Definition at line 141 of file IplImage.cpp.

◆ iplHSV2RGB()

void iplHSV2RGB ( IplImage hsvImage,
IplImage rgbImage 
)

Definition at line 1453 of file IplImage.cpp.

◆ iplMultiplySFP()

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

Definition at line 1222 of file IplImage.cpp.

◆ iplRGB2HSV()

void iplRGB2HSV ( IplImage rgbImage,
IplImage hsvImage 
)

Definition at line 1355 of file IplImage.cpp.

◆ iplSet()

void iplSet ( IplImage image,
int  fillValue 
)

Definition at line 935 of file IplImage.cpp.

◆ iplSetBorderMode()

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

Definition at line 924 of file IplImage.cpp.

◆ iplSetFP()

void iplSetFP ( IplImage image,
float  fillValue 
)

Definition at line 942 of file IplImage.cpp.

◆ iplSetROI()

void iplSetROI ( IplROI roi,
int  coi,
int  xOffset,
int  yOffset,
int  width,
int  height 
)

Definition at line 1348 of file IplImage.cpp.

◆ iplSubtract()

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

Definition at line 1086 of file IplImage.cpp.

◆ iplSubtractS()

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

Definition at line 1159 of file IplImage.cpp.

◆ iplThreshold()

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

Definition at line 1270 of file IplImage.cpp.

◆ iplXorS()

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

Definition at line 1460 of file IplImage.cpp.

◆ PAD_BYTES()

int PAD_BYTES ( int  len,
int  pad 
)
inline

this might turn out to be useful.

Definition at line 30 of file IplImage.cpp.

Variable Documentation

◆ implemented_yet

int implemented_yet = 1
static

Definition at line 16 of file IplImage.cpp.