Wrote code to find a function from a larger segmentation to a smaller one by similarity. May not be the right approach after all, as it may make more sense to consider functions from the smaller to the larger, or arbitrary relations between the 2 segments, or maybe just one-to-one relations? It seems the choice is going to depend on what we want to achieve with the matching, and I'm not sure of that just yet.
The general segment matching algorithm seems to be correct and functional. However there is likely an implementation bug for the computation of segment areas, as they yield incorrect results, leading to poor matching. Simply using is not sufficient. Position might still be interesting.
Added fuzzylite for fuzzy control systems. Now the project is correctly configured to use it. Still crashes when adding rules for some reason.
Segment matching classification now functional, successfully classifies all the manually segmented images.