Difference between revisions of "Factory Calibration"

From apertus wiki
Jump to: navigation, search
 
(57 intermediate revisions by 7 users not shown)
Line 1: Line 1:
Hint: Create a variable containing your Betas IP for easy access.
=Notice=
 
This page is for firmware 1.0.
For firmware 2.0, check this page [[Factory Calibration (firmware 2.0)]].
 
=Hint:=
 
Create a variable containing your Betas IP for easy access.


  export BETA=192.168.1.101
  export BETA=192.168.1.101
----
=Preparations=
Install on your AXIOM Beta:
pacman -S python-numpy
Install the following packages on your PC:
dcraw octave
For Ubuntu this would look like:
sudo apt-get install dcraw octave
Download and compile raw2dng on your PC: https://github.com/apertus-open-source-cinema/misc-tools-utilities/tree/master/raw2dng
----


==Step 1: Check range of the input signal==
==Step 1: Check range of the input signal==


Set gain with:
On the Beta set gain to x1 by running:
  ssh root@$BETA "./set_gain.sh 1"
  ./set_gain.sh 1
 
Download this Octave file to your PC into your current work directory:
wget https://raw.githubusercontent.com/apertus-open-source-cinema/misc-tools-utilities/master/darkframes/read_raw.m


Take an overexposed image and check the levels:
Capture an overexposed image with the Beta and check the levels:


  ssh root@$BETA "./cmv_snap3 -2 -b -r -e 100ms" > snap.raw12
  ssh root@$BETA "./cmv_snap3 -2 -b -r -e 100ms" > snap.raw12 <br />
  raw2dng snap.raw12 --totally-raw
  ./raw2dng snap.raw12 --totally-raw<br />
  octave
  octave<br />
     octave:1> a = read_raw('snap.DNG')
     octave:1> a = read_raw('snap.DNG')<br />
     octave:2> prctile(a(:), [0.1 1 50 99 99.9])
     octave:2> prctile(a(:), [0.1 1 50 99 99.9])


You can get the read_raw function from https://github.com/apertus-open-source-cinema/misc-tools-utilities/blob/master/darkframes/read_raw.m
If everything worked you will get a wall of numbers now. TODO: We should extract the essential pieces of information here... (min/max maybe)?


Lower numbers should be around 50...300 (certainly not zero).
Lower numbers should be around 50...300 (certainly not zero).
Line 24: Line 56:


Put this in startup script (ie: [[kick_manual.sh]]) :
Put this in startup script (ie: [[kick_manual.sh]]) :
  ./set_gain 1
  ./set_gain.sh 1
 
 
 
----


==Step 2: RCN calibration==
==Step 2: RCN calibration==
RCN stands for Row Coloumn Noise correction meaning we filter out the fixed pattern noise.
Make sure you have these scripts already in your Betas /root/ directly: https://github.com/apertus-open-source-cinema/beta-software/tree/master/software/scripts


Clear the old RCN values:
Clear the old RCN values:
Firmware 2.0
<pre style="white-space: pre-wrap">ssh operator@axiom.camera "sudo axiom-start.sh"
ssh operator@axiom.camera "sudo /usr/axiom/script/axiom-rcn_clear.py"</pre>
Before firmware 2.0
  ssh root@$BETA "./rcn_clear.py"
  ssh root@$BETA "./rcn_clear.py"


Take 64 dark frames at 10ms, gain x1.
Now you need to make sure that your Beta is not capturing any light (really not a single photon should hit the sensor :) ):
# close the lens aperture as far as possible
# attach lens cap
# put black lens bag over Beta
# turn off all lights in the room - do this at night or in a completely dark room


  for i in `seq 1 64`; do
Take 64 dark frames at 10ms, gain x1 with the following script executed on your PC (1.2 GB needed):
   ssh root@$BETA "./cmv_snap3 -2 -b -r -e 10ms" > dark-x1-10ms-$i.raw12  
  done
<pre style="white-space: pre-wrap">ssh root@$BETA " ./set_gain.sh 1" <br />
ssh root@$BETA ". ./cmv.func; fil_reg 15 0" # disable HDMI stream <br />
  for i in `seq 1 64`; do <br />
   ssh root@$BETA "./cmv_snap3 -2 -b -r -e 10ms" > dark-x1-10ms-$i.raw12 <br />
  done <br />
ssh root@$BETA ". ./cmv.func; fil_reg 15 0x01000100"  # enable HDMI stream</pre>


Compute a temporary dark frame for RCN calibration:
Compute a temporary dark frame for RCN calibration:
  raw2dng --no-blackcol --calc-darkframe dark-x1-10ms-*.raw12
  raw2dng --no-blackcol --calc-darkframe dark-x1-10ms-*.raw12


Upload it to the beta:
If cmv_snap3 (or axiom-snap) is before v1.11, you may need to add
  mv darkframe-x1.pgm darkframe-rcn.pgm
--swap-lines
  scp darkframe-rcn.pgm root@$BETA:/root/
 
This should process quite quickly and output something like the following at the end:
 
Averaged 64 frames exposed from 12.00 to 12.00 ms. <br />
Could not compute dark current. <br />
  Please use different exposures, e.g. from 1 to 50 ms. <br />
Dark offset : 0.00 <br />
Writing darkframe-x1.pgm... <br />
Done.
 
 
Rename and upload darkframe to your Beta:
<pre style="white-space: pre-wrap">mv darkframe-x1.pgm darkframe-rcn.pgm <br />
  scp darkframe-rcn.pgm root@$BETA:/root/</pre>


Set the RCN values:
Set the RCN values:
Line 51: Line 119:


If you get an error report like this:
If you get an error report like this:
  <nowiki>Traceback (most recent call last):
  <pre style="white-space: pre-wrap">Traceback (most recent call last): <br />
   File "rcn_darkframe.py", line 17, in <module>
   File "rcn_darkframe.py", line 17, in <module> <br />
     import png
     import png <br />
ImportError: No module named 'png'</nowiki>
ImportError: No module named 'png'</pre>


Make sure the Beta is connected to the Internet via Ethernet and run:
Make sure the Beta is connected to the Internet via Ethernet and run:
  pip install pypng
  pip install pypng
and then run the python script again
----




===Validation===
===Validation===


Method 1:
====Method 1:====
 
Put a lens cap on the camera and check the image on a HDMI monitor.
 
In the camera set the matrix gains to:
<nowiki>./mat4_conf.sh  20 0 0 0  0 10 10 0  0 10 10 0  0 0 0 10  0 0 0 0</nowiki>
 
run:
<nowiki>./rcn_clear.py</nowiki>
 
The static noise profile should be visible.
 
run:
./rcn_darkframe.py darkframe-rcn.pgm
 
The static noise profile should be gone.
You will still see dynamic row noise (horizontal lines flickering) - thats expected.
 
 
 
----
 
 
 
====Method 2:====


Put the lens cap on the camera, and check the image on the HDMI.
This method is now entirely automated with running one script inside the camera: https://github.com/apertus-open-source-cinema/beta-software/blob/master/software/scripts/rcn_validation.sh


Set the matrix gains to x10 or x20. The fixed components of the row and column noise
should be gone. You will still see a lot of dynamic row noise though.


Method 2:
Capture one darkframe without compensations:
<pre style="white-space: pre-wrap">ssh root@$BETA "./rcn_clear.py" <br />
ssh root@$BETA "./cmv_snap3 -2 -b -r -e 10ms" > dark-check-1.raw12 </pre>


  ssh root@$BETA "./cmv_snap3 -2 -b -r -e 10ms" > dark-check-1.raw12
Capture one darkframe with compensations:
  ssh root@$BETA "./cmv_snap3 -2 -b -r -e 10ms" > dark-check-2.raw12  
  <pre style="white-space: pre-wrap">ssh root@$BETA "./rcn_darkframe.py darkframe-rcn.pgm" <br />
raw2dng --no-darkframe --check-darkframe dark-check-1.raw12
  ssh root@$BETA "./cmv_snap3 -2 -b -r -e 10ms" > dark-check-2.raw12</pre>


The column noise should disappear, and the only row noise left should be dynamic (not static). Visual inspection: the dark frame should have only horizontal lines, not vertical ones.
 
Then use raw2dng to analyze the differences:
<pre style="white-space: pre-wrap">raw2dng --no-darkframe --check-darkframe dark-check-1.raw12 <br />
raw2dng --no-darkframe --check-darkframe dark-check-2.raw12</pre>
 
With the compensated snapshot the column noise should disappear, and only row noise left should be dynamic (not static). Visual inspection: the dark frame should have only horizontal lines, not vertical ones.


Sample output:
Sample output:


  Average    : 127.36              # about 128, OK
  <pre style="white-space: pre-wrap">Average    : 127.36              # about 128, OK <br />
  Pixel noise : 5.44                # this one is a bit high because we only corrected row and column offsets (it's OK)
  Pixel noise : 5.44                # this one is a bit high because we only corrected row and column offsets (it's OK) <br />
  Row noise  : 2.30 (42.2%)        # this one should be only dynamic, we have captured two frames in order to check that (see below)
  Row noise  : 2.30 (42.2%)        # this one should be only dynamic row noise - see Method 3 below. <br />
  Col noise  : 0.20 (3.8%)          # this one is very small, that's what we need to check here
  Col noise  : 0.20 (3.8%)          # this one is very small, that's what we need to check here</pre>
 
 
 
----
 
 
 
====Method 3:====
 
Capture 2 frames:
<pre style="white-space: pre-wrap">ssh root@$BETA "./cmv_snap3 -2 -b -r -e 10ms" > dark-check-1.raw12  <br />
ssh root@$BETA "./cmv_snap3 -2 -b -r -e 10ms" > dark-check-2.raw12 </pre>
 
Convert the two darkframes with raw2dng:
raw2dng dark-check-*
 
Make sure you have the required octave function file in place:
wget https://raw.githubusercontent.com/apertus-open-source-cinema/misc-tools-utilities/master/darkframes/read_raw.m
 
Also you need to install the octave "signal" and "control" packages from: http://octave.sourceforge.net/packages.php
then inside octave run to install:
pkg install package_name


To check whether the entire row noise is dynamic, load the two raw images in octave and check the autocorrelation between the two row noise samples:
To check whether the entire row noise is dynamic, load the two raw images in octave and check the autocorrelation between the two row noise samples:


  pkg load signal
  <pre style="white-space: pre-wrap">pkg load signal <br />
  a = read_raw('dark-check-1.DNG');
  a = read_raw('dark-check-1.DNG'); <br />
  b = read_raw('dark-check-2.DNG');
  b = read_raw('dark-check-2.DNG'); <br />
  ra = mean(a'); ra = ra - mean(ra);
  ra = mean(a'); ra = ra - mean(ra); <br />
  rb = mean(b'); rb = rb - mean(rb);
  rb = mean(b'); rb = rb - mean(rb); <br />
  xcov(ra, rb, 0, 'coeff')
  xcov(ra, rb, 0, 'coeff')</pre>


Result should be very small (about 0.1 or lower). When running this check on two uncalibrated dark frames, you will get around 0.8 - 0.9.
Result should be very small (about 0.1 or lower). When running this check on two uncalibrated dark frames, you will get around 0.8 - 0.9.
----


==Step 3: Dark frame calibration==
==Step 3: Dark frame calibration==


Take dark frames at various exposure times and gains.
Make sure the RCN calibration from previous steps is in place before continueing here.


  for i in 1 2 3 4; do
Take 1600 dark frames at various exposure times and gains. This will require around 30GB of space on your PC.
   for e in `seq 1 100`; do
 
     for g in 1 2 3 4; do
  for i in 1 2 3 4; do<br />
       ssh root@$BETA "./set_gain.sh $g"
   for e in `seq 1 100`; do<br />
       ssh root@$BETA "./cmv_snap3 -2 -b -r -e ${e}ms" > dark-x${g}-${e}ms-$i.raw12
     for g in 1 2 3 4; do<br />
     done
       ssh root@$BETA "./set_gain.sh $g"<br />
   done
       ssh root@$BETA "./cmv_snap3 -2 -b -r -e ${e}ms" > dark-x${g}-${e}ms-$i.raw12<br />
     done<br />
   done<br />
  done
  done


Compute dark frames for each gain:
Compute dark frames for each gain:


  raw2dng --swap-lines --calc-dcnuframe dark-x1-*.raw12
  raw2dng --calc-dcnuframe dark-x1-*.raw12<br />
  raw2dng --swap-lines --calc-dcnuframe dark-x2-*.raw12
  raw2dng --calc-dcnuframe dark-x2-*.raw12<br />
  raw2dng --swap-lines --calc-dcnuframe dark-x3-*.raw12
  raw2dng --calc-dcnuframe dark-x3-*.raw12<br />
raw2dng --swap-lines --calc-dcnuframe dark-x4-*.raw12
raw2dng --calc-dcnuframe dark-x4-*.raw12
 
This produces the following files:
 
darkframe-x1.pgm, dcnuframe-x1.pgm, darkframe-x2.pgm, dcnuframe-x2.pgm, darkframe-x3.pgm, dcnuframe-x3.pgm, darkframe-x4.pgm, dcnuframe-x4.pgm
 
Store these files in a save place as they will be used in post-processing.
Place them in the directory where you capture raw12 files or experimental raw HDMI recordings, so raw2dng will use them.
 
 


Save the following files (N=1..4):
----


darkframe-xN.pgm
dcnuframe-xN.pgm


These files should be used in postprocessing.
Place them in the directory where you capture raw12 files, so raw2dng will use them.


===Validation===
===Validation===


On the same dark frames, or - even better - on a new set of dark frames, run:
Capture a few new raw12 darkframes with rcn enabled and PGMs in place for raw2dng.
 
raw2dng --check-darkframe dark*.raw12 > dark-check.log
 
If the calibration worked you should get lower noise values as in step 2.
 
average value: close to 128
 
pixel noise: about 3 or 4 (may increase at longer exposure times)
 
row noise and column noise should look similar to this:
Pixel noise : 3    <br />         
Row noise  : 1.70  <br /> 
Col noise  : 0.15
 


raw2dng --swap-lines --check-darkframe dark*.raw12 > dark-check.log


Upload the log.
----


==Step 4: Color profiling==
==Step 4: Color profiling==
Line 147: Line 297:
* ICC profile (*.icc)
* ICC profile (*.icc)
* OCIO configuration (copy/paste from terminal) + LUT file (*.spi1d)
* OCIO configuration (copy/paste from terminal) + LUT file (*.spi1d)
----


===Validation===
===Validation===
Line 155: Line 311:


(todo: detailed steps)
(todo: detailed steps)
----


==Step 5: HDMI dark frames==
==Step 5: HDMI dark frames==


For experimental 4k raw recording (https://www.apertus.org/axiom-beta-uhd-raw-mode-explained-article-may-2016) step 3 calibration is not required (step 2 should be in place though). Instead darkframes are collected from HDMI recordings.
Record a 1-minute clip with lens cap on.
Record a 1-minute clip with lens cap on.


Line 167: Line 331:


Results: darkframe-hdmi-A.ppm and darkframe-hdmi-B.ppm.
Results: darkframe-hdmi-A.ppm and darkframe-hdmi-B.ppm.
----


==Step 6: HDMI filters for raw recovery==
==Step 6: HDMI filters for raw recovery==
Line 182: Line 352:


The two frames must be in the native format of your video recorder (not DNG). You should be able to cut the video with ffmpeg -vcodec copy.
The two frames must be in the native format of your video recorder (not DNG). You should be able to cut the video with ffmpeg -vcodec copy.
----


==TODO==
==TODO==
Line 189: Line 365:
* automate HDMI calibration
* automate HDMI calibration
* remind Herbert to fix the line swapping bug
* remind Herbert to fix the line swapping bug
[[category: Research Pending]]
[[Category:AXIOM Beta]]
[[Category:Software]]

Latest revision as of 07:13, 20 May 2020

1 Notice

This page is for firmware 1.0. For firmware 2.0, check this page Factory Calibration (firmware 2.0).

2 Hint:

Create a variable containing your Betas IP for easy access.

export BETA=192.168.1.101




3 Preparations

Install on your AXIOM Beta:

pacman -S python-numpy

Install the following packages on your PC:

dcraw octave

For Ubuntu this would look like:

sudo apt-get install dcraw octave

Download and compile raw2dng on your PC: https://github.com/apertus-open-source-cinema/misc-tools-utilities/tree/master/raw2dng




3.1 Step 1: Check range of the input signal

On the Beta set gain to x1 by running:

./set_gain.sh 1

Download this Octave file to your PC into your current work directory:

wget https://raw.githubusercontent.com/apertus-open-source-cinema/misc-tools-utilities/master/darkframes/read_raw.m

Capture an overexposed image with the Beta and check the levels:

ssh root@$BETA "./cmv_snap3 -2 -b -r -e 100ms" > snap.raw12 
./raw2dng snap.raw12 --totally-raw
octave
octave:1> a = read_raw('snap.DNG')
octave:2> prctile(a(:), [0.1 1 50 99 99.9])

If everything worked you will get a wall of numbers now. TODO: We should extract the essential pieces of information here... (min/max maybe)?

Lower numbers should be around 50...300 (certainly not zero). Higher numbers should be around 4000, but not 4095.

Repeat for gains 2, 3, 4.

Put this in startup script (ie: kick_manual.sh) :

./set_gain.sh 1



3.2 Step 2: RCN calibration

RCN stands for Row Coloumn Noise correction meaning we filter out the fixed pattern noise.

Make sure you have these scripts already in your Betas /root/ directly: https://github.com/apertus-open-source-cinema/beta-software/tree/master/software/scripts

Clear the old RCN values:

Firmware 2.0

ssh operator@axiom.camera "sudo axiom-start.sh"
 ssh operator@axiom.camera "sudo /usr/axiom/script/axiom-rcn_clear.py"

Before firmware 2.0

ssh root@$BETA "./rcn_clear.py"

Now you need to make sure that your Beta is not capturing any light (really not a single photon should hit the sensor :) ):

  1. close the lens aperture as far as possible
  2. attach lens cap
  3. put black lens bag over Beta
  4. turn off all lights in the room - do this at night or in a completely dark room

Take 64 dark frames at 10ms, gain x1 with the following script executed on your PC (1.2 GB needed):

ssh root@$BETA " ./set_gain.sh 1" <br />
 ssh root@$BETA ". ./cmv.func; fil_reg 15 0" # disable HDMI stream <br />
 for i in `seq 1 64`; do <br />
   ssh root@$BETA "./cmv_snap3 -2 -b -r -e 10ms" > dark-x1-10ms-$i.raw12  <br />
 done  <br />
 ssh root@$BETA ". ./cmv.func; fil_reg 15 0x01000100"  # enable HDMI stream

Compute a temporary dark frame for RCN calibration:

raw2dng --no-blackcol --calc-darkframe dark-x1-10ms-*.raw12

If cmv_snap3 (or axiom-snap) is before v1.11, you may need to add

--swap-lines

This should process quite quickly and output something like the following at the end:

Averaged 64 frames exposed from 12.00 to 12.00 ms. 
Could not compute dark current.
Please use different exposures, e.g. from 1 to 50 ms.
Dark offset : 0.00
Writing darkframe-x1.pgm...
Done.


Rename and upload darkframe to your Beta:

mv darkframe-x1.pgm darkframe-rcn.pgm <br />
 scp darkframe-rcn.pgm root@$BETA:/root/

Set the RCN values:

ssh root@$BETA "./rcn_darkframe.py darkframe-rcn.pgm"

Put this in startup script (ie : kick_manual.sh) :

./rcn_darkframe.py darkframe-rcn.pgm 

If you get an error report like this:

Traceback (most recent call last): <br />
  File "rcn_darkframe.py", line 17, in <module> <br />
    import png <br />
 ImportError: No module named 'png'

Make sure the Beta is connected to the Internet via Ethernet and run:

pip install pypng

and then run the python script again




3.2.1 Validation

3.2.1.1 Method 1:

Put a lens cap on the camera and check the image on a HDMI monitor.

In the camera set the matrix gains to:

./mat4_conf.sh  20 0 0 0  0 10 10 0  0 10 10 0  0 0 0 10  0 0 0 0

run:

./rcn_clear.py

The static noise profile should be visible.

run:

./rcn_darkframe.py darkframe-rcn.pgm 

The static noise profile should be gone. You will still see dynamic row noise (horizontal lines flickering) - thats expected.




3.2.1.2 Method 2:

This method is now entirely automated with running one script inside the camera: https://github.com/apertus-open-source-cinema/beta-software/blob/master/software/scripts/rcn_validation.sh


Capture one darkframe without compensations:

ssh root@$BETA "./rcn_clear.py" <br />
 ssh root@$BETA "./cmv_snap3 -2 -b -r -e 10ms" > dark-check-1.raw12 

Capture one darkframe with compensations:

ssh root@$BETA "./rcn_darkframe.py darkframe-rcn.pgm" <br />
 ssh root@$BETA "./cmv_snap3 -2 -b -r -e 10ms" > dark-check-2.raw12


Then use raw2dng to analyze the differences:

raw2dng --no-darkframe --check-darkframe dark-check-1.raw12 <br />
 raw2dng --no-darkframe --check-darkframe dark-check-2.raw12

With the compensated snapshot the column noise should disappear, and only row noise left should be dynamic (not static). Visual inspection: the dark frame should have only horizontal lines, not vertical ones.

Sample output:

Average     : 127.36               # about 128, OK <br />
 Pixel noise : 5.44                 # this one is a bit high because we only corrected row and column offsets (it's OK) <br />
 Row noise   : 2.30 (42.2%)         # this one should be only dynamic row noise - see Method 3 below. <br />
 Col noise   : 0.20 (3.8%)          # this one is very small, that's what we need to check here




3.2.1.3 Method 3:

Capture 2 frames:

ssh root@$BETA "./cmv_snap3 -2 -b -r -e 10ms" > dark-check-1.raw12  <br />
 ssh root@$BETA "./cmv_snap3 -2 -b -r -e 10ms" > dark-check-2.raw12 

Convert the two darkframes with raw2dng:

raw2dng dark-check-*

Make sure you have the required octave function file in place:

wget https://raw.githubusercontent.com/apertus-open-source-cinema/misc-tools-utilities/master/darkframes/read_raw.m

Also you need to install the octave "signal" and "control" packages from: http://octave.sourceforge.net/packages.php then inside octave run to install:

pkg install package_name 

To check whether the entire row noise is dynamic, load the two raw images in octave and check the autocorrelation between the two row noise samples:

pkg load signal <br />
 a = read_raw('dark-check-1.DNG'); <br />
 b = read_raw('dark-check-2.DNG'); <br />
 ra = mean(a'); ra = ra - mean(ra); <br />
 rb = mean(b'); rb = rb - mean(rb); <br />
 xcov(ra, rb, 0, 'coeff')

Result should be very small (about 0.1 or lower). When running this check on two uncalibrated dark frames, you will get around 0.8 - 0.9.



3.3 Step 3: Dark frame calibration

Make sure the RCN calibration from previous steps is in place before continueing here.

Take 1600 dark frames at various exposure times and gains. This will require around 30GB of space on your PC.

for i in 1 2 3 4; do
for e in `seq 1 100`; do
for g in 1 2 3 4; do
ssh root@$BETA "./set_gain.sh $g"
ssh root@$BETA "./cmv_snap3 -2 -b -r -e ${e}ms" > dark-x${g}-${e}ms-$i.raw12
done
done
done

Compute dark frames for each gain:

raw2dng --calc-dcnuframe dark-x1-*.raw12
raw2dng --calc-dcnuframe dark-x2-*.raw12
raw2dng --calc-dcnuframe dark-x3-*.raw12
raw2dng --calc-dcnuframe dark-x4-*.raw12

This produces the following files:

darkframe-x1.pgm, dcnuframe-x1.pgm, darkframe-x2.pgm, dcnuframe-x2.pgm, darkframe-x3.pgm, dcnuframe-x3.pgm, darkframe-x4.pgm, dcnuframe-x4.pgm

Store these files in a save place as they will be used in post-processing. Place them in the directory where you capture raw12 files or experimental raw HDMI recordings, so raw2dng will use them.




3.3.1 Validation

Capture a few new raw12 darkframes with rcn enabled and PGMs in place for raw2dng.

raw2dng --check-darkframe dark*.raw12 > dark-check.log

If the calibration worked you should get lower noise values as in step 2.

average value: close to 128

pixel noise: about 3 or 4 (may increase at longer exposure times)

row noise and column noise should look similar to this:

Pixel noise : 3     
Row noise  : 1.70
Col noise  : 0.15



3.4 Step 4: Color profiling

Set gain x1.

ssh root@$BETA "./set_gain.sh 1"

Take a picture of the IT8 chart, correctly exposed.

Edit the coordinates and the raw file name in calib_argyll.sh.

ssh root@$BETA "./cmv_snap3 -2 -b -r -e 10ms" > it8chart.raw12
./calib_argyll.sh IT8

Save the following files:

  • ICC profile (*.icc)
  • OCIO configuration (copy/paste from terminal) + LUT file (*.spi1d)




3.4.1 Validation

Render the IT8 chart in Blender, using the OCIO configuration.

Same with the ICC profile (Adobe? RawTherapee? What apps support ICC?)

(todo: detailed steps)




3.5 Step 5: HDMI dark frames

For experimental 4k raw recording (https://www.apertus.org/axiom-beta-uhd-raw-mode-explained-article-may-2016) step 3 calibration is not required (step 2 should be in place though). Instead darkframes are collected from HDMI recordings.

Record a 1-minute clip with lens cap on.

Average odd and even frames.

(todo: polish and upload the averaging script)

(todo: check if the HDMI dark frames can be computed from regular dark frames)

Results: darkframe-hdmi-A.ppm and darkframe-hdmi-B.ppm.




3.6 Step 6: HDMI filters for raw recovery

This calibration is for to the recorder, not for the camera. It's for recovering the original raw data from the HDMI, so it has nothing to do with sensor profiling and such.

Record some scene with high detail AND rich colors.

Take a raw12 snapshot in the middle of recording. The HDMI stream will pause for a few seconds.

Upload two frames from the paused clip, together with the raw12 file. This calibration will be hardcoded in hdmi4k.

The two frames must be in the native format of your video recorder (not DNG). You should be able to cut the video with ffmpeg -vcodec copy.




3.7 TODO