Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Converting a magnified image of a line to a single pixel smoothed
Replies: 11   Last Post: Apr 26, 2013 4:24 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Dave Waddell

Posts: 4
Registered: 4/17/13
Re: Converting a magnified image of a line to a single pixel smoothed
Posted: Apr 19, 2013 1:14 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Thanks. That looks great. I'll look into the functions that you have used as
you suggest.


On 4/17/13 1:30 AM, Dave Waddell wrote:
> I have a magnified image of a 0.1mm line here:
> http://www.d-a-v-e.org/images/Trace.jpg
> ... this converts with Binarize very well:
> http://www.d-a-v-e.org/images/Trace%20binary.jpg
> ... but what I would like to do is convert it to a single pixel wide

smoothed line running right up the middle. Any suggestions or pointers on
how to do this in Mathematica would be appreciated.
> Dave

The sequence below seems like a good start.
The documentation for the functions should help you understand what is going
on in more details:

trace = Import["http://www.d-a-v-e.org/images/Trace.jpg"]

b = ColorNegate@Binarize[trace];
b2 = SelectComponents[b, "Area", -1];
b3 = FillingTransform@b2;
dt = ImageAdjust@DistanceTransform@b3;
result = ColorNegate@Image[WatershedComponents[dt], "Bit"];
HighlightImage[trace, result]

Matthias Odisio
Wolfram Research

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.