camera/po3030k/calc.c File Reference

Calculate the timing for the camera. More...

#include "po3030k.h"
#include "../../i2c/i2c.h"
#include <p33fxxxx.h>

Defines

#define ARRAY_ORIGINE_X   210
#define ARRAY_ORIGINE_Y   7
#define IRQ_PIX_LAT   4

Functions

void 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 po3030k_get_bytes_per_pixel (int color_mode)

Variables

int _po3030k_slow_path


Detailed Description

Calculate the timing for the camera.

Author:
Philippe Rétornaz

Function Documentation

void 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
See also:
po3030k_write_cam_registers

int 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


Variable Documentation

int _po3030k_slow_path

Internal flag to tell that the pixel clock is half speed


Generated on Sun Mar 1 03:10:15 2009 for molole by  doxygen 1.5.1