Group Abstract Group Abstract

Message Boards Message Boards

1
|
21K Views
|
13 Replies
|
1 Total Like
View groups...
Share
Share this post:

How can accurate measurements be made of angles found in an image?

Posted 11 years ago

I am a materials scientist studying the microstructures of alloys of tungsten, iron, and nickel processed using liquid-phase sintering. The alloys produce microstructures full of spheroid tungsten particles, some of them connected to other particles, within a matrix of iron-nickel alloy. In places where two particles connect, they form a "neck" between them, which appears as a solid-solid boundary extending in two directions to "triple-points" where the solid-liquid boundaries of the surfaces of the respective connected particles both intersect. The angles formed by the respective orientations of the three intersecting boudaries are known in literature as "dihedral angles" and are indicative of the respective energies of the boundaries that form them. The relative differences in boundary surface energies has dominating effects on the evolution of the microstructures of these alloys through the processing/sintering time, and so it is important to have tools that can take automated measurements of them as they appear in digital micrographs so that large samples of measurements may be accumulated to provide a large sample and more accurate estimates of the population statistics.

I have developed Mathematica code that will binarize the grayscale images that I have, and refine these binary images so that they closely represent the shapes and contours of the surface boundaries of particles. Also, I have used the ImageCorners operation to identify the triple-points in the images with good success. This leaves me with the task of taking measurements of the angles at these triple points. Most of the discussion that I have seen so far involves measurements of angles at "branches" where vertexes are identified and numbered and then used to find the angles using the "VectorAngle" operation. This approach may work, but the closest that I have come to isolating branches in my images is by using the Perimeter function to make an image of just the pixels at the particle boundaries and their intersections. This leaves me with a bit of code left to do, and I am just starting out in Mathematica and not quite up to that task yet. Any help is appreciated.

Attachments:
POSTED BY: Phillip Green
13 Replies
Posted 7 years ago

Hello David, May you please let me know how to export all the angles with coordinates in a text or excel file? I am pretty unfamiliar to Mathematica so struggling to get it.

Regards, Mirtunjay

POSTED BY: Mohammad Ashiq

I'll send you an email now.

POSTED BY: David Gathercole

Thanks for you insight on this. I understand tolerably well in "concept" the challenge and believe that some more work on the portion of the code that fits the data will produce results. However, I'm not confident that my skills in the Wolfram language will allow me to work constructively on such a problem, at least not yet. I would like to ask if you may consider collaborating on this problem in a more formal way, perhaps with the benefit of being published or for a consulting fee. Any arrangement I might make will need approval by my adademic advisor, but I believe this can happen. My contact information is as follows: Phillip Green, gt9226a@gatech.edu

POSTED BY: Phillip Green
POSTED BY: David Gathercole
POSTED BY: Phillip Green

In a fit of laziness I've used Fit to fit lines to the point sets in cornerpoints, where we are after the line gradients. The issue here is that Fit finds the y values in terms of the x values, and thus isn't appropriate for us where one x has multiple y images. There are various workarounds, but it would be better to just use a more suitable algorithm.

Take each set of points, and calculate the differences between successive points in each dimension. Then total these differences, and divide them to obtain the average gradient along each line. Plug these gradients into some trigonometry for the angle between the two lines.

ListPlot[#, PlotLabel -> 
    N[Abs[-180 / Pi ArcTan[(x - y)/(1 + x y) /. {
        x -> Divide @@ Total[Differences[#[[1]]]], 
        y -> Divide @@ Total[Differences[#[[2]]]]
}]], AspectRatio -> 1, PlotRange -> All] & /@ cornerpoints

This leads to a lot of division by zero complications (that I have not resolved in the above implementation), and makes the fitted lines harder to plot over the data; but most importantly, is always correct!

POSTED BY: David Gathercole
Attachments:
POSTED BY: Phillip Green

Hello Dave G., I just read your comments and I am absorbing them now, but wanted to acknowledge them and thank you for them. I am glad this problem has piqued some interest out there. I am cautious in saying this, but it seems to me that extracting this type of individual measurement at this scale in microstructures is a bit novel and a departure from other work in image analysis that I've seen so far. I'll look at the notebook and let you know what I can do with it. Thanks again. Phill.

POSTED BY: Phillip Green
Attachments:
POSTED BY: David Gathercole
POSTED BY: Phillip Green
Posted 11 years ago

This is an interesting problem. I have been thinking of an approach based disks of successive radii. Looking at the top image, begin at a vertex and define a disk region of a small radius. Count the black pixels within the disk. Do the same for successively greater radii. At each step, the rate at which the black pixel count grows is a function of the arc subtended by the black region at that radius. For any given radius, this may be a noisy number. But if the curve could be fit, perhaps from the fit could be determined an estimate of the angle of separation at the start. It would help if some assumption could be made regarding the form of the function to be fit.

POSTED BY: David Keith
Attachments:
POSTED BY: Phillip Green

Hi Phillip,

Would you mind posting some source data, for example one of your input images at max resolution.

My immediate commentary regards data cleanliness. The sample image you're working from contains four areas that are aligned with varied precision. You are examining corners along these boundaries, along with corners at the edges of the image (notably some noise in the top right has created at least one erroneous corner.)

I would suggest partitioning your input into each separate image, and then extracting the shapes entirely contained in each image. If you're expecting high variance this suggestion may be inappropriate, as it may skew your corner data towards that of smaller 'blobs'.

Finally, all of these corners feature highly curved edges, thus the higher resolution we examine the smaller the output angles will be. Will all the input data be at a consistent resolution? Is there a specific pixel radius you want to specify measuring at?

David

POSTED BY: David Gathercole
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard