News for hackers. Stuff that matters.
Re:Fastest star ever seen is moving at 8% the speed of light by formerly_proven on Sunday August 16, 2020 @08:18AM (#24177182)
RAW from most cameras isn't "real RAW". Firstly it generally uses lossy compression secondly a lot of cameras apply some minor corrections to "RAW" data as well (e.g. noise reduction). Some would argue that most cameras can't give you "real" RAW since most sensors perform noise reduction one way or the other internally (e.g. most Sony sensors use correlated double sampling). Most sensors use analog PGAs to amplify the pixel signals before A/D conversion (that's the ISO setting)[2], which changes the characteristics of the sensor quite drastically (not just dynamic range and noise, a lot of older sensors had severe issues with tinting and banding at high gains). RAW formats are generally linear (those used for moving pictures are sometimes log-encoded, which makes more sense [1], but isn't "raw").

A library like libraw reads most RAW files and can give you an appropiately (for the sensor used) debayered RGB image. These images aren't in a defined color space; they're specific to every camera/sensor.

In the moving pictures space OpenEXR is a common format for "arbitrary" images, since it allows any number of channels each with different formats (e.g. you can have a file with 27 channels per pixel, some of which are float and some of which are integer).

[1] E.g. 12 bit log encoding gives even resolution across more of the dynamic range; a linear encoding gives half of each range to the brighter stop.

[2] Sensors that don't have PGAs simply have a fixed sensitivity. If the camera offers an ISO setting, it is emulated in the digital domain by pulling the image.

Re:Fastest star ever seen is moving at 8% the speed of light by neilpa on Sunday August 16, 2020 @09:12AM (#24177479)
I’m assuming PGA is Programmable Gain Amplifier? It wasn’t immediately obvious from a web search.
Re:Fastest star ever seen is moving at 8% the speed of light by formerly_proven on Sunday August 16, 2020 @10:20AM (#24178038)
Yes. The basic structure of a CMOS sensor looks a lot like a DRAM array, but instead of a capacitor you have a photo diode and the "bit lines" / column lines go into a programmable gain amplifier and then into a 12 or 14 bit ADC with some DSP [1] and a parallel-to-serial interface. The exposure is determined by the readout (row for row), that's what gives you rolling shutter.

Some sensors have global shutter instead, which makes it even more like DRAM: Conceptually each pixel has a capacitor and a photodiode, and a transistor connecting the two, all of these transistors are connected in parallel and form the "global shutter signal".

Some sensors have faster ADCs and use one ADC for a bunch of columns, which has been claimed as the source of column-banding in some sensors (unclear if correct).

[1] Sensors that are intended for both photo and video typically support things like pixel binning, where the sensor itself averages e.g. 2x2 blocks of pixels internally. A lower quality alternative is line skipping, where the sensor is told to only read out every nth line, thus reducing resolution considerably. The higher quality alternative is "full-sensor readout", i.e. the camera reads all pixels and downsamples the image to the video resolution. I believe some (announced?) sensors can do this in the sensor itself now.

Note: A lot of this is "somewhat informed speculation" on my part, because image sensor manufacturers tend to be very secretive of their sensor's details.

Re:Fastest star ever seen is moving at 8% the speed of light by craftinator on Sunday August 16, 2020 @10:51AM (#24178267)
Annnnd comments like this are why I'm on HN daily. Thanks for sharing your knowledge!