Page 68
get_object_center [Category: Vision]
Format:
point2
get_object_center(
int
channel,
int
object);
Returns the (x, y) center of the given object on the given channel as a
point2
data type.
For example,
point2
cntr;
cntr = get_object_center(0,2);
printf(
"Center: x coord %d y coord %d\n"
, cntr.x, cntr.y);
displays the x and y coordinates of center point of box 2 for channel 0.
get_object_centroid [Category: Vision]
Format:
int
get_object_centroid(
int
channel,
int
object);
Returns The (x, y) coordinates of the
centroid
of the given object on the given color channel as
a
point2
data type (the centroid is the center of mass for the pixels of the specified color). For
example,
point2
cntd;
cntd = get_object_centroid(0,2);
printf(
"centroid: x coord %d y coord %d\n"
, cntd.x, cntd.y);
displays the x and y coordinates of centroid of box 2 for color channel 0. The centroid is NOT
the same as the center. It is the center of mass for a blob; e.g., for a color arrow pointing right,
there are more pixels to right of center, so the centroid is to the right of center.
get_object_confidence [Category: Vision]
Format:
double
get_object_confidence(
int
channel,
int
object);
Returns the confidence, between 0.0 and 1.0, that the given object on the given channel is
significant. If the channel or object doesn't exist, 0.0 is returned.
get_object_count [Category: Vision]
Format:
int
get_object_count(
int
channel);
Returns the number of objects being "seen" by the specified channel. Objects are sorted by
area, largest first. Returns -1 if channel doesn't exist. See also
get_channel_count
.
get_object_data [Category: Vision]
Format:
char
*get_object_data(
int
channel,
int
object);
Returns the sequence of character data associated with a given object on a QR channel. If
there is no data associated, 0 is returned. The data is not guaranteed to be null terminated,
but can be accessed using array notation; for example,
get_object_data(0,0)[0]; get_object_data(0,0)[1];
etc.
camera_update
will invalidate the pointer returned by
get_object_data
. See also
get_object_data_length
.
get_object_data_length [Category: Vision]
Format:
int
get_object_data_length(
int
channel,
int
object);
Returns the number of characters associated with the QR code on a QR channel. If there is no
data associated, 0 is returned. If the channel or object is invalid, 0 is returned. See also
get_object_data
.
Содержание KIPR Link
Страница 1: ...KIPR Link Manual Version BB2014 1 1...