Irregular Webcomic!

Archive     Cast     Forum     RSS     Books!     Poll Results     About     Search     Fan Art     Podcast     More Stuff     Random     Support on Patreon    
Updates: Monday, Tuesday, Thursday, Friday; reruns all other days
<   No. 2327   2009-06-10   >

Comic #2327

1 {scene: The water cooler}
1 Mercutio: You need to get back out into the dating scene, Ophelia.
2 Mercutio: I didn't want to say it before, but your ex was a sleaze. Somewhere out there is the right guy for you.
3 Ophelia: Honestly, Mercutio, you expect me to take romantic advice from a geek like you?
4 Ophelia: Your idea of a smooth operator is a median filter.
4 Mercutio: Your point?

First (1) | Previous (2326) | Next (2328) || Latest Rerun (1569) | Latest New (3666)
First 5 | Previous 5 | Next 5 | Latest 5
Shakespeare theme: First | Previous | Next | Latest || First 5 | Previous 5 | Next 5 | Latest 5
This strip's permanent URL: http://www.irregularwebcomic.net/2327.html
Annotations off: turn on
Annotations on: turn off

noisy pixels A median filter is a type of signal or image processing filter used to reduce the effects of random noise, such as static or speckling.

Imagine an image like a digital photo, but with a bit of noise, or "grain", in it. If you play with digital photos much, you probably know what I'm talking about; if not, there are some good examples on the page I just linked to.

One way to reduce such noise is to do a calculation at each pixel in the image. Imagine taking a block of nine pixels around each pixel (like taking the entire Brady Bunch around the Alice pixel). Take the brightness values of all those nine pixels and sort them in order, then take the middle one of the sorted pixels. That pixel is going to be a reasonable estimate of the average value of the nine pixels, disregarding any effects caused by noise.

For example, imagine your nine pixel block has brightness values like in the first diagram here. It's supposed to be a nice smooth region of grey, slightly brighter at the bottom right, darker at the top left. But the middle pixel is affected by image noise, and has a value much higher than the brightness values of the grey.

If we take the pixel values and sort them in increasing order, we get: 25, 30, 30, 35, 35, 40, 40, 45, 100. The middle of these nine values is 35, so we assign the value 35 to the middle pixel. The result looks like the second image here.

filtered pixels If we'd merely taken the average of these values, we would have got the value 42.5, which would be slightly too bright to fit the smooth grey transition. But by taking the middle (or median) value, the influence of the bright pixel is ignored.

If we apply this sort of median filter all over an image with scattered pixels of noise, we can effectively get rid of the noise. The filtering will also have the effect of slightly distorting the actual image we want to see, but often this is a small price to pay for the removal of distracting noise. The resulting image is significantly smoother than the original.

LEGO® is a registered trademark of the LEGO Group of companies, which does not sponsor, authorise, or endorse this site.
This material is presented in accordance with the LEGO® Fair Play Guidelines.

Irregular Webcomic! | Darths & Droids | Planet of Hats | The Prisoner of Monty Hall
mezzacotta | Lightning Made of Owls | Square Root of Minus Garfield | The Dinosaur Whiteboard | iToons | Comments on a Postcard | Awkward Fumbles
Last Modified: Wednesday, 10 June 2009; 03:11:01 PST.
© 2002-2017 Creative Commons License
This work is copyright and is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported Licence by David Morgan-Mar. dmm@irregularwebcomic.net