9x9 Focal Mean of an Image

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

9x9 Focal Mean of an Image

Meagan Ita
Dear List,

Does anyone know if it's possible to do a sort of sliding neighborhood
operation on every pixel in an image? The operation would need to be a 9x9
focal mean on every pixel. In other words, averaging the 9x9 block about
every pixel and setting the pixel equal to that average.

Thank you for any help!

Regards,
M. Madison
Reply | Threaded
Open this post in threaded view
|

Re: 9x9 Focal Mean of an Image

Michael Doube-3
Dear Meagan,

>In other words, averaging the 9x9 block about
> every pixel and setting the pixel equal to that average.

I think you need Process > Filters > Mean, with radius = 4.5, right?

Michael
Reply | Threaded
Open this post in threaded view
|

Re: 9x9 Focal Mean of an Image

Michael Schmid
In reply to this post by Meagan Ita
Hi Meagan,

if you want to average over a square region, use the Fast Filters plugin
with radius=4.
"Fast Filters" is either in the Plugins>Filters menu or you can download
it from
http://imagejdocu.tudor.lu/doku.php?id=plugin:filter:fast_filters:start

If you want to average over a circular region, use the built-in
Process>Filters>Mean command with a radius of 4 or 4.5 (see
Process>Filters>Show Circular Masks for the regions used)

Michael
_________________________________________________________________

On Fri, July 1, 2011 21:57, Meagan Ita wrote:

> Dear List,
>
> Does anyone know if it's possible to do a sort of sliding neighborhood
> operation on every pixel in an image? The operation would need to be a 9x9
> focal mean on every pixel. In other words, averaging the 9x9 block about
> every pixel and setting the pixel equal to that average.
>
> Thank you for any help!
>
> Regards,
> M. Madison
>
Reply | Threaded
Open this post in threaded view
|

Re: 9x9 Focal Mean of an Image

Thomas Pengo
In reply to this post by Meagan Ita
Hi Meagan,

if you want to do precisely what you said, and have fine control over what's
happening, you can use the "Process/Filters/Convolve..." menu item, with
filter:

1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1

and the "Normalize" checkbox checked.

On the other hand, if you just want to smooth your image, you may get better
results by using a Gaussian filter or use one of the other good suggestions
you already received.

Cheers
Thomas


On 1 July 2011 21:57, Meagan Ita <[hidden email]> wrote:

> Dear List,
>
> Does anyone know if it's possible to do a sort of sliding neighborhood
> operation on every pixel in an image? The operation would need to be a 9x9
> focal mean on every pixel. In other words, averaging the 9x9 block about
> every pixel and setting the pixel equal to that average.
>
> Thank you for any help!
>
> Regards,
> M. Madison
>