Dividing the components into segments and measuring the wall thicknesses

25 56

Hi Guys,

I am looking for a way to subdivide my components (see scans) into 17 segments analogously to the figure and then measure the wall thicknesses. The measuring points start from the center of the circular area and are subdivided into 15 ° segments. I would be very happy about your help, because the measurement is fundamental for my thesis.

best regards
Gkhn28

Hi @Gkhn28,

First problem I see is that your photo doesn’t seem to be in the same plane that your component. So there is a visible edge (in gray) in the inner hole. And are all objects in the same position, compared to the camera ? It may be a real bias.

Nico

1 Like

Hi @Gkhn28, welcome to the forum. It’s great that you’ve uploaded some exampe images, but it’s also helpful to other members if you can indicate what you’ve tried so far and what sort of experience you have with the tools you’re trying to use (ie. ImageJ / Fiji).

This problem can fairly easily be solved using the macro language (bearing in mind the caveats @VirtualSlide mentions) :

If you’re comfortable learning or already have experience with it, the following steps are the way I would approach solving the problem:

  • Crop images so you have one object per image
  • Automatically calculate the centroid of the hole by thresholding your image and using Analyze Particles (link) to detect oval objects not touching the edge of your image (there should only be one)
  • Once you have the centroid position you can draw uniform length radial lines using makeLine() (link) and a little trigonometry to calculate for 15 degree increments what the X and Y offsets are from the centroid point (IE the other end of the line).
  • With the lines, you can plot the profiles to give you something like this for each line:

  • From here there are many ways to approach calculating the width of the trough. My first idea was to count the number of pixels (along the X-axis) where the value is below the mean. You can do this in macro code by using getProfile (link) then calculating the resultant Array mean with Array.getStatistics (link). You can then loop through the Array and count the number of values below the mean, thus giving you the thickness of the band.

Anyway, that’s one way to approach the problem. I hope that’s some inspiration. Feel free to post back if you have problems or questions along the way.

4 Likes

As it’s been a week with no reply, if anyone is interested, the script to replicate what is in my reply, is linked below (you’ll need to download the original image and change the path) :

https://bitbucket.org/snippets/davemason/onRM4g

Very impressive, thanks for the answers and for your effort. I have not been able to contact you yet because many requirements have changed in the meantime. About me: the program and the tools were still unknown to me, so I have no experience. I had to get used to it first. But the problems you have identified (visible gray edges) are also known to me. I will give you an update soon as I have progressed and would like to thank you again.

You can hava a look at the “Local thickness” plugin that would perhaps help avoid having to get a profile statistic…

image

with that all you might have to do is get the average value of all non-zero pixels along the lines you’ve drawn… Just a thought

Hi @dnmason, once again, thank you very much for your help. I’ve worked a little bit in the meantime and found that the ratio between the lengths in pixels does not match. Measuring point 1, for example, has a length in pixels of 38, measuring point 2, however, of 19, so that therefore measuring point 1 would have to be twice as thick as measuring point 2, which in turn is not true. Do you have an idea why these disproportionalities appear?

Hi @Gkhn28. Happy to help.

I don’t know what you mean by this. Are you saying that the measured thickness is different across lines? I agree that they are.

Look again at thie image I posted in my first reply. The length of line 1 that covers dark pixels does in fact appear to be approximately twice that of line 2. I wrote the script to your specifications (17 lines at 15 degree increments) and thus, the first and last lines will encroach upon the “base” of your structure giving you an artificially long measurement for lines 1 and 17.

Hope that clarifies, if not, please post back with more detail.

Hi @dnmason, yes, the measured thicknesses are different across the line, but it just confuses me, that Line 1 is not exactly twice as long as Line 2, although it should be so, because line 1 covers twice the number of pixels as line 2. Or have I thought incorrectly about that?

@Gkhn28 to be clear, the length reported, is not the length of the line (which is always the same), it’s the number of pixels the line crosses that have an intensity below the mean intensity of the whole line.

This is a quick and dirty way of estimating the number of dark pixels covered by the line as a corollary to the thickness of your part.

Hopefully that clarifies.

There is another question of how the line profiles counts pixels that are partly covered by the line, but unless that’s explicitely your question, I’m not going to try and pick that apart.

The example below partly illustrates the confusing nature of this:

@dnmason, thank you for your support, my project has made some great strides.