Hi Pavlo,
I did manage to get your example code working, though I agree with Stéfan that the Matplotlib GUI doesn't really enable great interactivity.I also tried loading a different image (a frontal view X-ray of the hips), but since it was really big (4kx4k) your cost calculation became pretty slow, so there's room for improvement there ;-)Also, the choice of filter and threshold didn't work out at all for my image, so that should probably be more configurable.I was rather surprised how well it worked, given that it only calculates a minimal cost path. I reckon that once the edges aren't as strong as they are in this image, it won't perform as well.Then fixing such segmentations suddenly becomes a lot more painful in my experience, because the algorithm won't help you anymore and you don't want to have to draw the entire path by hand.Perhaps Emmanuelle or Juan has any suggestions on how we can make the calculations more robust?Ivo