[Image-SIG] how to create mask NxN automatically

Maxime demers burton.1 at sympatico.ca
Thu Nov 18 16:46:20 CET 2010


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
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20101118/525323e1/attachment.html>


More information about the Image-SIG mailing list