Source files are accessible in this directory.
Input is lena.png:
When we create an "inter-pixel" image, its size doubles so it can contain all the metadata associated (values on edges for example). In this demo, edge values are green and gaps between edges are blue.
We can stretch each pixel value to a 3*3 square for better visualization.
This is the mask of edge values. Bright values show a high contrast between pixels.
Finally, we can run a watershed segmentation on the mask of edge value to segment our input image.