Hardware Reference
In-Depth Information
/*-----------------------------------------------------------*/
/* vision -- gets the image and computes the path angle */
/*-----------------------------------------------------------*/
proc
vision()
char
image[256][256];
float
*alfa;
/* pointer to cab data */
while (1) {
get frame(image);
alfa = reserve(angle);
*alfa = compute angle(image);
putmes(alfa, angle);
end cycle();
}
}
/*-----------------------------------------------------------*/
/* display -- represents the robot trajectory on the screen */
/*-----------------------------------------------------------*/
proc
display()
float
*fvect, *alfa;
/* pointers to cab data
*/
float
point[3];
/* 3D point on the surface */
while (1) {
fvect = getmes(fdata);
alfa = getmes(angle);
surface(fvect, *alfa, point);
draw pixel(point);
unget(fvect, fdata);
unget(alfa, angle);
end cycle();
}
}
Search WWH ::




Custom Search