|
H-Lines Purpose: detect visual landmarks and avoid obstacles. H-Lines uses optical flow to detect and locate prominent line segments that are horizontal in 3D space. Its advantages are
API To compute 3D distances, two frames are needed. Between each frame, the robot (or just the camera) must move forward a short, known distance -- about 150 mm. Travel should be in a straight line, without rotation. To start a new H-Line series, call locateHLines(),
passing it a travel distance of 0.
For each subsequent frame, move the robot or camera, then call locateHLines()
again, passing it the distance traveled. After each call, the
HLineMetadata_t struct
indicates how many 3D line segments were located. To retrieve data
for the 3D line segments, use
nextLine().
Functions: Data Types:
The camera should be tilted down about 30 degrees when using H-Lines, but it should not otherwise be twisted. The tilt angle must be specified with good precision.
Ini-File Parameters The H-Lines functionality uses eight parameters:
hlines#gyThreshold Fortunately, all but one (robot#width), are easily defaulted. See mavis.ini for descriptions of these parameters.
The camera-placement and calibration parameters must also be set: See Configuring Mavis and Camera Calibration for more on these parameters.
Source Code
|