5
$\begingroup$

In this link: http://broadwaysand.com/?page_id=165, you can find different gravel pictures.pea gravel and sand

A quarter dollar coin gives the scale, because its diameter is 0.955 inches (24.26 mm)

I want to get the Particle Size Distribution and plot the cummulative granulometry curve, this is the percentage of the material less than a given size.

I'm not very experienced on image analysis and I don't know where to start: How to calculate the picture size identifying the coin, and afterwards find the particle sizes.

enter image description here

$\endgroup$
3

1 Answer 1

12
$\begingroup$

It will only be good for a rough estimate, but you can segment the image using WatershedComponents and then visualize the results

img = ColorConvert[Import["https://i.sstatic.net/t3u7G.jpg"], "Grayscale"]; seg = WatershedComponents[img, Method -> {"MinimumSaliency", 0.5}]; seg // Colorize 

enter image description here

Now you can use ComponentMeasurements to get the area of each colored region and then plot the results. Below I've plotted a histogram showing the number of detected particles (vertical axis) of each size (on the horizontal axis).

areaComp = ComponentMeasurements[seg, "Area"]; areas = areaComp[[All, 2]]; Histogram[areas] 

enter image description here

Histogram[areas, "Log", "CDF"] 

Mathematica graphics

$\endgroup$
5
  • 1
    $\begingroup$ thanks to @belisarius for the log histogram... that looks more like the plot the OP was expecting! $\endgroup$ Commented Aug 22, 2015 at 12:56
  • 1
    $\begingroup$ I thought exactly the same :) $\endgroup$ Commented Aug 22, 2015 at 14:18
  • $\begingroup$ Area[D_] := (Pi/4)*D^2 so Area[24.26 mm] = 462.244 mm^2, as the coin looks larger than any other pebble the histogram should reach the 100% before 462 mm. $\endgroup$ Commented Aug 22, 2015 at 21:05
  • $\begingroup$ Nice job bill s! $\endgroup$ Commented Aug 22, 2015 at 21:09
  • 1
    $\begingroup$ In fact, the largest segment is the coin, which has area 47949 pixels (it's the first element of areas). $\endgroup$ Commented Aug 22, 2015 at 22:36

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.