U
U
uRodETs2014-01-15 12:57:22
Programming
uRodETs, 2014-01-15 12:57:22

How to determine the area of ​​an arbitrary plane figure?

The source data is an image obtained with a scanner ("something" on a white background).
It is necessary to process this image using some programming language and get the value of the area occupied by the figure on a white background at the output. There may be some markers on the image as reference points. Can you tell me how to start solving this problem? Where can I see algorithms, examples of working with images, etc., so that it is clear enough?
I'm new to programming. The task is solved within the framework of my work, which has nothing to do with programming. Thanks in advance.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Vadim Yakovlev, 2014-01-15
@FrimInc

The most primitive, terrible, suboptimal option is to count the number of pixels in the figure and divide by dpi - get the area in square inches.
But here really any form will be considered.

S
s0m, 2014-01-15
@s0m

Alternatively, try the Monte Carlo method to calculate the area.

T
tsarevfs, 2014-01-15
@tsarevfs

Have a look at the PIL library for the python language. You will need to apply some filters to make the image black and white, possibly reduce the resolution. Then calculate the proportion of
black pixels from the entire image.

V
Valentine, 2014-01-15
@vvpoloskin

A non-convex figure ... an integral in polar coordinates?)))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question