|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
FRC Camera code in YCrCb Mode?
It seems to me that the default 2006 Camera Code provided by Kevin Watson (Thanks Kevin) is configured for YCrCb. Is that true? The students haven't found a way to change the color modes within the robot controller code. We haven't gotten our Green Light built yet so we've been trying to track in RGB without any success. It tracks just fine using the LabVIEW program when selected as RGB. We use Kevin's handy menu system to store these parameters gotten from LabVIEW into the Robot Controller's EEPROM but the robot controller does not successfully track based on those parameters (hence our thought that the default camera code utilizes YCrCb instead of RGB). Any help on how to change the color modes would be greatly apreciated!
Thanks, -Terry |
|
#2
|
||||
|
||||
|
Re: FRC Camera code in YCrCb Mode?
Quote:
-Kevin |
|
#3
|
||||
|
||||
|
Re: FRC Camera code in YCrCb Mode?
Quote:
It tracks perfectly now ![]() |
|
#4
|
|||||
|
|||||
|
Re: FRC Camera code in YCrCb Mode?
Quote:
The camera command would be "CR 18 8" for RGB, and "CR 18 0" for YCrCb. |
|
#5
|
||||
|
||||
|
Re: FRC Camera code in YCrCb Mode?
Quote:
-Kevin |
|
#6
|
|||||
|
|||||
|
Re: FRC Camera code in YCrCb Mode?
I think we were having this same problem, as we could not get the camera to track when connected to the robot with either the default values or those found in LabVIEW (it tracked fine when driving the servos itself, but I only tried RGB mode). I'll have to wait until tomorrow to test it, though.
Are the calibrations still in R,G,B maximum and minimum values, as this is the only option that I can find in the camera configuration? If so, do I just calibrate the RGB values through LabVIEW (in YCrCb mode) and then enter them into camera.h here: Code:
#define R_MIN_DEFAULT 85 // Rmin for call to Track_Color() #define R_MAX_DEFAULT 115 // Rmax for call to Track_Color() #define G_MIN_DEFAULT 15 // Gmin for call to Track_Color() #define G_MAX_DEFAULT 17 // Gmax for call to Track_Color() #define B_MIN_DEFAULT 100 // Bmin for call to Track_Color() #define B_MAX_DEFAULT 145 // Bmax for call to Track_Color() |
|
#7
|
|||
|
|||
|
Re: FRC Camera code in YCrCb Mode?
Quote:
Code:
R.min = Cr.min R.max = Cr.max G.min = Y.min G.max = y.max B.min = Cb.min B.max = Cb.max Hope this helps to clarify. -Joe |
|
#8
|
|||||
|
|||||
|
Re: FRC Camera code in YCrCb Mode?
Thanks for clarifying, I figured that they would change. I just didn't know if there was some other place with constants for YCrCb mode that I was missing. No I have something to test out tomorrow.
|
|
#9
|
||||
|
||||
|
Re: FRC Camera code in YCrCb Mode?
Thanks! We finally got our Green Light fromt the kit going (we had troubles buying the proper case for it). With YCrCb we are getting good results!
-Terry |
|
#10
|
||||
|
||||
|
Re: FRC Camera code in YCrCb Mode?
Quote:
Thanks |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Scripting Setup and the Camera + Serial Port Drivers | CJO | Programming | 22 | 11-01-2006 17:42 |
| CMUCam2 code (FRC and EDU?) | Amber | Programming | 0 | 15-02-2005 22:23 |
| Camera Code | Fishdude404 | Programming | 1 | 25-01-2005 18:59 |
| Kevin Watson's Kick-off Demo Code! | Mr. Lim | Programming | 27 | 22-01-2005 03:38 |
| autonomous mode problem on field | Chris_C | Programming | 17 | 26-03-2003 19:11 |