#1  
Old 23-07-2017, 09:41 AM
rcheshire's Avatar
rcheshire (Rowland)
Registered User

rcheshire is offline
 
Join Date: Apr 2010
Location: Geelong
Posts: 2,580
Applying channel multipliers

I found this particularly helpful and thought to share it, based on a Cloudy Nights thread, which explains the process quite well.

Apply DSLR channel multipliers to an image. The jpg's illustrate the effect on a post processed image. A little overdone but you get the idea. Multipliers need tweaking.

EDIT: The Orion image was taken with a modded 450D. The Eta image with an unmodded Nikon D3300 - files offered for download by and IIS member some time ago. So, I guess, if you don't have a modded camera this process may be of benefit.

Viewed on my phone the saturation is ridiculously over done.

The script requires ImageMagick. Edit to suit filenames and plug in your camera's matrix from here, for example.

Code:
#! /bin/bash

# Apply DSLR channel multipliers, obtained from 

# https://www.dxomark.com/Cameras/Canon/EOS-450D---Measurements

# ImageMagick -color-matrix 

# To run script from command line in Windows OS replace \ with ^ AFAIK...

# Canon 450D 
# R sRGB	G sRGB	B sRGB	
# R raw	1.91	-1	0.09
# G raw	-0.19	1.65	-0.46
# B raw	0.07	-0.7	1.64

# Color matrix as defined in ISO standard 17321

# Play around with multipliers for Ha modded cameras

convert in.jpg -depth 16 -color-matrix \
	"1.81 -0.8 0.07 0.0, 0.0, 0.0 \
    	-0.16 1.51 -0.4 0.0, 0.0, 0.0 \
    	0.05 -0.5 1.5 0.0, 0.0, 0.0 \
    	0.0 0.0 0.0 0.0, 0.0, 0.0 \
    	0.0 0.0 0.0 0.0, 0.0, 0.0 \
    	0.0 0.0 0.0 0.0, 0.0, 0.0" -alpha off out.jpg

animate -delay 100 -loop 0 -resize 800x600 -page 800x600 in.jpg out.jpg

exit
Depending on the success of trials I may add the process as an option to Asterism.
Attached Thumbnails
Click for full-size image (matrix-0.jpg)
82.5 KB32 views
Click for full-size image (matrix-1.jpg)
86.2 KB33 views
Click for full-size image (in.jpg)
207.7 KB30 views
Click for full-size image (out.jpg)
208.8 KB28 views

Last edited by rcheshire; 24-07-2017 at 10:11 AM.
Reply With Quote
  #2  
Old 25-07-2017, 07:42 PM
rcheshire's Avatar
rcheshire (Rowland)
Registered User

rcheshire is offline
 
Join Date: Apr 2010
Location: Geelong
Posts: 2,580
This gets closer to the concept with linear images (thanks Bo). Nothing precise at this stage.

Applied to the final stacked image and then stretched, colour gradients are problematic, if not unworkable. The process should probably be applied post deBayer prior to stacking.

This was all done on an Android tablet, with dcraw and imagemagick installed in Termux, then gradient removal in Ivo's Android StarTools.
Code:
#! /bin/bash
# Apply DSLR channel multipliers, obtained from
# https://www.dxomark.com/Cameras/Canon/EOS-450D---Measurements

# Windows OS replace \ with ^ AFAIK...
# Canon 450D
#      R sRGB   G sRGB B sRGB
# R raw 1.91    -1        0.09
# G raw -0.19   1.65    -0.46
# B raw 0.07    -0.7      1.64

#Color matrix as defined in ISO standard 17321 

# Nikon D3300
#       R sRGB  G sRGB  B sRGB
# R raw 1.85     -0.74   -0.1
# G raw -0.17    1.56     -0.39
# B raw  0.05    -0.47    1.42

percent=100

Rr=$(echo "scale=4; 1.91/100*$percent" | bc )
Rg=$(echo "scale=4; -1/100*$percent" | bc )
Rb=$(echo "scale=4; -0.09/100*$percent" | bc )
Gr=$(echo "scale=4; -0.19/100*$percent" | bc )
Gg=$(echo "scale=4; 1.65/100*$percent" | bc )
Gb=$(echo "scale=4; -0.46/100*$percent" | bc )
Br=$(echo "scale=4; 0.07/100*$percent" | bc )
Bg=$(echo "scale=4; -0.7/100*$percent" | bc )
Bb=$(echo "scale=4; 1.64/100*$percent" | bc )

echo $Rr $Rg $Rb
echo $Gr $Gg $Gb
echo $Br $Bg $Bb

#Play around with multipliers for Ha modded cameras

cd storage/downloads

convert in.tiff -color-matrix \
       "$Rr $Rg $Rb \
        $Gr $Gg $Gb \
        $Br $Bg $Bb" -alpha off out.tiff

convert in.tiff in.jpg
convert out.tiff out.jpg

animate -delay 100 -loop 0 -resize 800x600 -page 800x600 in.jpg out.jpg

exit
Attached Thumbnails
Click for full-size image (IMG_20170725_192413.jpg)
154.2 KB15 views
Click for full-size image (IMG_20170725_232720.jpg)
145.9 KB12 views

Last edited by rcheshire; 25-07-2017 at 11:38 PM.
Reply With Quote
Reply

Bookmarks

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +10. The time is now 09:59 AM.

Powered by vBulletin Version 3.8.7 | Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Advertisement
Nitecore
Advertisement
Meade Australia
Advertisement
OzScopes Authorised Dealer
Advertisement
Bintel
Advertisement
SkyWatcher Australia
Advertisement
Lunatico Astronomical
Advertisement
NexDome Observatories
Advertisement
Astronomy and Electronics Centre
Advertisement