Colour detection algorithm in PHP

Last weeks I’ve been working on colour detection algorithm so in this post I will share few ideas how to solve this problem.

First think we need to do is to choose the area where we will be checking colours. roi_sThis area is called ROI and usually it’s a rectangle located in the center of an image, covering 5/6 of it’s size. ROI is necessary because the most of images has relevant data located in the center (faces, logos, etc…), therefore colours on the edges won’t be important for us.

Continue readingContinue reading