# Image partition according to contours

I want to extract contours from following image or I am wondering how to partition following image:

line image looks like:

This question is linked: How to superimpose contour lines on transformed image

• Would this help? Colorize@MorphologicalComponents[ ColorNegate@Import["http://i.stack.imgur.com/agPO0.png"], CornerNeighbors -> False] Feb 20 '14 at 0:03

i = Import["http://i.stack.imgur.com/agPO0.png"];