x


Colour Detection System

Hey all! I did some searching and found nothing but basically I am wondering if there is anyway to make an action happen if a certain colour is detected?

For example, a camera facing a blank wall, and if a green coloured object appears it prints "Green". If a blue object shows it prints "Blue"?

Another wording would it can recognise different colours. I know this is coming close to artificial intelligence but is there anyway to code it easily, if not just say :) thank you!

more ▼

asked Aug 05 '12 at 12:30 AM

slayer29179 gravatar image

slayer29179
361 12 19 23

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

The simplest way would be to make tags for different colors, and apply the appropriate tags to various objects. Then use raycasting, and check the tag of any object the raycast hits.

more ▼

answered Aug 05 '12 at 01:00 AM

Eric5h5 gravatar image

Eric5h5
80.2k 41 132 519

Thank you :)

Aug 05 '12 at 01:12 AM slayer29179
(comments are locked)
10|3000 characters needed characters left

You could identify the colors with the materials assigned. A simple trace from the camera in the viewing direction would hit the object and you can easily find out (material name, maybe, but a tag would be better) if it's "red" or "blue".

A limited strategy, as every model would have only one color. But, depending on the project, it could be sufficient.

more ▼

answered Aug 05 '12 at 01:32 AM

diegzumillo gravatar image

diegzumillo
3 1 2

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x506
x12
x1

asked: Aug 05 '12 at 12:30 AM

Seen: 321 times

Last Updated: Aug 05 '12 at 05:36 AM