Announcement

Collapse
No announcement yet.

problems with the color sensor

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • problems with the color sensor


    Hi, our team has had many problems to detect with the color sensor some colors for example confuse green with blue or red with yellow, I have changed the sensor and they all do the same, I wonder there is another way or routine of programming to solve this problem?

  • #2
    Most FLL teams use the color sensor in reflective light intensity mode to detect a black line surrounded by a white line with the intention of either stopping at the line, squaring to the line, or following the line. In this case, they are not sensing color at all; instead they are detecting how much light is reflected back to the sensor. Over a white part, you will typically see 90% and over black you will see around 10%. If the blue part of the mat you are traveling through is, say, 50%, then it is relatively easy to have the robot find either the black or white part. For white you would set the sensor to look for areas above 70% (just to be sure you're not detecting the blue) and for black you'd be looking for something less than 30%. Our team almost never looks for blue or green or red.

    Comment


    • #3
      Originally posted by UCrobotic View Post
      Hi, our team has had many problems to detect with the color sensor some colors for example confuse green with blue or red with yellow, I have changed the sensor and they all do the same, I wonder there is another way or routine of programming to solve this problem?
      The height of the sensor dramatically affects what it detects in any mode. Best practices that people have stated: the color sensor should be pointing directly down at the mat (not on an angle. The ideal distance from the mat should be between 1/2 and 2 tecnic beams high (4mm - 16mm, given the width of a beam is is 8mm)

      Comment


      • #4
        Black and white are not your only options either. There are some other spots on this map where there is a nice, sharp break between colors that give contrasting reflected light intensity readings. Do some sampling with Port View in the areas you are navigating to see what you might be able to use.

        Comment


        • #5
          - Optimum sensor height for us was ~8mm (1 brick height)

          - Reflected intensity is much better than color. We use 80/20 for white/black. 20-80 indicates a different color (like the blue around the T-bars)

          - Make sure the sensors are calibrated equally. If the sensors read different intensities over the same spot, you need to calibrate them.

          - Lines of <8mm will not be reliably picked up by the sensor when moving.

          Last edited by mageus; 10-23-2018, 05:28 PM.

          Comment


          • #6
            The EV3 color sensor is rather selective about what colors it thinks are green, blue, red or yellow. It appears to be most picky about green. Lots of things I think are green the color sensor reports as blue or black. About the only thing it reliable reports as green is a green LEGO brick.

            Red and yellow are tough using either the color mode or reflected light mode. The color identification problems may have something to do with the sensor's inability to see green very well. Yellow is nothing more than Red with some Green added. If you can't see green you probably can't see yellow. In reflected light mode Red, Yellow and White all appear about the same. The sensor turns off the Green and Blue LED's, measuring the intensity of reflected red light. Red, yellow and white all reflect red about the same, so their intensity values will be about the same.

            Using the color sensor to locate features is problematic. What is the color when the sensor is half over blue and half over white? What is the color when half over yellow and half over white? The transition areas are undefined. They may return no color, or one of the two colors, or a third color. I use reflected light intensity to identify areas of color and reserve using color for times when I can guarantee (perhaps using the reflected light mode) that the background color is uniform and a color I expect.

            Comment


            • #7
              I agree with Dean. Last year my daughter spent a whole afternoon trying to write a program that determines if it was the "black line sandwiched by the white lines". Logically it was a good solution, and we actually tried with the Virtual Robotic Kit and it runs perfectly in simulation. But it failed miserable on the real table. It turns out the color sensor returned sometimes green and sometimes brown at where black and white meets...

              Comment


              • #8
                Using RGB mode and RGB-to-HSV conversion increases useful distance almost 10 times
                2016 WRO Regular Junior
                2017 WRO Regular Senior
                2018 WRO Regular Senior

                Comment


                • #9
                  Originally posted by dofmaster View Post
                  Using RGB mode and RGB-to-HSV conversion increases useful distance almost 10 times
                  Unfortunately, it is not legal to use the RGB block in FLL.
                  Mentor: Not the Droids You Are Looking For - retired (World Festival Champion's 2018)
                  Judge: Western PA, World Festival, Razorback Open, Mountain State
                  Head Referee: Western PA Championships

                  Comment

                  Working...
                  X