comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Image statistics via moving window
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Image statistics via moving window [message #67799] Fri, 28 August 2009 16:20
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On Aug 27, 9:34 am, pitris <pe.lu...@gmail.com> wrote:
> Hello,
>
> I want to obtain a basic statistics values within a fixed areas of a
> image (let's say 30x30px) - mean and standart deviations. I'm thinking
> about some type of moving window (2D matrix-30r x30l) for which these
> values will be calculated and stored into a new image file, where
> every pixel value will represent a mean of a 30x30 pxiels from a
> source image. Do you have some ideas how to do that? I'm using a
> CONVOL function for a classic per-pixel convolution, but in this case,
> window should be moving not per-pixel but rather per-specified-area.
>
> Thanks,
> Peter


You can do this using SMOOTH... I know there have been discussions
about it before, but the Google Groups search seems to be on the
fritz, so I can't find them. SMOOTH on its own will give you the mean,
and to get the standard deviation, you can do something like

sdevimage = smooth(image^2, 30) - smooth(image, 30)^2

(with possible factors of 30^2 or 30^4 missing)

-Jeremy.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Measuring sphericity of a set of voxels.
Next Topic: Compound Widgets

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 21:15:51 PDT 2025

Total time taken to generate the page: 0.64145 seconds