介绍通过比较颜色来检测一片区域，并进行处理的方法，采用了Strategy design pattern.
Let’s say we want to build a simple algorithm that will identify all of the
pixels in an image that have a given color. For this, the algorithm has to
accept an image and a color as input and will return a binary image
showing the pixels that have the specified color. The tolerance with
which we want to accept a color will be another parameter to be
specified before running the algorithm.
Our ColorDetector class identifies the pixels in an image that have a
color similar to a given target color. The decision to accept or not a pixel
is simply made on a per-pixel basis. The cv::floodFill function
proceeds in a very similar way with one important difference: in this
case, the decision to accept a pixel also depends on the state of its
neighbors. The idea is to identify a connected area of a certain color.
The user specifies a starting pixel location and tolerance parameters that
determine color similarity.