COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### image processing- area of polygon

• Email
• Follow

```hey,
I have a known closed polygon which represents diffrent pixels on the image.
I need to calculate the area of the polygon in Cm.
I can use the function 'polyarea' however I get the result in pixels which doesn't help me.

I will appreciate any help I can get!
```
 0

See related articles to this posting

```"tomer flo" <tomer_fl@yahoo.com> wrote in message <ht0fg3\$li4\$1@fred.mathworks.com>...
> hey,
> I have a known closed polygon which represents diffrent pixels on the image.
> I need to calculate the area of the polygon in Cm.

cm^2 ?

> I can use the function 'polyarea' however I get the result in pixels which doesn't help me.

Well what is the cm equivalent of a pixel side?  Let's say a pixel is 2cm then each pixel has an area (2cm)*(2cm) = 4cm^2*polyarea_output.

See Steven Lord's comment in this thread:
```
 0

```"tomer flo" <tomer_fl@yahoo.com> wrote in message <ht0fg3\$li4\$1@fred.mathworks.com>...
> hey,
> I have a known closed polygon which represents diffrent pixels on the image.
> I need to calculate the area of the polygon in Cm.
> I can use the function 'polyarea' however I get the result in pixels which doesn't help me.
=======

Can't you just multiply by the area of 1 pixel?

In any case, see also CONVHULLN. Assuming its a convex polygon, convhulln will compute the area for you, if you give the vertex coordinates in cm.
```
 0

```> Well what is the cm equivalent of a pixel side?  Let's say a pixel is 2cm then each pixel has an area (2cm)*(2cm) = 4cm^2*polyarea_output.
>
> See Steven Lord's comment in this thread:

I read Steven Lord's comment and I understood I need some kind of known reference distance in the image in order to do convertion between pixels to cm.
the problem is that I don't know the square of one pixel in cm....

my question is: if don't know any distance in the image (for example: distance between 2 objects in the image) is there other way to do the convertion?

thanks
```
 0

```"tomer flo" <tomer_fl@yahoo.com> wrote in message <ht10p8\$oh\$1@fred.mathworks.com>...
>

> my question is: if don't know any distance in the image (for example: distance between 2 objects in the image) is there other way to do the convertion?
======

No.
```
 0