How to find the area of any irregular shape?

You ask us to avoid breaking the image into smaller shapes, yet your input, a JPEG image, is essentially already just that. Even the suggestion to use integration relies on breaking the object up into infinitessimal parts. So I'm not not going to avoid the obvious.

Of course, we need a scale so here's another copy of your image:

enter image description here

Let's assume that the rectangle bounding this image has area 1. Then it's just a matter of counting the gray pixels and dividing by the total number of pixels. Applying a little Mathematica code to your original image, which has different dimensions from mine, we get

img = Import["http://i.stack.imgur.com/ZriDw.jpg"];
data = MorphologicalComponents[Binarize[img]];
N[Count[Flatten[data], 1]/Times @@ Dimensions[data]]

(* Out: 0.466297 *)

Like noted in the comments, if you have a (piece-wise smooth, Jordan curve) parametrization $\gamma = (\gamma_1, \gamma_2) : [0,1]\to \mathbb{R}^2$ of the boundary, the area enclosed by $\gamma$ can be calculated by Green's theorem:

http://en.wikipedia.org/wiki/Green%27s_theorem

For example using $L=0$ and $M(x,y) = x$ we have the formula

$$A= \int_D 1= \int_{0}^1 \gamma_1(t) \gamma_2'(t)dt. $$


Approximate the figure by a polygonal line, draw a rectangular grid $\big($lattice$\big)$ inside the image, and apply Pick's theorem.

Tags:

Area