![]() |
embedded system library for e-puck
1.0.1
A redesigned API library for the e-puck robot platform
|
Go to the source code of this file.
Data Structures | |
struct | el_camera_param |
struct | el_camera_image |
Macros | |
#define | EL_CAMERA_FRAME_DIM_X 40 |
#define | EL_CAMERA_FRAME_DIM_Y 15 |
Enumerations | |
enum | el_camera_exposure_mode { EL_AUTOMATIC = 0, EL_EXPOSURE_TIME = 1, EL_EIT_AND_ELG = 2, EL_IT_AND_GG = 3 } |
Functions | |
void | el_enable_camera () |
enable the camera | |
void | el_disable_camera () |
disable the camera | |
el_camera_param * | el_camera_options () |
get the pointer to a static instance of el_camera_param More... | |
void | el_camera_options_apply () |
apply the settings stored in el_camera_options directly More... | |
void | el_camera_options_reset () |
reset the settings stored in el_camera_options to default More... | |
void | el_config_camera (const el_camera_param *p) |
apply the settings in the given structure More... | |
void | el_camera_lock_frame () |
lock the frame buffers More... | |
void | el_camera_unlock_frame () |
unlock the frame buffers | |
bool | el_camera_is_frame_locked () |
check whether the frame buffers is locked More... | |
el_uint32 | el_camera_get_frame_counter () |
get total number of frames captured since initialization More... | |
void | el_camera_get_frame_pixel (int X, int Y, el_uint8 *out3v) |
get the color of a pixel in current frame buffer. More... | |
el_uint16 | el_camera_get_frame_width () |
get width (horizontal dimension) of the image in the frame buffer for reading. More... | |
el_uint16 | el_camera_get_frame_height () |
get height (vertical dimension) of the image in the frame buffer for reading. More... | |
el_camera_image * | el_camera_frame () |
get the pointer to a static instance of el_camera_image for reading More... | |
This enum is used in el_camera_param to specify the exposure mode of the camera.
el_camera_param* el_camera_options | ( | ) |
get the pointer to a static instance of el_camera_param
void el_camera_options_apply | ( | ) |
apply the settings stored in el_camera_options directly
This function is equivalent to "el_config_camera( el_camera_options() )".
void el_camera_options_reset | ( | ) |
reset the settings stored in el_camera_options to default
This function can be used in combination with el_camera_options_apply when the default configuration need to be used.
void el_config_camera | ( | const el_camera_param * | p | ) |
apply the settings in the given structure
p | pointer to the data structure |
The default parameters of the camera is equivalent to the following code:
Unlike the config
functions for other modules, the time cost to execute this function is not neglectable (around 7.1 ms), so it should not be executed frequently in a process.
void el_camera_lock_frame | ( | ) |
lock the frame buffers
When the frame buffer is locked, no buffer swapping will occur. This guarantees the image inside the frame buffer to be one frame of image. Otherwise, the image may be changed halfway through a image processing algorithm.
bool el_camera_is_frame_locked | ( | ) |
check whether the frame buffers is locked
el_uint32 el_camera_get_frame_counter | ( | ) |
get total number of frames captured since initialization
When the frame buffers are locked, the frame counter will not be increased.
void el_camera_get_frame_pixel | ( | int | X, |
int | Y, | ||
el_uint8 * | out3v | ||
) |
get the color of a pixel in current frame buffer.
X | x coordinate of the pixel |
Y | y coordinate of the pixel |
out3v | pointer to the array to store the RGB components. |
(0,0) is the bottom left corner.
el_uint16 el_camera_get_frame_width | ( | ) |
get width (horizontal dimension) of the image in the frame buffer for reading.
At present, this function always return 40.
el_uint16 el_camera_get_frame_height | ( | ) |
get height (vertical dimension) of the image in the frame buffer for reading.
At present, this function always return 15.
el_camera_image* el_camera_frame | ( | ) |
get the pointer to a static instance of el_camera_image for reading