[Image-SIG] how to create mask NxN automatically

Chris Mitchell chris.mit7 at gmail.com
Thu Nov 18 17:47:56 CET 2010

Are you using numpy or doing for loops?

On Thu, Nov 18, 2010 at 10:46 AM, Maxime demers <burton.1 at sympatico.ca> wrote:
> Hi everyone,
> I would like to hear you about the possibility to create mask of N dimension
> to "scan" an image. The aim of this mask is to check for each pixel if its
> value is between the intervals confidence of the mask's pixels or not. Im
> looking for a function that will create a mask of the desired dimension of
> the user. For instance: 3x3, 5x5, 7x7, 11x11, etc.
> if the scanned pixel is defined by (i,j)
> the function should put all the values of the mask NxN at the position (i,j)
> into a list.
> For now, I can manualy create mask of 3x3 and 5x5 by including the pixels
> (i-1,j-1) to (i+1,j+1) etc... in a list, but its getting complicated for 7x7
> and bigger mask.
> Thanks for your help, its really appreciated
> Maxime Demers
> Geomatics and Remote Sensing
> University de Sherbrooke
> _______________________________________________
> Image-SIG maillist  -  Image-SIG at python.org
> http://mail.python.org/mailman/listinfo/image-sig

More information about the Image-SIG mailing list