-
Notifications
You must be signed in to change notification settings - Fork 0
colorscreen
colorscreen
is a command line tool which can access most of Color-Screen functionality. colorscreen --help
displays summary of supported commands.
Main commands of colorscreen
are render
, autodetect
, analyze-backlight
, stitch
, finetune
and experimental commands dump-lcc
, dump-patch-density
, lab
, read-chemcad-spectra
For scans of originals with their original viewing filter attached it is possible to use Color-Screen auto-detection to obtain screen registration. This can be tested by downloading sample crop form Available scans of color screen processes. To obtain a registraion use
colorscreen autodetect sample-sm.tif sample-sm.par --gamma 1.0 --verbose --scanner-type horisontally-moving-lens
Scanner type specifies how deforms the original. Nikonc Coolscan 9000ED moves the original over stable scanning head which scans a single line at a time. By specifying that lens move horisontally allows ColorScreen to correct geometry more effectively.
Gamma is the gamma of the scan and it is important to specify it correctly for the analysis to work.
colorscreen
will read the scan colorscreen-sm.tif
and
- guess color of individual patches of the color screen
- guess color process used to take the photograph (Dufaycolor)
- identify individual color patches in the scan
- optimize lens correction and homography so the mapping between scan and screen is as linear as possible
- produce mesh mapping scan coordinates to screen coordinates adding extra corrections that can not be represented by homography and lens correction (motor errors, vibrations, film deformations)
- auto-optimize levels (brightness and dark point)
- set color model to one fitting for the process (
dufaycolor_reseau_by_color_cinematography_spectra
)
Resulting file sample-sm.par
can then be read by GUI and fine-tuned. It is stored in human-readable form and can also be edited by text editors. The autodetected values in sample-sm.par
autodetected are:
screen_type: Dufay
This represents organization of color patches in the screen
screen_shift: 608.187567 460.373842
coordinate_x: 3.029668 7.206553
coordinate_y: -7.043332 3.129752
Affine transformation of scan coordinates to screen coordinates
projection_distance: 1.000000
tilt: -1.96563e-05 -1.28303e-05
Perspective transformation of the original: the distance of lens center from original (in pixels) and tilts in degrees. Distance can not be uniquely determined without knowledge of horisonal field of vision of the lens and thus default to 1 which makes degrees to be really small.
lens_warp_rectilinear: 1 0.999598 0.000344201 -0.00301265 0.00307031 0 0 0.99995 0.587097
Lens warp specification according to DNG standard
mesh: yes
If correction mesh should be used. If so mesh data follows ending by mesh_end
scr_detect_red: 1.000000 0.042893 0.051521
scr_detect_green: 0.101079 1.000000 0.421604
scr_detect_blue: 0.065220 0.265838 1.000000
scr_detect_black: 0.000371 -0.002315 -0.002810
Detect dark point of the scan (linear RGB value) and scanner's response to red, green and blue dyes in the screen.
brightness: 1.119231
dark_point: 0.012809
Auto-detected levels
solver_point: 28.398743 16.790831 -82.000000 47.000000 green
solver_point: 52.556889 14.603731 -81.000000 44.000000 green
...
Points mapping scan coordinates (first pair of values representing x,y) to screen coordinates (second pair of values) and color of corresponding color path color (green
). This can be later used to re-compute geometry parameters.
colorscreen render sample-sm.tif sample-sm.par --mode interpolated out.tif
produces interpolated image into out.tif. Mode parameters specifies one of Rendering modes.
The result is as follows:
Future improvement: The extra border is automatically added so highly deformed scans are rendered in full. For scans of full-sized originals the border is relatively small, but in cropped example it becomes distrubing. Future versions of colorscreen
will determine the dimensions more carefully.
If original is scanned in multiple tiles and contains color screen (so auto-detection can be applied), it is possible to stitch it automatically using colorscreen stitch
. In our example we have tiles
$ ls *.eip
Jan Dufay Test_Tile01.eip Jan Dufay Test_Tile02.eip Jan Dufay Test_Tile03.eip Jan Dufay Test_Tile04.eip
Showing that there are 4 tiles. They must be ordered from left to right; top to bottom.
$ colorscreen stitch --out example.csprj Jan\ Dufay\ Test_Tile0?.eip --ncols 2
Stitching:
Jan Dufay Test_Tile01.eip Jan Dufay Test_Tile02.eip
Jan Dufay Test_Tile03.eip Jan Dufay Test_Tile04.eip
....
--ncols 2
specifies number of columns in the scanned grid (which is 2x2 in this case).
Stitch command performs auto-detection on each tile and then stitches them together. For that it uses external tool cpfind
which is part of hugin
panorama tool and must be on a search path. If successful example.csprj
is produces which contains geometry information of all tiles. Csprj files (Color-Screen stitch projects) can be used as images for GUI and colorscreen render
. Rendering produces located tiles which then can be blended by standard blending tool. We have good experience with multiblend https://horman.net/multiblend/.