New stretching software: rnc-color-stretch released (free, open source)

Thanks for making this available. I'll briefly report what I did. Working on Windows 10 I downloaded davinci and installed it. Then I downloaded Roger's davinci script rnc-color-stretch-v0.936 and put in some suitable directory. That was all I needed. cd into that directory and call the script with

"c:\Program Files\Davinci-2.18\davinci" -f rnc-color-stretch-v0.936 ...

I haven't studied yet what all the options do but simply threw one of the example parameters onto one of my stacked files I did with sequator of some vintage. I'd have to reconstruct how I did the stacking but here is a result. Processed as

"c:\Program Files\Davinci-2.18\davinci" -f rnc-color-stretch-v0.936 m31seqAll1.tif -rootpower 50 -obase m31Alle14 -scurve2 -setmin 5140 5200 5650 -jpegonly -display -enhance 1.4
Hi ml6

Many thanks for your report as I was not able to get it running. I did not understand (maybe because I know nothing about programming ...?) that I had to put in the location as "c:\Program Files\Davinci-2.18\davinci". It worked with Win 7 for me. Location was "c:\Program Files (x86)\Davinci\davinci" -f ...

Image is still crap but I guess I have to put in some options ...

Are you also able to help me out with rnclark's sigma clipper average?: http://www.clarkvision.com/articles/astrophotography.software/

I'd like to try that one out too.

Special thanks to Roger Clark for all his amazing work and the best website on astrophotography!

Cheers
 
Thanks for making this available. I'll briefly report what I did. Working on Windows 10 I downloaded davinci and installed it. Then I downloaded Roger's davinci script rnc-color-stretch-v0.936 and put in some suitable directory. That was all I needed. cd into that directory and call the script with

"c:\Program Files\Davinci-2.18\davinci" -f rnc-color-stretch-v0.936 ...

I haven't studied yet what all the options do but simply threw one of the example parameters onto one of my stacked files I did with sequator of some vintage. I'd have to reconstruct how I did the stacking but here is a result. Processed as

"c:\Program Files\Davinci-2.18\davinci" -f rnc-color-stretch-v0.936 m31seqAll1.tif -rootpower 50 -obase m31Alle14 -scurve2 -setmin 5140 5200 5650 -jpegonly -display -enhance 1.4
Hi ml6

Many thanks for your report as I was not able to get it running. I did not understand (maybe because I know nothing about programming ...?) that I had to put in the location as "c:\Program Files\Davinci-2.18\davinci". It worked with Win 7 for me. Location was "c:\Program Files (x86)\Davinci\davinci" -f ...

Image is still crap but I guess I have to put in some options ...

Are you also able to help me out with rnclark's sigma clipper average?: http://www.clarkvision.com/articles/astrophotography.software/

I'd like to try that one out too.

Special thanks to Roger Clark for all his amazing work and the best website on astrophotography!

Cheers
Any davinci program will be the same as rnc-color-stretch. In windows, copy the launcher batch file,

LaunchConsole.bat

and the davinci script, e.g.

davinci.sigma-clip-average-3pass

to the directory and with windows explorer, double click on the LaunchConsole.bat file. That stars a terminal session with everything set up. Then type:

davinci -f davinciscriptfile options.

e.g. type:

davinci -f rnc-color-stretch filename.png -rootpower 20

or

davinci -f davinci.sigma-clip-average-3pass sigma 2.0 -png -images *.tif

The *.tif means all tif images in that directory (folder).

On macs and linux, simply copy davinci.sigma-clip-average-3pass to /usr/local/bin and make it executable.

Roger
 
Last edited:
I'm on the older 15.04 Linux. It didn't like the 2.10 Davinci due to "md5sum-mismatch"s (not to mention the for Linux 16 1.18, with a dependency issue of "libhdf5-10").

Even older 2.07 complains of a dependency issue of "lesstif2".

I suppose I should upgrade to a newer Ubuntu.
 
Thanks a lot Roger, your description worked fine. However, and this might sound or be stupid, while I don't have any trouble with the sigma clipped average, after running the color stretch fine for once I get the following message when trying to run it again:

loading history

dv>

If anyone can help ...

Thanks
 
Thanks a lot Roger, your description worked fine. However, and this might sound or be stupid, while I don't have any trouble with the sigma clipped average, after running the color stretch fine for once I get the following message when trying to run it again:

loading history

dv>

If anyone can help ...

Thanks
What operating system?

If windows, you might try the new windows gui:


Roger
 
Thanks a lot Roger, your description worked fine. However, and this might sound or be stupid, while I don't have any trouble with the sigma clipped average, after running the color stretch fine for once I get the following message when trying to run it again:

loading history

dv>

If anyone can help ...

Thanks
What operating system?

If windows, you might try the new windows gui:

http://www.clarkvision.com/articles/astrophotography.software/rnc-color-stretch/

Roger
Yes, win. I will try the gui, thanks!
 
Does anybody have success with windows version? I cannot make it run even with the sample file in Roger 's website. The GUI makes davinci crash. After I run any stretching, it brings an error "davinci.exe has stopped working". Maybe my davinci is old? I have davinci 2.07 since that's the latest version for windows found on ASU website.
 
Does anybody have success with windows version? I cannot make it run even with the sample file in Roger 's website. The GUI makes davinci crash. After I run any stretching, it brings an error "davinci.exe has stopped working". Maybe my davinci is old? I have davinci 2.07 since that's the latest version for windows found on ASU website.

--
https://www.flickr.com/photos/aramgrg/
Hi,

The GUI was tested with Davinci version 2.18, 64-bit, which seems to have disappeared from the ASU website?!
 
Does anybody have success with windows version? I cannot make it run even with the sample file in Roger 's website. The GUI makes davinci crash. After I run any stretching, it brings an error "davinci.exe has stopped working". Maybe my davinci is old? I have davinci 2.07 since that's the latest version for windows found on ASU website.
 
Does anybody have success with windows version? I cannot make it run even with the sample file in Roger 's website. The GUI makes davinci crash. After I run any stretching, it brings an error "davinci.exe has stopped working". Maybe my davinci is old? I have davinci 2.07 since that's the latest version for windows found on ASU website.

--
https://www.flickr.com/photos/aramgrg/
There should be nothing in the code that requires a later version except reading tif files. Have you tried to feed it a 16-bit/channel png file?

They may have pulled 2.18 for some bugs found. I found a new one in writing spectroscopy files, code that has worked for a decade.

If a png file does not work, contact me by email. I believe I have the 2.18 windows install.

Roger
Good tip! Thanks Roger, it worked, and I really like the result. I was doing some "astrophotography" in a heavily light polluted area with 135mm f2 samyang lens on D600 + a didymium filter (tiffen red enhancer). Will try the same lens next time on my fuji x-t2 body. Here are the files



Tiff -> lightroom
Tiff -> lightroom





rnc on png -> lightroom
rnc on png -> lightroom



rnc jpeg
rnc jpeg

Thanks again Roger, your website is the most valuable single page on web!

--
 
Hi Roger,

Have tried to get this to work today.

I'm on Windows 10 x64, using Davinci 2.07 and both versions of the RNC ColorStretchGUI ( v 0.2 and 0.3)

Davinci is at program files (x86) and the GUI at C/, with the LaunchConsole.bat file at Davinci root.

I point the GUI to the Davinci exe and the script stays pointing at the GUI / Scripts v0.936 script.

The parameters seem to run fine then Davinci stops working

The last line in the console before this happens is

"SAMPLEFORMAT tag missing; assumptions will be made in data format determination"

This has happened many times, always at the same line.

Have re installed Davinci over itself just in case.

The images I've tried are all 16 bit tiffs

Any ideas as to whats going on ?

Is the GUI perhaps not compatible with this version of Davinci and I need to go and find an earlier version ? If so what version ?

Any thought appreciated, thanks

Grahame
 
Last edited:
Hi Roger,

Have tried to get this to work today.

I'm on Windows 10 x64, using Davinci 2.07 and both versions of the RNC ColorStretchGUI ( v 0.2 and 0.3)

Davinci is at program files (x86) and the GUI at C/, with the LaunchConsole.bat file at Davinci root.

I point the GUI to the Davinci exe and the script stays pointing at the GUI / Scripts v0.936 script.

The parameters seem to run fine then Davinci stops working

The last line in the console before this happens is

"SAMPLEFORMAT tag missing; assumptions will be made in data format determination"

This has happened many times, always at the same line.

Have re installed Davinci over itself just in case.

The images I've tried are all 16 bit tiffs

Any ideas as to whats going on ?

Is the GUI perhaps not compatible with this version of Davinci and I need to go and find an earlier version ? If so what version ?

Any thought appreciated, thanks

Grahame
Davinci 2.07 on windows seems to have trouble reading tif files. Convert your 16-bit tif to a 16-bit png and it should work fine.

Roger
 
Roger, thanks for the quick reply.

Unfortunately that didn't work.

The last lines from the console

"

Histogram peak, input image:

image histogram: DN Number of pixels in peak histogram bin

red: 649 516.304504

green: 479 498.455902

blue: 403 532.928467

histogram sky level 0.060000 not found:

channels: red 0 green 0 blue 0

Thus, not sure what to do with this image, quitting

Try increasing -rgbskyzero values

exit (1)"

I have tried all sorts of values up to 20000 on the "Desired zero point on sky, RGB channels, also as low as 1000

For "Minimum output value" have been up to 5000

Have tried your 2 presets with v0.3 GUI

Ah well getting somewhere :)

I have to go out for a few hrs will play later tonight.

Thanks
 
Roger, thanks for the quick reply.

Unfortunately that didn't work.

The last lines from the console

"

Histogram peak, input image:

image histogram: DN Number of pixels in peak histogram bin

red: 649 516.304504

green: 479 498.455902

blue: 403 532.928467

histogram sky level 0.060000 not found:

channels: red 0 green 0 blue 0

Thus, not sure what to do with this image, quitting

Try increasing -rgbskyzero values

exit (1)"

I have tried all sorts of values up to 20000 on the "Desired zero point on sky, RGB channels, also as low as 1000

For "Minimum output value" have been up to 5000

Have tried your 2 presets with v0.3 GUI

Ah well getting somewhere :)

I have to go out for a few hrs will play later tonight.

Thanks
OK, at least the image is being read now.

Is this linear data or tone curve data? If linear data, turn on the tone option.

If it is tone curve data (e.g.output from photoshop or lightroom), put the png file somewhere where I can download it. The algorithm to find the zero point needs improvement and seeing some data where it fails will help me design an improvement.

Contact me off list by email.

Roger
 

Keyboard shortcuts

Back
Top