Specifications

Image Creation and Access
4-21
4
CreateROI
Allocates and sets the
region of interest (ROI)
structure.
IplROI* iplCreateROI(int
coi
, int
xOffset
, int
yOffset
,
int
width
, int
height
);
coi
The channel of interest. It can be set to 0 (for all
channels) or to a specific channel number.
xOffset, yOffset
The offsets from the origin of the rectangular
region.
width, height
The size of the rectangular region.
Discussion
The function iplCreateROI() allocates a new ROI structure with the
specified attributes and returns a pointer to this structure. You can delete
this structure by calling
iplDeleteROI().
Return Value
A pointer to the newly constructed ROI structure or NULL.
DeleteROI
Allocates and sets the
region of interest (ROI)
structure.
void iplDeleteROI(IplROI*
roi
);
roi
The ROI structure to be deleted.