1

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

line image looks like:

enter image description here

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

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

1 Answers1

5
i = Import["https://i.stack.imgur.com/agPO0.png"];
(mc = MorphologicalComponents[ColorNegate[i], CornerNeighbors -> False]) // Colorize
Grid@Partition[ Image /@ (Replace[mc, Except[#] -> 0, {2}] & /@ Range@Max@mc), 4]

Mathematica graphics

Dr. belisarius
  • 115,881
  • 13
  • 203
  • 453