Color-Based Season Classifier
Build a classifier to separate images of the four seasons, based on the dominant colors available in images of each season, using the new built-in region operations.
Some public domain images are the source of the seasons' colors.
In[1]:= | ![]() X |
The images have different color distributions, but describing them is not easy in the RGB space.
Out[71]= | ![]() |
In the Lab space, the hues are easily separable from the luminance.
Out[72]= | ![]() |
A convex hull is defined from the distribution of the dominant colors for each season with the function ConvexHullMesh.
Out[2]= | ![]() |
Define a distance function from a set of colors to a region using the new RegionDistance function.
In[3]:= | ![]() X |
The predicted season is the one that minimizes this distance.
In[4]:= | ![]() X |
Test the classifier on the remaining images.
Out[5]= | ![]() |