Specifications
Image Creation and Access
4-25
4
Example 4-3 Setting the Border Mode for an Image
int example43( void ) {
IplImage *imgh = iplCreateImageHeader( 3,0,IPL_DEPTH_8U,
"RGB", "BGR", IPL_DATA_ORDER_PIXEL, IPL_ORIGIN_TL,
IPL_ALIGN_QWORD, 100, 150, NULL, NULL, NULL, NULL);
if( NULL == imgh ) return 0;
iplSetBorderMode( imgh, IPL_BORDER_REPLICATE, IPL_SIDE_TOP|
IPL_SIDE_BOTTOM | IPL_SIDE_LEFT | IPL_SIDE_RIGHT, 0 );
iplDeallocate( imgh, IPL_IMAGE_HEADER );
return Ipl_StsOk == iplGetErrStatus();
}
CreateTileInfo
Creates the IplTileInfo
structure.
IplTileInfo* iplCreateTileInfo(IplCallBack
callBack
,
void*
id
, int
width
, int
height
);
callBack
The call-back function.
id
The image ID (for application use).
width, height
The tile sizes.
Discussion
The function iplCreateTileInfo() allocates a new IplTileInfo
structure with the specified attributes and returns a pointer to this structure.
To delete this structure, call
iplDeleteTileInfo().
Return Value
The pointer to the created IplTileInfo structure or NULL.