[SciPy-user] Measuring local image contrast

Carlos da Silva Santos carlos.s.santos at gmail.com
Tue Apr 22 13:14:18 EDT 2008


It seems you are looking for a laplacian filter. Take a closer look at
the implementation in scipy.ndimage.

HTH

Carlos

On Tue, Apr 22, 2008 at 12:59 AM, Martin Spacek <scipy at mspacek.mm.st> wrote:
> Given a 2D numpy array of image pixel values, I'd like to get an output array whose entries describe the local contrast around each of the pixels in the input. I'm not sure exactly how this is typically done in the image processing field, but I'm guessing one way would be to take the difference between the center pixel and the mean of the surrounding 8 pixels. Is there a standard way to do this in numpy/scipy? Maybe describe the operation in a kernel somehow, and then convolve it with the image? I've looked at scipy.ndimage, but nothing pops out for me. Same goes for PIL's ImageFilter. My problem is probably lack of familiarity with the nomenclature.
>
>  Cheers,
>
>  Martin
>  _______________________________________________
>  SciPy-user mailing list
>  SciPy-user at scipy.org
>  http://projects.scipy.org/mailman/listinfo/scipy-user
>



More information about the SciPy-User mailing list