Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Seanc

#1
Camera-specific Development / Re: Canon 5D Mark IV
March 05, 2019, 04:38:26 AM
Quote from: chris_overseas on March 02, 2019, 06:57:33 PM
Some good progress today:

Well done! Thanks for your hard work!

I keep wondering if I'd be able to help. I just barely managed to get code for the 5D MKIII to compile (figured I'd do that first) and got stuck as I don't entirely follow the help instructions. (I do database work/high level programming by day vs embedded & assembler) I guess I'm only a few baby steps into Alex's 'read, then read more' steps... lol. I did manage to hack on the dual ISO processing scripts a bit at least. (to reduce processor priority so it can run in the background with a responsive desktop)
#2
Camera-specific Development / Re: Canon 5D Mark IV
January 19, 2019, 10:45:29 AM
Quote from: djfr971 on January 12, 2019, 12:28:32 AM
I've already installed it on my 60D with the classic method but I would like to know if someone has successfully installed it on the 5D mack4.
Not even close. This is only the first step on the path to being able to begin work, though a very important one.

Thanks A1ex!
#3
Very slick. Thanks!
I'm learning for the first time with an inexpensive Ukrainian 80mm T/S and this is helping me get started. The ability to customize the lens list is perfect. I'm using it just above the subject (pinball playfield) and this helped me zero in on the tilt amount to use.
#4
"- get that working in both photo mode and LiveView (the former starts the exposure on all rows at the same time, the latter uses rolling shutter for both start and end of the exposure)"

I hadn't realized they're so different. That might give an edge to work on to unravel what's happening in the hardware.
Do you think the rolling shutter is so the rear LCD live view can be processed through a pipe as it's captured? (just seems like the obvious reason why) That part of the difference wouldn't provide hardware clues so there'd be lots related code to weed out. The rolling shutter itself should be interesting though. Even if the global read can't be done non-destructively, the rolling shutter must be reading line by line. Maybe you could global capture, trick just the rolling readout to run then global read. -shrug- We'd need the research work you pointed out to speculate usefully. (Thanks for answering btw! This is interesting!)
#5
Ooooh, it's not ruled out then!  :P I've wondered if Sony's trick is partly a double read combined into an HDRish raw. (maybe ISO 200 and 800 or 1600)

That's going to be a lot to untangle! It's a shame market forces mean we can't collaborate with Canon on this.

I'm a database guy in my day job, so only work with high level languages. It'd take me weeks to get a dev environment working and start learning the baby steps of learning the programming. I can follow the gist of what other folks write often, but that's a long way from being able to create on a blank slate. I did get that multi-threaded dual ISO processor working with priority though that was purely fighting with Windows. (wanted to still use my main rig while it churned on dual ISO work)

Now I wonder whether I'd be able to learn enough to make a dent in getting that done.

From a Lua thread Alex post: "If you want to take a burst of full-size images, and you have (or can borrow) a 5D3, my suggestion would be the 4K branch, as it can also record full-res frames (with rolling shutter) at about 4-5 FPS continuously, without shutter actuation."

That might be just the ticket for this quick double picture idea! I like your idea the more I think about it Kouglov. There are some night club and stage lighting scenes I've shot where that'd let me get some great results where a simple shot would just be average. That's be well worth the work to get, as I'd rather have a few hero shots than a folder of ok ones.
#6
You're trying to get the look of 2nd curtain sync flash while taking a long exposure flash without a strobe.

I think you're on the right track for what you can do, but you won't be able to duplicate the effect because the strobe is an essential part of the look. Ideally the strobe isn't just at the end of the exposure, it's also only (primarily) lighting the side of the subject it's moving towards so the leading edge is well defined but not the rest.

The brighter picture you're taking will be sharp all over. If you globally combine them it'll effect the whole scene instead of just the leading edge. Instead layer the pictures with a mask over the sharp one. Then paint away the mask over the leading edge so the sharp picture shows through into the long exposure, and blend towards the back and I think you'll have something. If the subject moved too much you may have to re-position that layer but because you're not including the background and the long exposure layer is motion blurred you'll be able to without harming the result - it'll be tolerant of that. I think what you've done will work for many situations via layered combining. I'd love to have a module to play with on my 5D mk 3.

Alex, I don't remember from the Dual ISO awsomeness thread. Does the image readout forcibly clear/destroy the sensor data so there is no possibility of a double read out or is that unknown?
#7
I've starting playing with this and really wanted to be able to use the hyperthreading cores without losing UI or foreground program responsiveness.

I don't see a way to add a priority parameter when using wshshell.run directly. The start program does though, so I've modified the script to launch start, which starts cr2hdr with low priority. My I7 is remaining responsive with 8 processes going now.

The primary change is the cr2dngcmd variable assignment. I've left the original commented out. Window minimizing is now controlled by the start command's /MIN parameter.

This is the new command passed:

QuoteExecuting: C:\WINDOWS\system32\cmd.exe /c start "Processing _UAL2744.CR2" /MIN /LOW "G:\Photo_workspace\DualISO\cr2hdr.exe" --compress "_UAL2744.CR2"

G:\Photo_workspace\DualISO\ being my test folder

'------------------------------------------------------------------
'last update: 4/06/2017

'NOTE: a copy of dcraw.exe and exiftool.exe needs to be in the folder with the dual iso images

cr2hdrpath="G:\Photo_workspace\DualISO\" 'ends with a slash \
cr2hdrexe="cr2hdr.exe"
cr2hdrargs="--compress"

exiftoolpath="G:\Photo_workspace\DualISO\" 'ends with a slash \ Used for correcttint option
inputfolder="G:\Photo_workspace\" 'dialog will start at this folder if set (ends with a slash \)

dualisocr2dir="Dual ISO CR2"
regularcr2dir="Regular CR2"
dngoutputdir="Dual ISO DNG"

organize=true 'sort files into subdirectories when done processing
correcttint=false

maxprocs=8 'Number of simultaneous processes
windowtype=7
'0 Hide the window and activate another window.
'1 Activate and display the window. (restore size and position) Specify this flag when displaying a window for the first time.
'2 Activate & minimize.
'3 Activate & maximize.
'4 Restore. The active window remains active.
'5 Activate & Restore.
'6 Minimize & activate the next top-level window in the Z order.
'7 Minimize. The active window remains active.
'3 & 7 replaced by parameters /MAX or /MIN on the start command when setting the cr2dngcmd variable
'------------------------------------------------------------------

set elog=CreateObject("System.Collections.ArrayList")
elog.add "Started: " & Now()
'starttime=Timer

'if inputfolder="" then 'not set in options
  if Wscript.Arguments.Count>0 then
    inputfolder=Wscript.Arguments(0) 'command line
  else
    inputfolder=getfolder("Select the folder containing the dual ISO .CR2 files.")
    if inputfolder="" then WScript.Quit
  end if
'end if

starttime=Timer
elog.add vbcrlf & "Input folder is " & inputfolder

set fso=CreateObject("Scripting.fileSystemObject")
set mainfolder=fso.GetFolder(inputfolder)
set files=mainfolder.Files
filecount=0
set cr2dngqueue=CreateObject("System.Collections.ArrayList")
set exiftoolqueue=CreateObject("System.Collections.ArrayList")

elog.add vbcrlf & "Searching for .CR2 files"

for Each file in files 'find applicable .cr2s
  if valfname(file.Name,".CR2") then
    cr2dngcmd="C:\WINDOWS\system32\cmd.exe /c start ""Processing " & file.name & """ /MIN /LOW " & """" & cr2hdrpath & cr2hdrexe & """ " & cr2hdrargs & " """ & file.name & """" 'no logs
'cr2dngcmd="""" & cr2hdrpath & cr2hdrexe & """ " & cr2hdrargs & " """ & file.name & """" 'no logs
    'cr2dngcmd="cmd.exe /c """"" & cr2hdrpath & cr2hdrexe & """ " & cr2hdrargs & " """ & file.name & """ > " & file.name & ".log """
    cr2dngqueue.add cr2dngcmd
    elog.add "Queued " & cr2dngcmd
    if correcttint then
      exiftoolcmd=exiftoolpath & "exiftool.exe " & replace(file.name,".CR2",".dng") & " -asshotneutral=""0.473635 1.05 0.624"" -overwrite_original"
      exiftoolqueue.add exiftoolcmd
      elog.add "Queued " & exiftoolcmd
    end if
    filecount=filecount+1
  end if
next

if filecount=0 then
  elog.add "No files found!"
  msgbox "No files found!"
  dump ""
  WScript.Quit
end if

elog.add vbcrlf & "Converting Dual ISO .CR2 files"
cr2hdrtime=runqueue(cr2dngqueue,maxprocs,cr2hdrexe)

if correcttint then
  runqueue exiftoolqueue,8,"exiftool.exe"
  elog.add vbcrlf & "Running exiftool"
end if

dngcount=0
for Each file in files
  if valfname(file.Name,".dng") then dngcount=dngcount+1
next

if dngcount=0 then
  msg="No DNG files created. Check script options and log."
  elog.add msg
  msgbox msg
  dump ""
  WScript.Quit
end if

if organize then sortfiles

finishline="Processed " & filecount & " file(s). Converted " & dngcount & " Dual ISO(s). Runtime: " & round(Timer - starttime) & " seconds."
elog.add vbcrlf & finishline & vbcrlf

if organize then
  mkdir mainfolder & "\" & "logs"
  dump("\logs")
else
  dump("")
end if

msgbox finishline

setnothing

sub sortfiles()
  elog.add vbcrlf & "Moving Dual ISO .CR2 files"
  set files=mainfolder.Files
  for Each file in files
    if valfname(file.Name,".dng") then 'find .dng but move .cr2 with same file name
      mkdir mainfolder & "\" & dualisocr2dir
      move mainfolder & "\" & fso.GetBaseName(file) & ".CR2", mainfolder & "\" & dualisocr2dir & "\" & fso.GetBaseName(file) & ".CR2"
    end if
  next

  elog.add vbcrlf & "Moving any regular .CR2 files"
  set files=mainfolder.Files
  for Each file in files
    if valfname(file.Name,".CR2") then
      mkdir mainfolder & "\" & regularcr2dir
      move mainfolder & "\" & file.Name, mainfolder & "\" & regularcr2dir & "\" & file.Name
    end if
  next   

  elog.add vbcrlf & "Moving Dual ISO .DNG files"
  set files=mainfolder.Files
  for Each file in files
    if valfname(file.Name,".dng") then
      mkdir mainfolder & "\" & dngoutputdir
      move mainfolder & "\" & file.Name, mainfolder & "\" & dngoutputdir & "\" & file.Name
    end if
  next

  elog.add vbcrlf & "Moving log files"
  set files=mainfolder.Files
  for Each file in files
    if valfname(file.Name,".log") then
      mkdir mainfolder & "\" & "logs"
      move mainfolder & "\" & file.Name, mainfolder & "\" & "logs" & "\" & file.Name
    end if
  next
end sub

function runqueue(queue,instances,exename)
  t=Timer
  Set WshShell=WScript.CreateObject("WScript.Shell")
  WshShell.currentdirectory=inputfolder 'have to set the current directory; can't pass full file path because of how cr2hdr calls adngc
  for Each line in queue
    elog.add "Executing: " & line
    wshshell.run line,windowtype,false
    waitfinish instances,exename
  next
  waitfinish 1,exename
  runqueue=Timer-t 'return elapsed time
  Set WshShell=nothing
end function

sub waitfinish(instances,exename)
  do
    Set myproc=GetObject("Winmgmts:").Execquery("Select * from Win32_Process where name='" & exename & "'")
    if(myproc.count>=instances) then wscript.sleep 100
  loop while myproc.count>=instances
end sub

function getfolder(title)
  MY_COMPUTER = &H11&
  USER_PROFILE = &H28&
  MY_PICTURES = &H27&
  WINDOW_HANDLE = 0
  OPTIONS = &H10&

  Set objShell = CreateObject("Shell.Application")
  Set objFolder = objShell.Namespace(MY_PICTURES)
  Set objFolderItem = objFolder.Self
  if inputfolder<>"" then strpath=inputfolder else strpath=objFolderItem.Path

  Set objShell = CreateObject("Shell.Application")
  Set objFolder = objShell.BrowseForFolder _
    (WINDOW_HANDLE, title, OPTIONS, strPath)
       
  If objFolder Is Nothing Then
      Wscript.Quit
  End If

  Set objFolderItem = objFolder.Self
  getfolder = objFolderItem.Path
end function

sub dump(subfolder)
  dim objfile
  set objFile=fso.CreateTextFile(mainfolder & subfolder & "\dualISOscript.log",True)
  objFile.Write Join(elog.toarray(), chr(13) & chr(10))
  objFile.Close
end sub

sub setnothing()
  set objfile=nothing
  set cr2dngqueue=nothing
  set adngcqueue=nothing
  set deldngqueue=nothing
  set elog=nothing
  set fso=nothing
end sub

function valfname(name,suffix)
  valfname=lcase(Right(name,len(suffix)))=lcase(suffix)
end function

sub mkdir(dir)
  if not fso.FolderExists(dir) then
    fso.createFolder(dir)
    elog.add "Created """ & dir & """"
  end if
end sub

sub move(src,dest)
  elog.add "Moving """ & src & """ to """ & dest & """"
  fso.MoveFile src,dest
end sub

function round(num)
  round=int((num+.005)*100)/100
end function
#8
I prefer 'b' because it has more texture detail than 'c', and tames the chroma noise that's objectionable in 'a'.