Page 29
camera_update()
Once the camera has been instantiated using camera_open, each call to camera_update will
retrieve and process the current camera image. Always call this function before using any other
camera functions so they reference the current data.
get_object_count(
<
channel
>
)
Returns the number of objects for a channel as determined by the most recent
camera_update(). Objects for a channel are ranked numerically with 0 being the largest in area.
get_object_bbox(
<
channel
>
,
<
number
>
)
Returns a compound data type
rectangle
with component values determined by the most recent
camera_update. The rectangle data type has 4 components:
ulx - the upper left x coordinate of the object's bounding box
uly - the upper left y coordinate of the object's bounding box
width - the width of the object's bounding box
height - the height of the object's bounding box
get_object_center(
<
channel
>
,
<
number
>
)
Returns a compound data type point2 with component values determined by the most recent
camera_update. The point 2 data type has 2 components:
x - the x-coordinate of the center
y - the y-coordinate of the center
For a QR code channel the following two functions are used for QR decoding:
get_object_data(
<
channel
>
,
<
number
>
)
Returns a pointer to the sequence of character data for the QR code. If the channel is invalid, or
there is no object, or there is no data, 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.
The pointer returned by get_object_data will be valid until camera_update is called again, at
which point get_object_data will return a new pointer.
get_object_data_length(
<
channel
>
,
<
number
>
)
Returns the number of characters associated with the QR code on a QR channel. If the channel
is invalid, or there is no object, or there is no data, 0 is returned.
Содержание KIPR Link
Страница 1: ...KIPR Link Manual Version BB2014 1 1...