From: Lars-Göran Nord on
"Lars-Göran Nord" <lars-goran.nordh(a)uddeholm.se> wrote in message <i2v3js$ija$1(a)fred.mathworks.com>...
> "Sean " <sean.dewolski(a)nospamplease.umit.maine.edu> wrote in message <i2v36p$lvu$1(a)fred.mathworks.com>...
> > "Lars-Göran Nord" <lars-goran.nordh(a)uddeholm.se> wrote in message <i2v2ls$i6v$1(a)fred.mathworks.com>...
> > > "Sean " <sean.dewolski(a)nospamplease.umit.maine.edu> wrote in message <i2v1ar$ljj$1(a)fred.mathworks.com>...
> > > > "Lars-Göran Nord" <lars-goran.nordh(a)uddeholm.se> wrote in message <i2v0ro$ln1$1(a)fred.mathworks.com>...
> > > > > I have an binary image with several one pixel lines crossing each other (crack pattern) whose total length I'm trying to find.
> > > > > I'm stuck! Any help would be greatly appreciated!
> > > > > Lars
> > > >
> > > > Well, if they're one pixel wide couldn't you just sum them?
> > > > If this isn't what you meant, could you post a picture somewhere so we can have a better idea of what you meant?
> > >
> > > Well I'm not sure it's that easy, the lines are not straight. I'm new to this so please tell me where to post my image.
> > > Thanks,
> > > Lars
> >
> > http://drop.io/
> > Is a good site for images.
> >
> > Do you have image processing toolbox?
>
> Yes I have the toolbox, and will drop the image in 30 min.
>
> thanks again.

The image is now on drop, onepixelline(a)drop.io
This picture was made in photoshop and then processed in matlab, bwmorph(bw2, 'thin', inf);

Lars
From: Sean on
"Lars-Göran Nord" <lars-goran.nordh(a)uddeholm.se> wrote in message <i2v6t1$kq1$1(a)fred.mathworks.com>...
> "Lars-Göran Nord" <lars-goran.nordh(a)uddeholm.se> wrote in message <i2v3js$ija$1(a)fred.mathworks.com>...
> > "Sean " <sean.dewolski(a)nospamplease.umit.maine.edu> wrote in message <i2v36p$lvu$1(a)fred.mathworks.com>...
> > > "Lars-Göran Nord" <lars-goran.nordh(a)uddeholm.se> wrote in message <i2v2ls$i6v$1(a)fred.mathworks.com>...
> > > > "Sean " <sean.dewolski(a)nospamplease.umit.maine.edu> wrote in message <i2v1ar$ljj$1(a)fred.mathworks.com>...
> > > > > "Lars-Göran Nord" <lars-goran.nordh(a)uddeholm.se> wrote in message <i2v0ro$ln1$1(a)fred.mathworks.com>...
> > > > > > I have an binary image with several one pixel lines crossing each other (crack pattern) whose total length I'm trying to find.
> > > > > > I'm stuck! Any help would be greatly appreciated!
> > > > > > Lars
> > > > >
> > > > > Well, if they're one pixel wide couldn't you just sum them?
> > > > > If this isn't what you meant, could you post a picture somewhere so we can have a better idea of what you meant?
> > > >
> > > > Well I'm not sure it's that easy, the lines are not straight. I'm new to this so please tell me where to post my image.
> > > > Thanks,
> > > > Lars
> > >
> > > http://drop.io/
> > > Is a good site for images.
> > >
> > > Do you have image processing toolbox?
> >
> > Yes I have the toolbox, and will drop the image in 30 min.
> >
> > thanks again.
>
> The image is now on drop, onepixelline(a)drop.io
> This picture was made in photoshop and then processed in matlab, bwmorph(bw2, 'thin', inf);
>
> Lars


Well you have to decide what exactly you want to do with this. How do you want to measure pixel line length?
Here's a few ideas to wrap your head around:
Should each individual pixel count as one unit? I.e. from opposing face to opposing face? Or should it be 3*sqrt(2) i.e. corner to corner?

If two pixels share a face should it be 2 units? I.e. opposite face to opposite face? Or should it be 1 unit center to center and the other units dependent on the next pixels off each end?
What I'm hinting at is some sort of Marching Cubes-esque algorithm.

If you just use as I mentioned above it will give you an over estimate but depending on your application that may not be a bad thing. What are these lines measuring and what are you doing with the results?

-Sean
From: Sean on
"Sean " <sean.dewolski(a)nospamplease.umit.maine.edu> wrote in message =
> If you just use
sum()
as I mentioned above it will give you an over estimate but depending on your application that may not be a bad thing. What are these lines measuring and what are you doing with the results?
>
> -Sean
Typo, that sum() was kind of important to that sentence meaning anything.
From: ImageAnalyst on
On Jul 30, 2:50 pm, "Lars-Göran Nord" <lars-goran.nordh(a)uddeholm.se>
wrote:
> The image is now on drop, onepixelline(a)drop.io
> This picture was made in photoshop and then processed in matlab, bwmorph(bw2, 'thin', inf);
>
> Lars-
------------------------------------------------------------------------------------------------------------------------------
Correction: Your image is at http://drop.io/onepixelline

You can use bwarea() if you want a different way of calculating area
than sum(). sum() sums up all the "set" pixels. bwarea() applies
weighting factors to adjust for the fact that pixels, in a triangle
say, may be considered to have partial areas in each pixel depending
on whether neighboring pixels are set. For example
0 1
1 1
Is the area of this 3? Or is it sqrt(2)? Or something different?

From: Lars-Göran Nord on
"Sean " <sean.dewolski(a)nospamplease.umit.maine.edu> wrote in message <i2vah4$gtb$1(a)fred.mathworks.com>...
> "Sean " <sean.dewolski(a)nospamplease.umit.maine.edu> wrote in message =
> > If you just use
> sum()
> as I mentioned above it will give you an over estimate but depending on your application that may not be a bad thing. What are these lines measuring and what are you doing with the results?
> >
> > -Sean
> Typo, that sum() was kind of important to that sentence meaning anything.

Very good comments, first of all the lines are measuring crack lengt (thermal fatigue of steel) and when I have the length of the one pixel lines (cracks) I will calculate an average crack width by dividing the total crack area from the original image with the length of cracks.
From the start I had an idea of finding pixels connected corner by corner and giving them the value sqrt(2) and all others connected face to face 1. I don't follow your 3*sqrt(2).
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10
Prev: Find word in string
Next: starn matlab with crontab