The trick is to know what the black value is for your sensor. This is the nominal value that the sensor records when there is no light.
Take a picture of a scene with a black object (inside of a pipe, say) and save the raw data. Outside the camera I used dcraw -D -4 CRW_1815.CRW. This produces a 16bit image of the raw data. ImageJ can read such data. Looking at the values in the pipe interior I saw that they averaged about 32 (ISO80,A720IS). This seemed to be the same for the R,G,B sensors. I think the black value is also the same for other ISO's, but will need to do more testing.Now to increase or decrease the ev I set mult to what I want (say 2 for ev +1 or .5 for ev -1) and calculate offset = black - mult * black. (i.e. this effectively subtracts black before doing the mult and adds it back after).
You may want to avoid all the pain if you use the GetPixel.exe that I attached in an earlier post.
I tried getpixel and it works great. Question: how do you determine the raw coordinates of a pixel from the coordinates in an image?
Since I'm often slightly under-exposing (-2/3 EV) to avoid blow-out, I'm looking for a curve to bring out the shadows (a-la D-Lighting in Nikon DSLRs).
Does anybody have a library of already-made curves or at least a link to a website where various useful/fun curves are shown visually?
Started by kdeal
Started by vine
Creative Uses of CHDK
Started by msl
Started by cedricb
RAW Shooting and Processing
Started by an0n