e_calc.c File Reference

Calculate the timing for the camera (two timers). More...

#include "e_po3030k.h"
#include "../../motor_led/e_epuck_ports.h"
#include "../../I2C/e_I2C_protocol.h"
#include "../../motor_led/e_init_port.h"

Defines

#define ARRAY_ORIGINE_X   210
#define ARRAY_ORIGINE_Y   7
#define IRQ_PIX_LAT   1

Functions

int e_po3030k_config_cam (unsigned int sensor_x1, unsigned int sensor_y1, unsigned int sensor_width, unsigned int sensor_height, unsigned int zoom_fact_width, unsigned int zoom_fact_height, int color_mode)
int e_po3030k_get_bytes_per_pixel (int color_mode)
void e_po3030k_init_cam (void)


Detailed Description

Calculate the timing for the camera (two timers).

Author:
Philippe Rétornaz

Define Documentation

#define ARRAY_ORIGINE_X   210

#define ARRAY_ORIGINE_Y   7

#define IRQ_PIX_LAT   1


Function Documentation

int e_po3030k_config_cam ( unsigned int  sensor_x1,
unsigned int  sensor_y1,
unsigned int  sensor_width,
unsigned int  sensor_height,
unsigned int  zoom_fact_width,
unsigned int  zoom_fact_height,
int  color_mode 
)

This function setup the internal timing of the camera to match the zoom, color mode and interest area.

Warning:
If the common deniminator of both zoom factor is 4 or 2, part of the subsampling is done by the camera ( QQVGA = 4, QVGA = 2 ). This increase the framerate by respectivly 4 or 2. Moreover greyscale is twice faster than color mode.
Parameters:
sensor_x1 The X coordinate of the window's corner
sensor_y1 The Y coordinate of the window's corner
sensor_width the Width of the interest area, in FULL sampling scale
sensor_height The Height of the insterest area, in FULL sampling scale
zoom_fact_width The subsampling to apply for the window's Width
zoom_fact_height The subsampling to apply for the window's Height
color_mode The color mode in which the camera should be configured
Returns:
Zero if the settings are correct, non-zero if an error occur
See also:
e_po3030k_write_cam_registers

int e_po3030k_get_bytes_per_pixel ( int  color_mode  ) 

Return the number of bytes per pixel in the given color mode

Parameters:
color_mode The given color mode
Returns:
The number of bytes per pixel in the given color mode

void e_po3030k_init_cam ( void   ) 

Initialize the camera, must be called before any other function


Generated on Fri Feb 29 14:26:53 2008 for e-puck by  doxygen 1.5.4