![]() |
Cam Color Caliberation
I am having trouble caleberating the camera. The vision is working perfectly fine, but it doesnt detect colors. If I try to search for a color it says ERROR. please try to get back to me if u can?
THANK YOU |
Re: Cam Color Caliberation
Have you tried the troubleshooting methods in the calibration PDF that came with the camera? It tells you how to remedy the various error messages.
|
Re: Cam Color Caliberation
We are also having trouble calibrating the camera. What type of lighting does everyone use? We tried regular fluorescent lighting and then we tried the halogen lighting. But none were successful in calibrating all three colors. We kept getting the error "Color not found, or too much light" or "color not found, or not enough light". How many teams actually got their camera calibrated already?
It would have been really nice if there was some technical support for this camera. I also find it funny that in Update #5 FIRST says to contact innovation first for CMUcam2 assistance. However, on the innovation first website, it says that they do not offer any camera support. LOL (wait, why am I laughing? :confused: ) |
Re: Cam Color Caliberation
:p
Quote:
my camera read s the color jut fine and everything and i've gotten as far as the camera giving me values from the target. however, it gave me the same value for green as it did for yellow. being smarter than that... i know something's wrong. also i don't know specifically which numbers i should be looking at because there are some for red yellow and green or blue whatever. but the thing is that i don't know if for one target i should be getting three diff values adn put all those in (say green, then i would get a large number for blue and yellow and a smaller number for red... seeing as green IS a mixture of the primary colors, etc. etc.) even though this may seem like a smart set of numbers to use for the programming, the program isn't giving me any of the values for any of the other colors, just the value of the color of the target. so my question to you guys is what set of numbers should i use and what would be causing the program to give me the same value for two different colors? sorry to butt in to someone's else's thread, but i didn't want to start a completely new thread with a problem that's very closely related to this one. thanks, isabel ps: it doesn't say on my profile but my screen name for aim is binxybel so if there's any way that you can reach me through there, since i feel it's the most direct way of communication, that would be great! thanks! |
Re: Cam Color Caliberation
Quote:
1) set up the red, green, or yellow target 2) grab a frame 2) click on the target to highlight to make sure that most of it is recognized (highlighted) 3) click on the Red, Yellow, or Green button at the top part of the screen to calibrate it for that target color. If it works sucessfully the program should give you a number in the box rather than the ???. So you will actually only get one number per target calibration. After calibrating for all three targets, you should have the three numbers that you need to plug into the default camera code. That's all we got up to for now since we can't seem to calibrate for all the three target colors. |
Re: Cam Color Caliberation
Quote:
The only problem we continually our facing is lighting. Our camera can never find the colors that we try to do with a spotlight, flourescent (I know butchered this one) and even nice white lighting. If anyone out there has their colors calibrated and could help us (and indeed a few other teams :)) it would be appreciated. Specifically, what lighting was used and conditions, methods, etc....? Our team specifically has been trying for a few days now and has seen very little result..... Thanks! |
Re: Cam Color Caliberation
Does anyone know what the official colors you need to plug into the camera default code are?
Thx alot |
Re: Cam Color Caliberation
The colors you need to put into the camera code are actually numbers that you get after you calibrate the camera using the provided GUI.
|
Re: Cam Color Caliberation
Quote:
|
Re: Cam Color Caliberation
Well, I got some number that worked once, and they worked great until the robot moved... I've had the best luck in a dark hallway using 2 500 watt halogen lights to light the target, We successfully got it to chase down a guy carrying a yellow triangle, so you might want to try that
|
Re: Cam Color Caliberation
Calibration values will be provided at the competition for their lights, iirc. So it won't be too much of a problem there, I think.
|
Re: Cam Color Caliberation
Quote:
void find_exposure( int color ) { if(calibrate_running == 0) { camera_stop(); // Stop the camera if it is already tracking camera_reset(); // Reset the camera, and make sure it reset (actually check for true return) camera_const_cmd(noise_filter); // Enable the same noise filter for all tracking camera_const_cmd(raw_mode); // Put into raw mode, this makes it send output numbers as bytes instead camera_const_cmd(virtual_window); calibrate_running = 1; printf("Calibrating for "); switch(color) { case GREEN: printf("GREEN\r"); camera_const_cmd(aec_disable ); // Disable AEC camera_const_cmd(manual_agc ); // Enable manual AEC and AGC camera_const_cmd(noise_filter ); // Set noise filter to 6 pixels camera_const_cmd(raw_mode ); // Set camera output to BINARY camera_const_cmd(virtual_window); // Set virtual window camera_const_cmd(yCrCb_mode); // Set yCrCb mode camera_set_exposure(0); // Set manual exposure value camera_const_cmd(track_green); best_confidence = 0; best_exposure = 0; one_second_delay = 0; break; default: return; } return; } if(exposure_val == 255) { printf("Best Exposure is %d, Best Confidence is %d\r", best_exposure, best_confidence); camera_stop(); camera_set_exposure( best_exposure ); camera_auto_servo(SUPERFINE_TRACKING, SUPERFINE_TRACKING); // Pan.servo = COARSE, Tilt still COARSE camera_const_cmd("TC"); parse_mode = 1; while(1); } if(camera_track_update( )) // If we have a new frame { num_of_frames++; // printf("Exposure= %03d Pixel Count = %03d, Confidence = %03d\r", exposure_val, cam.count, cam.conf); if( cam.count > 1 ) { num_of_samples++; confidence_average += cam.conf; pixel_average += cam.count; } } if(one_second_delay++ >= 9) { one_second_delay = 0; pixel_average = pixel_average/num_of_samples; if(pixel_average < 0 ) pixel_average = 0; confidence_average = confidence_average/num_of_samples; if(confidence_average < 0 ) confidence_average = 0; printf("FPS= %03d Exposure = %03d, Pixel Average = %03d, Conf Average = %03d\r", num_of_frames * 4, exposure_val, pixel_average, confidence_average); if ((confidence_average/num_of_samples) > best_confidence ) { best_confidence = confidence_average/num_of_samples; best_exposure = exposure_val; } exposure_val++; num_of_samples = 0; num_of_frames= 0; confidence_average = 0; pixel_average = 0; camera_stop(); camera_set_exposure( exposure_val ); camera_const_cmd("TC"); parse_mode = 1; } } |
Re: Cam Color Caliberation
WOW. if only I was able to understand more than a third of it, It would be even nicer.
since I didn't understand most of it, could you please explain how can I do the same for other colors? do I just add a new case and make caera_tack_color track another color? or is it more compliciated? |
Re: Cam Color Caliberation
Quote:
Let me know if you're interested and I'll clean it up for you. The code could be simplified and use a lot less variables, so let me do this for you before you type it in. We're even thinking of running some of our own calibration routines during practice rounds and then saving the data to EEPROM so we can dump it out to a program and then decide our own exposure values. |
Re: Cam Color Caliberation
if the java gui does work but you still can't calibrate, try lining the camera up w/o using the servos because when you hit calibrate the servo resets to 0. We are only just now realizing this after weeks of frustration.
|
| All times are GMT -5. The time now is 03:06. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi