Hacker News new | ask | show | jobs
by gsliepen 1153 days ago
There is a lot you can do to improve the quality of the image. This camera has a very early CMOS sensor, which suffered from huge pixel-to-pixel variation. By characterizing each pixel (which you can do by taking dark field and flat field images), you can correct for this variation, and get an image that looks much less noisy. There are also various algorithms to undo the Bayer filtering, with tradeoffs between sharpness, color accuracy and performance.
5 comments

That's a very neat trick. In two decades of messing around with webcams we never clued in to that, and I'm pretty sure that this may well be one of the reasons why we had noise issues when using our very early bluescreen implementation.
The mentioned qc-usb driver seems to do some filtering.

IIRC when I played with that 15-20 years ago qc-usb produced distinctly blurry images with slightly washed out colors, while the original windows driver produced images that are sharp, very noisy and with somewhat unnaturaly vivid colors.

Maybe it's subjective, but the screencap from XP seems to show a much higher quality image. It seems there's still room for improvement. Awesome work regardless!
He did say that the webcam had its gain and white balance controlled by the driver so I'm guessing he didn't go the extra mile to reverse engineer that part of the software for what is a pretty lousy camera.
Yeah, looks like the author took a random debayering filter and then called it a day.
That was my immediate thought too. The XP image definitely looked a lot better.
That's being kind.
https://en.wikipedia.org/wiki/Flat-field_correction

Of note is that FFC --- and frequent too --- is basically mandatory for thermal imaging sensors, since their pixels drift a lot.

Does pixel-to-pixel variation change based on temperature or some other ambient factor, or would characterization be a one-shot deal?
It is mostly the dark current (which is reflected in the values you would get if no light is hitting the CMOS sensor) which is affected by temperature. However, its effect scales with the exposure time. Since night time astrophotography requires long exposure times, this would require recalibration (see also @bdigiifh's post). However, for typical daytime use the effect is much less significant.

Some CMOS sensors or the surrounding electronics components on the PCB can heat up significantly while the sensor is in use.

If the sensor has a configurable gain (which is the hardware amplification applied before digitizing the voltage measured for each pixel), then you probably want to characterize the pixel-to-pixel variation for each gain level.

In professional astronomy (where sensors are kept in dewars to reduce dark current) this process (flat field, dark field) is carried out at least once a night.