In the previous chapters, we worked mainly with grayscale images. Of course, the shape and intensity parts of objects are important, but what about the color information? Why don't we use that too? For example, a red apple on a table can be easily detected with just the color information. Actually, that is why color object detection sometimes performs much better than other detector methods. In addition, it is much faster to implement these algorithms, and a computer usually consumes less resources for these types of operation.
The tracking.js library provides an outstanding functionality to create a color detection application. We will start from a basic color tracking example. It is relatively simple, but you need to keep in mind that it performs best only when a colored object can be easily separated from the background.