Log in

View Full Version : CMUCAM2 help needed


Tottanka
19-10-2007, 16:25
i need to know in mplab, if i see 2 ligts or 1 light.
therfore, i need to have the size of the light that the camers has, if its too high, i know it is 2 lights.
how can i get an input of light size to mplab?
thanks, a nooby programmer.

Branden Ghena
20-10-2007, 11:51
It depends on the code you are using, but I know in EasyC last year the camera saw two lights as one very large light, and you needed a maximum light size to tell the robot that those lights are actually two.

I can't remember exactly what the maximum light size was though, sorry.

Tottanka
20-10-2007, 14:26
It depends on the code you are using, but I know in EasyC last year the camera saw two lights as one very large light, and you needed a maximum light size to tell the robot that those lights are actually two.

I can't remember exactly what the maximum light size was though, sorry.

I just need to know waht are the names of the x poins as the light is seen...
Does anyone know if they are T_Packet_Data.x1 and T_Packet_Data.x2?

bear24rw
20-10-2007, 15:30
All the data that the camera returns get stored in this structure from camera.h

// camera t packet data structure
typedef struct
{
unsigned char mx;
unsigned char my;
unsigned char x1;
unsigned char y1;
unsigned char x2;
unsigned char y2;
unsigned char pixels;
unsigned char confidence;
} T_Packet_Data_Type;


So yes its T_Packet_Data.x1 and T_Packet_Data.x2

Tottanka
20-10-2007, 18:49
can you please tell me what the other valuse meen?

lukevanoort
20-10-2007, 19:02
Look in 'camera.h' around line 140, it has explanations of what the variables mean.