Script inside script for HDR

  • 28 Replies
  • 3773 Views
Script inside script for HDR
« on: 13 / May / 2014, 04:53:36 »
Advertisements
For long time i'm used to magic lantern, especially HDR tool, and there is one super useful feature - after each sequence HDR breaking, software (magic lantern) write simple script sh for stack all photos into one fused photo. It's very very helpfull because in postproduction on PC is enough to execute all script in one command and make for example hundreds HDR photos. Is it possibile to add tat feature into UltraHDR.lua or other script ?
Fusion script is very simple - enfuse -o output01.jpg input01.jpg input02.jpg input03.jpg input04.jpg

Thank for everyone who makes this wonderfull tool!

Re: Script inside script for HDR
« Reply #1 on: 13 / May / 2014, 11:51:42 »
Fusion script is very simple - enfuse -o output01.jpg input01.jpg input02.jpg input03.jpg input04.jpg

It certainly is, but the programme that blends your images is on your PC.
CHDK cannot run Enfuse.

Incidentally, I could never get *.jpg to work, it is meant to be supported.


Re: Script inside script for HDR
« Reply #2 on: 13 / May / 2014, 15:51:31 »
Of course You're right, but I ask about writing on SD card just simple script .sh after each breaking sequence. Script look like this:

Code: [Select]
#!/usr/bin/env bash
enfuse "[email protected]"  --output=HDR_7845.tif IMG_7845.tif IMG_7846.tif IMG_7847.tif IMG_7848.tif

Ofcourse it could be jpg, tiff or even RAW

After shutting all files from SD card - photos and scripts You can put to PC linux and run one simple  loop to execute all HDR photos. Please belive me, Its really genious feature of CHDK brother - Magic Lantern, watch paragraph HDR Bracketing from http://wiki.magiclantern.fm/userguide , I'm using it daily.

I'm not proffesional programist , but it looks really simple task, it's manipulating file names and writing text script on card.

I'm attaching one of many script from my canon camera and simple loop script

Re: Script inside script for HDR
« Reply #3 on: 13 / May / 2014, 16:05:41 »
Sorry, I did not read your post carefully enough.

Yes, that is a good idea.

I do not use CHDK but I imagine a Lua script could do that for you.
I am not familiar with the CHDK Lua commands, particular getting the number of the first photo of the sequence.

Wait for a CHDK user to respond.


Re: Script inside script for HDR
« Reply #4 on: 13 / May / 2014, 16:24:36 »
Here is an example from the CHDK Lua reference that gets the full path name (directory and image name) of last image :-

Code: [Select]
img=string.format('%s/IMG_%04d.JPG',get_image_dir(),get_exp_count())

Re: Script inside script for HDR
« Reply #5 on: 13 / May / 2014, 16:42:29 »
Pity, but I've no idea what I have do with this, sorry :-(

Re: Script inside script for HDR
« Reply #6 on: 14 / May / 2014, 02:05:18 »
Pity, but I've no idea what I have do with this, sorry :-(
Check back here in a couple of days.  When I get a moment, I'll make the script changes for you.

Ported :   A1200    SD940   G10    Powershot N    G16

Re: Script inside script for HDR
« Reply #7 on: 15 / May / 2014, 00:29:11 »
Give this a try ?

Not sure I got the output script shell right and it might need a #/bin/bash inserted at the top?
Ported :   A1200    SD940   G10    Powershot N    G16


Re: Script inside script for HDR
« Reply #8 on: 15 / May / 2014, 07:18:36 »
Not sure that will work.

If Jez copies files and scripts to PC as he stated, only image names required not full path.

If trying to run from card reader, the CHDK path name will not be same as the PC-assigned path name.


Re: Script inside script for HDR
« Reply #9 on: 15 / May / 2014, 09:15:30 »
Agreed. I only had a few minutes to look at this so I assumed it would be easy to edit things like path names once the script was modified appropriately.
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics