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.
It seems to work, I tested it with another image that does not have blue at those coordinates and it didn't detect blue.
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.
No comments:
Post a Comment