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]:=
Click for copyable input
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.

show complete Wolfram Language input
Out[2]=

Define a distance function from a set of colors to a region using the new RegionDistance function.

In[3]:=
Click for copyable input
X

The predicted season is the one that minimizes this distance.

In[4]:=
Click for copyable input
X

Test the classifier on the remaining images.

show complete Wolfram Language input
Out[5]=