Sunday 24 November 2013

Colour detection code...

Fantastic!  The original code was able to find 'blue' within the picture, so the next step is to search a specific region (2) only.  I think my detection will essentially check for red, green, grey, yellow and brown and depending on which colour it finds it will report that colour.

Search for the colour blue within the entire picture


This is the code which currently scans through the entire picture, so in theory changing the for loop to region 2's coordinates should do the job.

Original code

It seems to work, I tested it with another image that does not have blue at those coordinates and it didn't detect blue.

Modified code to test

The next and more time consuming activity is to write code to scan each region and identify the colour within it.

No comments:

Post a Comment