[Image-SIG] Patch Analysis

Roy H. Han starsareblueandfaraway at gmail.com
Thu Dec 4 16:24:46 CET 2008


Mandar,

You can use k-means clustering to group pixels of the same class.  The scipy
module has a clustering function, as well as the PyCluster module.

For the perimeter problem, maybe you can extract the patches as a separate
image (without irrelevant pixels) and then use edge detection to get the
border pixels.  The PIL Image.filter and ImageFilter modules have an
FIND_EDGES method.

RHH

On Fri, Nov 28, 2008 at 1:36 PM, Mandar Sarlashkar <mann_sar at hotmail.com>wrote:

>  Hello !
>
> Thanks a lot for your reply.
>
> Analysis is pixel based.
> For knowing the land-use mix I can use a 3x3 window operation.
> But I dont know how to group pixels of same class (patch) as there will not
> be just one patch but several in an image with same pixel values.
> For example water - there might be many water bodies dispersed in an
> image.
>
> Also, as you mentioned area calculation is pretty straight but If I am able
> to identify patches, how to estimate the number of pixels in an outline for
> estimating perimeter.
>
> Thank you.
>
> Maddy
>
>
> ------------------------------
> Date: Fri, 28 Nov 2008 12:55:48 -0500
> From: starsareblueandfaraway at gmail.com
> To: mann_sar at hotmail.com
> Subject: Re: [Image-SIG] Patch Analysis
>
>
> How are you getting your patches?
> If you are doing it on a pixel by pixel basis, then you can simply count
> the number of pixels in a patch to estimate the area and you can count the
> number of pixels in an outline of the patch to estimate the perimeter.
>
> 2008/11/28 Mandar Sarlashkar <mann_sar at hotmail.com>
>
>
>
> Dear all,
>
> I am planning to use PIL in my assignment.
>
> One of the tasks is to calculate index such as 'Patch Density' for a
> classified Land-use Land Cover Image.
>
> I am not getting how to handle different class patches in an image.
> How can I retrieve information for each patch such as area and perimeter?
> I can use FRAGSTAS for getting such indices but a python script
> or guidance how it can be done using python and PIL will be more helpful.
> Thanking you for your time and consideration in advance.
> Regards,
> Maddy
>
> ------------------------------
> What's on the ramp today could be on the streets tomorrow. Keep up with
> trends on MSN Lifestyle Try it! <http://lifestyle.in.msn.com/>
>
> _______________________________________________
> Image-SIG maillist  -  Image-SIG at python.org
> http://mail.python.org/mailman/listinfo/image-sig
>
>
>
> ------------------------------
> Calling TV buffs! Get TV listings, gossip on your fave stars and updates on
> hot new shows Try it now! <http://entertainment.in.msn.com/tv>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20081204/7eaea4b4/attachment-0001.htm>


More information about the Image-SIG mailing list