So for a circle with radius 0.7 units generated in Scilab, I used the function follow() to get the coordinates of the contour of the circle.
500x500 pixel image of circle with radius 0.7 unit |
object contour |
The area of the circle with radius 0.7 is 1.5393804 units while the computed area using the method described above is 1.525104. This puts the error to 0.9274121% from the real area, which probably arises from the discrete points defined by the pixel coordinates -- as opposed to a continuous contour. This should be expected since I'm solving for the area of a curved surface approximated by very small segments. The use of a higher resolution image may be able to minimize this error. For this image I used a 500x500 pixel image. For a 600x600 image, the %error is reduced to 0.7457806%.
If we use the same technique on a 500x500 pixel image of a square with side 1 unit, the area computed is 0.992016 unit, off by 0.7984% from the real area of 1 unit.
This technique can also be used to estimate the area of a place. Using a snapshot of The Pentagon from GoogleMaps, I estimated its area to be 41078 pixels or using the scaling found at the lower left of the snapshot, 140871.06 sq. meters. According to this article, the Pentagon building is built on 116,000 sq m of land, including a central courtyard that is 21,000 sq m. This comes to a total of 136,000 sq m, that brings the computed area to an error of 3.581659%. This could come from low resolution of snapshot, the method used or other GoogleMap-related errors. Not bad. :D
Snapshot of The Pentagon in GoogleMaps |
The Pentagon isolated as one object, using Paint. |
_______________________________________________________________________________
I'm giving myself 10 points for the activity. But I posted part of it late, so -3 for that.
No comments:
Post a Comment