|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Camera Colors
I have not been very successful with color tracking, I am trying to get the TwoColorDemo code to work and I am pretty sure it's the values for pink and green, but I have kept most of the default code their. So here are some questions:
1) What values for the min, and max for luma, saturation, and hue have teams used that have been successful? [For pink and green, plz specify which color it is for] 2) Is there any of the default code that would cause the robot not to see the target? 3) I put in my own for loops to move the two servos instead of using their default ones, since whenever I turned the robot on the camera would vertically turn up or down all the way, and then turn left or right all the way right when autonomous started., is this smart to do? 4) Are there any suggestions on how to get the camera working? [I have tried NI Vision Assistant, but was unsuccessful with either getting an image from the camera, or taking a screen pic of the florescent green with the camera, and attempting to get values from the pic] TYVM to any who respond, and help! ![]() |
|
#2
|
||||
|
||||
|
Re: Camera Colors
We were able to use the TwoColorTrackDemo right out of the box. We changed very little to the code and it has worked well for us. We scored autonomously twice in week 1 (on moving trailers) with that code.
I'd suggest reverting back to as few changes as possible. You can see a video of our autonomous scoring on my blog - posted yesterday: http://rogeronfirst.blogspot.com/200...-no-hands.html. Last edited by rogerlsmith : 11-03-2009 at 23:19. Reason: added link to video |
|
#3
|
||||
|
||||
|
Re: Camera Colors
how about on your camera settings did you change anything?
because the thing is I put the target (green being on top) at a distance where the camera was looking at it, and when it started the servos just spazzed and went all up/down & all the way left or right, and it was with the default, out of the box code, what up?? what needs to be tried?? Is there something that might interfere, like if our robot uses servos elsewhere would that effect it?? |
|
#4
|
||||
|
||||
|
Re: Camera Colors
There are certain motors that will interfere with the signal to the servos. However, if all other motors are off, you shouldn't experience any interference.
The TwoColorTrackDemo code pans left and right; I don't think it tilts up and down by default. Double check and make sure you've plugged the servos in the right port and they have the servo jumper attached on the side car. |
|
#5
|
|||||
|
|||||
|
Re: Camera Colors
Quote:
If you have the tilt servo and pan servo connections swapped, the software will be trying to move the camera horizontally but it will actually move vertically, and vice versa. If you built the pan/tilt assembly mirror-imaged from the drawings, the tilt servo will be reversed from how the software wants to control it. All these can be corrected easily, if you know to check for them. |
|
#6
|
||||
|
||||
|
Re: Camera Colors
The detection color values from the demo may or may not work depending on your lighting. The code worked for us right out of the box, but when we got to regionals, the lighting was so different that the code we had used during the build season was useless. You will have to experiment with different values.
Check this out: http://joule.ni.com/nidu/cds/view/p/id/1270/lang/en I haven't taken a close look at it yet, but it looks like a tool that will make color calibration easier. You may be having problems because of hardware, as others have said, but if you are still having problems after you're sure everything is connected properly, you should just play around with color values. It really does make an incredible difference. Last edited by Sentient : 21-03-2009 at 10:40. |
|
#7
|
|||
|
|||
|
Re: Camera Colors
Just to clarify,
Quote:
As you point out, the tool at that URL will hopefully make it quick and painless to learn about the event lighting and adjust the constants for almost any lighting. Greg McKaskle |
|
#8
|
||||
|
||||
|
Re: Camera Colors
Yes, you're right. The code was the same. What I meant was, the HSL ranges that we had working perfectly back at school became completely moot when we arrived at competition.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| WPILib & Camera colors & data | Thanatos | Programming | 2 | 19-02-2007 01:15 |
| Camera Won't FInd Colors (Was: Please help!) | graphite | Programming | 1 | 18-05-2006 09:30 |
| RGB colors in camera.h | X-Istence | Programming | 5 | 11-01-2006 21:59 |
| Camera colors | Anton | Programming | 3 | 09-02-2005 14:13 |
| Colors | doyler | Programming | 2 | 30-01-2005 15:22 |