I have this picture:
I'de like to obtain the distance between two of these points. The black scale bar is 3$\mu m$.
To do so, I import the image to Mathematica and call it pic. Then by finding dominant colors, I define red as
red = RGBColor[0.827134595933227, 0.00309700865836607,
0.08256587730260687, 1.];
And then I obtain the coordinates of the centers of the dots as
centroid[pic_,color_] := ComponentMeasurements[
Binarize@ColorDetect[pic,color],
"Centroid"
][[All,2]]
coordinates = centroid[pic,red]
So
{{5.5, 39.5}, {13.9828, 37.5345}, {34.2308, 37.8846}, {23.6034,
34.8103}, {5.38571, 32.5571}, {15., 29.}, {1.19231, 24.8077}}
Now, let's say we want to obtain the distance between two points of coordinates: {15., 29.} and {23.6034, 34.8103} which is 10.3816.
Now, my question is that how can I also determine the size of scale and obtain the real distance between these two points?