LEGO Engineering

| | | | | | | |
How to tell different colored objects apart in vision center


23rd of April, 2010

(9 )
77% thumbs up 22% thumbs down

First define three different sensors, putting each of the sensors on a different plane. In order to define your sensor on a certain plane click on the small box just below and on the right hand side of your preview window. This box will change color and is imposing a certain color plane upon the image. For example, in the picture below the sensor is defined on the red plane: 

color_matching_pic_1.jpg

You might have noticed that in the picture above the word red is lighter than the background. This is because the word red is written in red ink. The average function is used here and in the image above has a value of 152. This can be used to tell the difference between different color objects. The other two sensors were defined on the planes and saved under the names of the plane they were defined on. In the following two screen shots you can see that the container with the appropriate plane always has the highest average. For example the “Blue!” gives the largest value in the blue container, which is set on the blue plane. By comparing the values of the various containers it is possible to tell what color the object is.

color_matching_pic_2.jpg

Below is the same thing except with red, notice that the red container has the largest value.

color_matching_pic_3.jpg





AG
ses

\n
   :
   :
* :
* :
 


Home | About Us | Contact Us

© 2013 Center for Engineering Educational Outreach, Tufts University
© 2013 The LEGO Group. All rights reserved.