Difference between revisions of "PLR"

From apertus wiki
Jump to: navigation, search
Line 17: Line 17:
=====Linear exposures=====
=====Linear exposures=====


* http://files.apertus.org/AXIOM-Beta/snapshots/PLRHDR/wiki/30ms-lin.jpg
http://files.apertus.org/AXIOM-Beta/snapshots/PLRHDR/wiki/30ms-lin.jpg http://files.apertus.org/AXIOM-Beta/snapshots/PLRHDR/wiki/100ms-lin.jpg
* http://files.apertus.org/AXIOM-Beta/snapshots/PLRHDR/wiki/100ms-lin.jpg


Let's check if the first image is really exposed to the right, in octave.
Let's check if the first image is really exposed to the right, in octave.

Revision as of 15:55, 30 January 2016

Some attempts to reverse engineer the PLR high dynamic mode from CMV12000.

1 Registers

  • 79: Number_slopes: 1,2,3.
  • 75-78: Exp_kp1, Exp_kp2: exposure times for highlights (same formula as Exp_time)
  • 106: Vtfl2, Vtfl3: knee point locations (range: 0-63; units: unknown)

Let's check the effect.

1.1 Register effects

I'll use an IT8 chart, exposed at 30 ms (normal exposure), 100 ms (a bit overexposed) and 300ms (really overexposed). A little dark in the lab today, but shouldn't be a big problem.

To analyze the images, I'll use octave 4.0, compiled with 16-bit image support. The scripts should run in Matlab as well, with minimal changes.

1.1.1 Linear exposures

30ms-lin.jpg 100ms-lin.jpg

Let's check if the first image is really exposed to the right, in octave.

a = read_raw('30ms-lin.DNG');
prctile(a(:),99) - 128        % note: black level is forced to 128 in raw2dng
ans =  2269                   % clipping starts at about 2400-2500 above black

Let's check if the clipping point is, indeed, where I say:

figure, hold on
colors = 'rgcb';                                  % meaning: red, gren1, green2 (plotted as cyan), blue (raw data from Bayer channels)
[g30,c30]   = sample_it8('30ms-lin.DNG', 0);      % read median RGGB swatch values from IT8 chart (first arg is grayscale, second is full color)
[g100,c100] = sample_it8('100ms-lin.DNG', 0);
for i = 1:4
  plot(c30(:,i), c100(:,i), ['.' colors(i)]);     % plot the 100ms image vs the 30ms one (extremely rough guess for response curve)
end
  • 100ms-vs-30ms-lin.png
  • this approximates (but it's not equal to!) the response curve without PLR
  • this plot assumes the sensor response in the 30ms image (which was not overexposed) is linear (but it's probably not)
  • the sensor doesn't clip very harshly to white (could be the PLR circuits kicking in with a very low exposure time? to be checked)
1.1.2 PLR exposures

Let's start with a 2-segment PLR exposure, 100ms/10ms, vtfl2=32. That means, Number_slopes = 2, Exp_time = 8072, Exp_kp1 = 805, Vtfl=96.

  • 100ms-10ms-32.jpg

Although the image looks overexposed at first sight, the raw levels seem to be alright:

c = read_raw('100ms-10ms-32.DNG');
prctile(c(:),99)
ans =  1957

Let's check our "response curve" approximation:

[g100p,c100p] = sample_it8('100ms-10ms-32.DNG', 0);
figure, hold on
for i = 1:4
  plot(c30(:,i), c100p(:,i), ['.' colors(i)]);
end
  • 100-10-32-plr-vs-30ms-lin.png
  • the knee point isn't as sharp as in the datasheet
  • its location is around 400 (todo: find the relationship between this and vtfl)
  • the second exposure appears a little noisy

Let's leave Vtfl constant and change exposure time for the second segment (1,5,10,20,50 ms).

  • 100ms-1ms-32.jpg
  • 100ms-5ms-32.jpg
  • 100ms-10ms-32.jpg
  • 100ms-20ms-32.jpg
  • 100ms-50ms-32.jpg

Commands for plotting the "response curve" approximations are left as an exercise to the reader. Result:

  • 100-x-32-plr-vs-30ms-lin.png

[to be continued]