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

### image processing- area of polygon

• 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!
thanking you in advance...
```
 0
Reply tomer 5/19/2010 10:45:23 AM

```"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
Reply Sean 5/19/2010 12:20:05 PM

```"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
Reply Matt 5/19/2010 1:22:05 PM

```> 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
Reply tomer 5/19/2010 3:40:24 PM

```"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
Reply Matt 5/19/2010 4:01:38 PM

4 Replies
244 Views

(page loaded in 0.032 seconds)

5/19/2013 11:25:41 AM