RidgeRun AEW Library: librraew
1.1
|
#include <linux/types.h>
Classes | |
struct | rraew_colorpattern |
Bayer pattern order. More... | |
struct | rraew_gain_step |
Range step information. More... | |
struct | rraew_stat_config |
Statistics hardware module configuration including user-defined windowing. More... | |
struct | rraew_file_descriptors |
Hardware file descriptors for the capture device, the previewer device and the aew device. More... | |
struct | rraew_stat |
Per window statistical data: : average, maximum and minimum of each channel component. More... | |
struct | rraew_sensor |
Sensor characteristics. More... | |
struct | rraew_interface |
Struct that contains all the required information of the interface. More... | |
struct | rraew_coordinates |
Center point of the rectangle of interest. More... | |
struct | rraew_awb_configuration |
Auto white balance configuration settings. More... | |
struct | rraew_ae_configuration |
Auto exposure configuration settings. More... | |
struct | rraew_configuration |
General aew library configuration settings. More... | |
Typedefs | |
typedef int(* | RraewSetGain )(int *fd, char *owner_fd, __u32 q10r_gain, __u32 q10g_gain, __u32 q10b_gain, void *data) |
Function prototype to set RGB gains. | |
typedef int(* | RraewGetGain )(int *fd, char *owner_fd, __u32 *q10r_gain, __u32 *q10g_gain, __u32 *q10b_gain, void *data) |
Function prototype to get RGB gains. | |
typedef int(* | RraewSetExposure )(int *capture_fd, char *owner_capture_fd, __u32 exp_time, void *data) |
Function prototype to set exposure time. | |
typedef int(* | RraewGetExposure )(int *capture_fd, char *owner_capture_fd, __u32 *exp_time, void *data) |
Function prototype to get exposure time. | |
typedef int(* | RraewSetStatParameters )(int *aew_fd, char *owner_aew_fd, int width, int height, struct rraew_stat_config *stat_config, void *data) |
Function prototype to set parameters to the statistical module. | |
typedef int(* | RraewReadStatData )(int *aew_fd, char *owner_aew_fd, struct rraew_stat_config *stat_config, struct rraew_colorpattern colorptn, struct rraew_stat *stats, void *data) |
Function prototype to read statistical data. | |
typedef int(* | RraewReleaseStatData )(int *aew_fd, char *owner_aew_fd, struct rraew_stat_config *stat_config, struct rraew_stat *stats, void *data) |
Function prototype to release statistical data. | |
Enumerations | |
enum | rraew_white_balance_algo { AWB_NONE = 0, AWB_GRAY_WORLD, AWB_WHITE_PATCH, AWB_WHITE_PATCH_2 } |
Aauto white balance algorithm to use. More... | |
enum | rraew_exposure_algo { AE_NONE, AE_EC } |
Auto exposure algorithm to use. More... | |
enum | rraew_metering_type { METER_PARTIAL_AREA = 0, METER_RECT_WEIGHTED, METER_AVERAGE, METER_SEGMENT } |
Brightness metering system to be used by the auto exposure algorithm. More... | |
enum | rraew_gain_type { GAIN_SENSOR = 0, GAIN_DIGITAL } |
Gain adjustment applied to the sensor or on the ipipe. More... | |
Functions | |
struct rraew * | rraew_create (struct rraew_awb_configuration *awb_config, struct rraew_ae_configuration *ae_config, struct rraew_configuration *aew_config, struct rraew_sensor *sensor, struct rraew_interface *interface, struct rraew_file_descriptors *fd) |
Creates an Auto White Balance/ Auto Exposure Algorithm handler This function makes the structure of the aew library(instance), prepares the hardware modules and initialize the auto-exposure and auto-white-balance algorithms. | |
void | rraew_destroy (struct rraew *aew) |
Destroys an Auto White Balance/ Auto Exposure Algorithm. | |
int | rraew_run (struct rraew *aew) |
Executes one iteration of the auto exposure and auto white balance algorithm. | |
int | rraew_get_rectangle_coordinates (struct rraew *aew, unsigned int *right, unsigned int *left, unsigned int *top, unsigned int *bottom) |
Gets the coordinates for the rectangle of interest that is being used for the auto exposure algorithm. | |
Variables | |
struct rraew_colorpattern | colorptn_GrRBGb |
struct rraew_colorpattern | colorptn_BGbGrR |
struct rraew_colorpattern | colorptn_RGrGbB |
struct rraew_colorpattern | colorptn_GbBRGr |
struct rraew_interface | dm365_vpfe_interface |
Skeleton of values for DM365 vpfe interface. |
typedef int(* RraewGetExposure)(int *capture_fd, char *owner_capture_fd, __u32 *exp_time, void *data) |
Function prototype to get exposure time.
fd | capture device file descriptor |
owner_fd | flag that tell who is the file descriptor owner |
exp_time | pointer to get the exposure time in us |
typedef int(* RraewGetGain)(int *fd, char *owner_fd, __u32 *q10r_gain, __u32 *q10g_gain, __u32 *q10b_gain, void *data) |
Function prototype to get RGB gains.
fd | file descriptor of the device with the gains module |
owner_fd | flag that tell who is the file descriptor owner |
q10r_gain | pointer to get the red gain component on fixed-point Q22:10 format |
q10g_gain | pointer to get the green gain on fixed-point Q22:10 format |
q10b_gain | pointer to get the blue component on fixed-point Q22:10 format |
typedef int(* RraewReadStatData)(int *aew_fd, char *owner_aew_fd, struct rraew_stat_config *stat_config, struct rraew_colorpattern colorptn, struct rraew_stat *stats, void *data) |
Function prototype to read statistical data.
aew_fd,file | descriptor of the aew device |
owner_aew_fd | flag that tell who is the file descriptor owner |
stat_config | pointer to struct that has the configuration required for the statistical module |
stats | struct array where this function leaves the statistical data. The array must start in order with the top/left window and end with the bottom/right window |
colorptn | struct that contains the color pattern given by the sensor |
typedef int(* RraewReleaseStatData)(int *aew_fd, char *owner_aew_fd, struct rraew_stat_config *stat_config, struct rraew_stat *stats, void *data) |
Function prototype to release statistical data.
aew_fd,file | descriptor of the aew device |
owner_aew_fd | flag that tell who is the file descriptor owner |
stat_config | pointer to struct that has the configuration required for the statistical module |
stats | pointer to memory reserved for the statistical data |
typedef int(* RraewSetExposure)(int *capture_fd, char *owner_capture_fd, __u32 exp_time, void *data) |
Function prototype to set exposure time.
fd | capture device file descriptor |
owner_fd | flag that tell who is the file descriptor owner |
exp_time | exposure time in us |
typedef int(* RraewSetGain)(int *fd, char *owner_fd, __u32 q10r_gain, __u32 q10g_gain, __u32 q10b_gain, void *data) |
Function prototype to set RGB gains.
fd | file descriptor of the device with the gains module |
owner_fd | flag that tell who is the file descriptor owner |
q10r_gain | gain value for the red component. The value format is fixed-point Q22:10 |
q10g_gain | gain value for the green component. The value format is fixed-point Q22:10 |
q10b_gain | gain value for the blue component. The value format is fixed-point Q22:10 |
typedef int(* RraewSetStatParameters)(int *aew_fd, char *owner_aew_fd, int width, int height, struct rraew_stat_config *stat_config, void *data) |
Function prototype to set parameters to the statistical module.
aew_fd,file | descriptor of the aew device |
owner_aew_fd | flag that tell who is the file descriptor owner |
width | number of horizontal pixels in the image |
height | number of vertical pixels in the image |
stat_config | pointer to struct that has the configuration required for the statistical module |
enum rraew_exposure_algo |
enum rraew_gain_type |
enum rraew_metering_type |
Brightness metering system to be used by the auto exposure algorithm.
Aauto white balance algorithm to use.
struct rraew* rraew_create | ( | struct rraew_awb_configuration * | awb_config, |
struct rraew_ae_configuration * | ae_config, | ||
struct rraew_configuration * | aew_config, | ||
struct rraew_sensor * | sensor, | ||
struct rraew_interface * | interface, | ||
struct rraew_file_descriptors * | fd | ||
) | [read] |
Creates an Auto White Balance/ Auto Exposure Algorithm handler This function makes the structure of the aew library(instance), prepares the hardware modules and initialize the auto-exposure and auto-white-balance algorithms.
All the structures are copied so the pointer can be released after the creation of the algorithm.
awb_config | auto white balance configuration settings. |
ae_config | auto exposure configuration settings. |
aew_config | auto white balance and auto exposure common configuration settings. |
sensor | structure that defines the sensor. |
interface | structure that defines the video processing subsystem of this SoC. |
fd | each device can be accessed through file descriptors, obtained with the “open” function. librraew interacts with three devices: previewer (from video processing subsystem) , camera sensor and aew statistics engine. This parameter defines the file descriptors for these devices and the owner of each one. The ownership determines if the device has to be open by librraew or you give the file descriptor. When the owner is librraew, you may leave the file descriptor NULL. |
References AE_EC, AE_NONE, AWB_GRAY_WORLD, AWB_NONE, AWB_WHITE_PATCH, and AWB_WHITE_PATCH_2.
void rraew_destroy | ( | struct rraew * | aew | ) |
Destroys an Auto White Balance/ Auto Exposure Algorithm.
Free the memory used by the algorithm
aew | an aew algorithm handler |
int rraew_get_rectangle_coordinates | ( | struct rraew * | aew, |
unsigned int * | right, | ||
unsigned int * | left, | ||
unsigned int * | top, | ||
unsigned int * | bottom | ||
) |
Gets the coordinates for the rectangle of interest that is being used for the auto exposure algorithm.
Specifies the coordinates of two points: the top left and bottom right corners of the rectangle. The sides of the rectangle extend from these two points and are parallel to the x-axis and y-axis.
aew | an aew algorithm handler |
*right | the coordinate value of the rectangle's right side. |
*left | the coordinate value of the rectangle's left side. |
*top | the coordinate value of the rectangle's top side. |
*bottom | the coordinate value of the rectangle's bottom side. |
References METER_PARTIAL_AREA, and METER_RECT_WEIGHTED.
int rraew_run | ( | struct rraew * | aew | ) |
Skeleton of values for DM365 vpfe interface.
For the DM365 platform the librraew has a filled rraew_interface structure. The librraew implements the required function callbacks.