How to tell different colored objects apart in vision center
23rd of April, 2010
(9 )
77%
22%
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:
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.
Below is the same thing except with red, notice that the red container has the largest value.