Go to Post Don't put any weight into the OPR. It's ugly and its momma dresses it funny. - wilsonmw04 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-02-2007, 04:44
Bomberofdoom's Avatar
Bomberofdoom Bomberofdoom is offline
Biggest FIRST addict in Israel
AKA: Nir Levanon
FRC #2230 (Zcharia's Angels)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Israel
Posts: 471
Bomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond repute
Send a message via MSN to Bomberofdoom
Understanding blob size

Code:
case RECEIVING_T_PACKET:

			if(packet_buffer_index < sizeof(T_Packet_Data_Type)) // still building the packet?
			{
				// move packet character to our buffer
				packet_buffer[packet_buffer_index] = byte;
				packet_buffer_index++;
			}
			
			if(packet_buffer_index == sizeof(T_Packet_Data_Type)) // complete packet?
			{
				T_Packet_Data.mx = packet_buffer[0];
				T_Packet_Data.my = packet_buffer[1];
				T_Packet_Data.x1 = packet_buffer[2];
				T_Packet_Data.y1 = packet_buffer[3];
				T_Packet_Data.x2 = packet_buffer[4];
				T_Packet_Data.y2 = packet_buffer[5];
				T_Packet_Data.pixels = packet_buffer[6];
				T_Packet_Data.confidence = packet_buffer[7];

				camera_t_packets++;

				state = UNSYNCHRONIZED; // we're done; go back to the unsynchronized state
This is one of the switch-cases of the Camera_State_Machine function.
I'd like to understand how it determains the blob size given in the terminal so I can also use it in autonomous mode(T_Packet_Data.pixels = packet_buffer[6];, what happens in that code line).
  #2   Spotlight this post!  
Unread 02-02-2007, 11:49
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Understanding blob size

Quote:
Originally Posted by Bomberofdoom View Post
This is one of the switch-cases of the Camera_State_Machine function.
I'd like to understand how it determains the blob size given in the terminal so I can also use it in autonomous mode(T_Packet_Data.pixels = packet_buffer[6];, what happens in that code line).
The blob size (.pixels) is calculated by the camera and sent as part of the t-packet.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #3   Spotlight this post!  
Unread 02-02-2007, 17:26
Bomberofdoom's Avatar
Bomberofdoom Bomberofdoom is offline
Biggest FIRST addict in Israel
AKA: Nir Levanon
FRC #2230 (Zcharia's Angels)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Israel
Posts: 471
Bomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond repute
Send a message via MSN to Bomberofdoom
Re: Understanding blob size

Where's the calculation area?(not sure if it's important for me, especialy when it's after midnight here, but I'd like to know anyway)
  #4   Spotlight this post!  
Unread 02-02-2007, 18:05
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Understanding blob size

Quote:
Originally Posted by Bomberofdoom View Post
Where's the calculation area?
It's in the firmware of the camera. I think all it does is count the number of adjacent pixels which match the specified color.

I'm curious to know why you're focusing on this, and how you expect to use the information you're asking for.
  #5   Spotlight this post!  
Unread 03-02-2007, 10:55
Bomberofdoom's Avatar
Bomberofdoom Bomberofdoom is offline
Biggest FIRST addict in Israel
AKA: Nir Levanon
FRC #2230 (Zcharia's Angels)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Israel
Posts: 471
Bomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond repute
Send a message via MSN to Bomberofdoom
Re: Understanding blob size

Well, I'm hoping to find a certain blob size range(as I saw in the CMU demo clip, the blob size is not soo stable, so I want to find that limit of the instabilaty)when in a certain range so I can create a certain (I think that's the word -) algorithim that will check if the size of the blob in certain distance from the light(that is diffrenet from the distance of the defined blob size) equals the same size of the defined blob(meaning, when both distances come range 0 with the light, the light will be the same size). That way I will be able to distinguish between 1 light in view in a close distance from the camera and 2 lights in view in a far range from the camera.

Last edited by Bomberofdoom : 03-02-2007 at 10:58.
  #6   Spotlight this post!  
Unread 03-02-2007, 18:37
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Understanding blob size

The blob size is calculated as:

"the number of pixels (of green in our case) in the tracked region, scaled and capped at 255: (pixels+4)/8"

You'll find this information in the CMUCam2 User's Guide where it gives a brief description of the T packet (p.60)
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Minimum blob size royalfire Programming 0 18-01-2007 16:56
Memorandum of Understanding (MOU) KathieK Team Organization 0 03-01-2007 12:43
Blob Size d.courtney Programming 7 29-01-2006 20:48
Understanding engineers Katie Reynolds Chit-Chat 0 27-02-2004 18:04
Help with understanding Fuse panel Blue_Midnight Electrical 3 10-02-2004 23:12


All times are GMT -5. The time now is 12:30.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi