GNOME Bugzilla – Bug 584078
Time-averaging filter for photos, to reduce Gaussian noise
Last modified: 2013-08-23 10:37:38 UTC
It would be nice to have the option so that Cheese would take several successive pictures, then calculate the average of them and save a single picture. This would eliminate most noise in the image. All webcams I have tested are very noisy indoors, even with good light conditions (well, "good" for the human eye, I guess). Cheese could take from 5 or more images in 0.05 seconds each or less, then just sum each pixel value and then take the average of it. That is an effective and very simple way to reduce the image noise. Regards, MV
Created attachment 135476 [details] Testcase: original single frame This is a noisy single picture taken with Cheese
Created attachment 135477 [details] Testcase: averaged picture, made from 8 single photos This is the average of 8 noisy pictures taken by Cheese. If you compare this file with the single noisy picture, you will see the difference in quality.
IMHO this could work well for still subjects. Cheese is for shooting photos of faces and it's unlikely that a face will stay still for half a second. This could lead to photos with well defined backgrounds and blurry faces. Anyway, what did you use to average the photos? I'd like to do some test.
If you have ImageMagick installed: convert -average source1.jpg source2.jpg source3.jpg... sourceN.jpg -quality 90 result.jpg Of course the result would be better if you feed the source images in a lossless format. I have tested with 2 to 30 pictures and I think the greatest improvement happens with the first 5 to 10 pictures. After that it starts to get a bit blurry (I'm not sure if this is caused because of the vibration of my desk [most likely] or maybe the camera CCD is not that stable). You can test with other programs but I think ImageMagick is the simplest and fastest (and it works from the command-line). Regards, MV
As I thought, if I shoot several photos of myself (tried with 6 with a rate of 4 per second) and average them I get some big improvement in the background but my face it blurred because of those little movements I do with no control. I'm not sure if this will bring any real gain, if I'd have to chose between the blurred face + perfect background and the noisy but well defined photo I'd surely chose the second one.
And if you try with a fastest rate (like 6 images at 30 fps, 6 images in 200 ms)? I guess Gaussian noise changes quickly, so even images that close in time may work. Maybe I'm trying to solve the wrong problem with Cheese. I've seen places where a webcam is used to take ID pictures (for ID cards, for example), I've seen people taking astronomy pictures with webcams, and I've seen home-made surveillance systems using webcams (for example, at front-desk offices). In all those examples they were using the software provided with the webcam, which usually is simpler than Cheese. So I thought in those examples a less noisy image may be useful. Just my idea. If you think this will bloat Cheese maybe this should not be implemented. Regards, MV
*** Bug 584077 has been marked as a duplicate of this bug. ***
quote from #584077 > You should consider reopening/reassigning this bug to gstreamer. > With a gstreamer SR filter would be pretty easy for us to support it.
Should be very easy to implement in GStreamer. I'll take a look at it later. Do you guys only want a simple average or different weighted averages (e.g. gaussian or triangular averages with the middle having a higher weight than the borders. This might decrease the blurring if something moves a bit)
Daniel, for the sake of completeness, I don't think bug #584077 really is a duplicate of this one. This is about noise reduction by averaging in time domain, that's about a upscaling images using several low res frames and a super resolution algorithm.
right, i misread that. however it goes into the same direction
Doesn't look like there's much demand for this or anybody wanting to implement this kind of filter although it would be very easy. Let's close this bug until someone actually wants to spend time on it, no point in keeping this open currently.