8
$\begingroup$

I've applied Mathematica to the problem of estimating the area of an estuary, but when I got the results I wasn't able to understand in which unit of area it was given. My approach is the following:

Here is the image of the shape of the estuary:

The shape of estury that I've used,

The horizontal line in the lower right side represents the scale, namely its length represents 1 kilometer.

Using the routine:

img = Binarize@
Import["C:\\Users\\Klën\\Documents\\Wayner - USP\\Rio Doce\\No \
estuário\\cont2.jpg"]~Erosion~1;
(m = MorphologicalComponents[img]) // Colorize

I've got:

Image binarized and colored.

And, applying the following code I've got the total area of pink region

in[63] = 2 /. ComponentMeasurements[{m, img}, "Area"]
out[64]= 461259.

But I really don't know in wich units the result is given, I would like to show the results in $km^{2}$, how could I do that?

$\endgroup$
3
  • 4
    $\begingroup$ Use the "get coordinates" tool to find out how many pixels wide the scale is, then divide your area by the square of that. $\endgroup$
    – C. E.
    Commented Nov 29, 2015 at 4:16
  • $\begingroup$ Thank you @Pickett, then Is the unit always given in pixels? $\endgroup$ Commented Nov 29, 2015 at 4:22
  • 2
    $\begingroup$ For operations on 2D images I can't think of any other unit. $\endgroup$
    – C. E.
    Commented Nov 29, 2015 at 5:14

1 Answer 1

4
$\begingroup$
linecount = 
  3 /. (Binarize@Import["https://i.sstatic.net/Wmeps.jpg"] // 
       ColorNegate // Thinning // 
     ComponentMeasurements[#, "PerimeterCount"] &);
areacount = 
  2 /. ComponentMeasurements[MorphologicalComponents[img], "Count"];
areacount/linecount^2 // N

9.70249

The area is $9.70249 km^2$ I think.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.