Adding a layer os abstraction to deal with image segments and improve the matching strategy.
Moving some methods around for better logic.
Separate spec file for Segment.
Adding a test with segments in wich actually uses a segment of the image.
Make the segment limit the group of pixels where the matching is applied.