Hi Douglas, thanks for the advices. I will give them a try. Best regards, Daniel Ferber
---------- Cabeçalho original ----------- De: "Douglas Bagnall" [EMAIL PROTECTED] Para: "Daniel Felix Ferber" [EMAIL PROTECTED], image-sig@python.org Cópia: Data: Thu, 20 Dec 2007 11:38:03 +1300 Assunto: Re: [Image-SIG] Remove noise from high ISO photos > Daniel Felix Ferber wrote: > > > When taking a photo with high ISO on a digital camera, there will be > > many pixels that have a random color that is completely different color > > from the expected one. But the photo still has a good sharpness > > ImageMagic uses a stategy that is similar to the median filter: it looks > > at the neighborhood o a pixel. If the color of the pixel is considerably > > different from the color of adjacent pixels, then the color of the pixel > > is changed to a color close to the neighborhood. If not, the pixel is > > preserved. > > > > It seems that the median filter always changes the color of the pixel, > > and I am afraid that the image might loose sharpness. > > > What you are describing could be achieved thus: > > 1. Take a 3x3 median image. Most pixels will hardly be changed, but the > noisy ones will be. > > 2. find the difference between the original and the median (using > ImageChops.difference). Good pixels will be black or nearly so, but the > noisy ones won't be. > > 3. Use the difference image as a mask for pasting the median over the > original. You will need to convert the difference image to grey-scale > in some way, or split it into bands and do each band of the image > separately. image.convert('L') is probably not the best way. You might > want to make it into a threshold image (rather than have it blending > proportionately to the difference). > > But I'm not sure how much better than a simple median it will be--after > all, the pixels that this process doesn't change are exactly the pixels > that the median hardly changes. > > In any case, the median will be much better than SMOOTH and SMOOTH_MORE. > > > Douglas > > > Esta mensagem foi verificada pelo E-mail Protegido Terra. > Scan engine: McAfee VirusScan / Atualizado em 19/12/2007 / Versão: 5.1.00/5189 > Proteja o seu e-mail Terra: http://mail.terra.com.br/ > _______________________________________________ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig