Shot Histogram Request - page 41 - CHDK Releases - CHDK Forum

Shot Histogram Request

  • 467 Replies
  • 147888 Views
*

Offline lapser

  • *****
  • 1093
Re: Shot Histogram Request
« Reply #400 on: 08 / September / 2013, 16:24:16 »
Advertisements
@lukeiron

Attached is a custom CHDK build for your camera. You need to copy all the files in the zip, including the subfolders, onto your SD card, replacing the files that are there. The way I do it with Windows is: download zip, double click it, press ctrl+A ctrl+C, go to root of your SD card, press ctrl+V, choose overwrite all folders and files.

The new USBLapse.lua requires this CHDK custom build. I added a maximum interval parameter which takes over if the USB doesn't trigger (this is the time out). It defaults to -1, which is no time out.

The script should open the shutter within 10 msec of the time it gets the USB trigger. Let me know if you have problems, or get it working. Good luck!


EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

*

Offline lapser

  • *****
  • 1093
Re: Shot Histogram Request
« Reply #401 on: 08 / September / 2013, 19:52:46 »
Okay I will try to play around with the camera settings... when it is dark enough it starts flickering right away when I start the script, so it is quite well reproduce able the problem.
One thing that you can do that would be a big help is to turn on CHDK raw saving in DNG format. Hopefully, you have a program that can display the DNG files. Before starting Tlapser, try setting bvDelta to 0. Then the flickering, if it still happens, is all from the incorrect meter readings. Look at the jpg and dng files with the same file number and see if they always have the same brightness. The dng file should be showing what my meter read its brightness from.

To test the 1 second shutter time theory, I wrote a script that takes pictures at tv96 of -1 and +1 (0 is 1 second). It prints out the meter readings for the 2 pictures, and the difference in meter readings. Try pointing the camera at a blank wall for the test. The difference in meter readings should be small. It's always small on my camera. If it's a large difference on your camera, we'll be one step closer to figuring out the cause.

Before running the test script, set the camera to Tv, shutter priority, mode with a shutter speed of 1 second. Leave all the other settings the same as the ones where it flickered. Hopefully, we can figure it out. Thanks.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: Shot Histogram Request
« Reply #402 on: 09 / September / 2013, 16:07:52 »
Before starting Tlapser, try setting bvDelta to 0. Then the flickering, if it still happens, is all from the incorrect meter readings.

The flickering is gone when I set bvDelta to 0. What does that mean?
Thanks for the testing script, I will try looking at the DNG raw files.

*

Offline lapser

  • *****
  • 1093
Re: Shot Histogram Request
« Reply #403 on: 09 / September / 2013, 16:59:30 »
The flickering is gone when I set bvDelta to 0. What does that mean?
Thanks for the testing script, I will try looking at the DNG raw files.
OK, if it doesn't flutter, does it get brighter for 1 or 2 pictures, and then correct back to normal exposure? Seeing the log file would be useful. It should show a sudden increase in the meter reading when the shutter time gets above 1 second.

Also, I need to check the way I do the brightness correction. The idea is to underexpose as it gets darker, but I didn't consider what happens with sudden brightness changes.

It sounds like the new G1X 101A firmware may be keeping the ND filter  IN with shutter time <=1 second. It may be related to starting the script in Av mode. I've noticed that the 1/4000 shutter time is inaccurate. Two pictures taken in continuous mode don't always come out the same brightness. I was going to add ND filter control to my script to keep the shutter times lower to avoid this. Maybe Canon already did it.

A useful test would be to start in Manual exposure mode. The Aperture setting is used for the entire script, so set it to the minimum F-stop if you're going to continue after it gets dark. The shutter and ISO are set by the script, so they don't matter that much. If the initial settings are overexposed, it takes a few extra pictures for the script to get the right exposure.

Thanks again for all the testing.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

*

Offline lapser

  • *****
  • 1093
Re: Shot Histogram Request
« Reply #404 on: 10 / September / 2013, 14:46:26 »
Quote from: lukeiron
  i tried but i can't reach a costant interval between shots.
My goal is to shot a picture exactly every 2 sec because i've to log on the Arduino parameters in synch with the pictures.
I send to the USB, for example, this square wave: t0=5V t1=0V t2=0V with t0=0ms, t1=100ms and t2=3000ms but the camera shots every 3200ms, 2500ms, 3300ms...
I reached quite good results with the standard "USB remote" but i hope to improve them with your script and fw.
CHDK has built in USB remote menu options, including synch delay. I haven't used it, but it may be able to do what you want without using my time lapse mods. Maybe @waterwingz can help you? I'm thinking a simple script that just holds the shutter down in continuous drive mode combined with the right CHDK usb remote menu options might work:
Code: [Select]
press("shoot_full")
repeat until false
I'm not sure why my script didn't trigger. I'm looking for a change in USB power from on to off. Maybe it's not off long enough for the script to detect it. Anyway, if it's detecting the USB trigger built into CHDK, then I can detect it as a key click in a script.

Here's the script modified to sync to key clicks. You can press any camera key to trigger a picture, or trigger it through USB (if it works). Press <menu> to exit. Also, I modified the script abort key in my CHDK build. You press the <ALT> key to abort a script, instead of the shutter button.

Code: [Select]
--[[
@title USBLapse 130910
@param m Max Interval (msec)
@default m -1
--]]
--MUST BE IN CONTINUOUS MODE
if(m<0)then m=1234567890 end -- 2 week interval default
set_shot_interval(m,0) --Maximum interval, no script handshake delays
nshot=1
print("Holding shoot_full")
print("Press <menu> to exit")
press("shoot_full") -- continuous mode
repeat
  wait_click(10)
  if(not is_key("no_key")) then
    set_shot_interval(-1) --takes one shot immediately with any key click or usb remote
  end
  if(get_shot_ready())then
    print(nshot,get_shot_data(4)) -- shot #, interval from last shot
    nshot=nshot+1
  end
until is_key("menu")

By the way, the interval using my set_shot_interval() function is very precise. If you want a 2 second interval, set the Max Interval parameter in the script to 2000. The script could then send a USB power output pulse to your board in between pictures, so you could pan the camera without messing up a shot, if that's what you're up to. In other words, instead of triggering the camera with the external board, you can trigger the board with the camera.

[edit] I just noticed that you asked about USBLapse.lua in another topic, where it started. Sorry for the confusion. We may as well keep it in this topic now. For reference, the initial USBLapse discussion topic is here:
http://chdk.setepontos.com/index.php?topic=9188.msg105038#msg105038
« Last Edit: 10 / September / 2013, 16:03:50 by lapser »
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: Shot Histogram Request
« Reply #405 on: 10 / September / 2013, 16:11:41 »
Trigger the board with the camera can be a very good idea!
I was close to ask to you the same thing :-)

But I'd like also to be able to start to shoot remotely, is it possible to use the USB for I/O at the same time?
Which is the command to send a pulse on the USB in output from the camera?

Thank you!
luca

Re: Shot Histogram Request
« Reply #406 on: 10 / September / 2013, 16:33:09 »
It looks like there is something wrong with the G1 X 101a firmware port.

First, I can't run your test script "Tv0test.lua" sucessfully. It prints *** STARTED *** on the LCD and takes one picture, but nothing happens afterwards.

Anyway, I had a look at the DNG files. There seems to be an issue there. Some of them look quite pink.
I uploaded some sample pictures (dng and jpeg files plus the log file).
https://dl.dropboxusercontent.com/u/55970719/Sample_raw_files.rar

It is not quite true that the flickering is completely gone with bvDelta set to 0. I did a test and I still had some flickering just as the shutter time reached 1 second, but it was not so bad and disappeared again after a couple of oscillations. I placed all the data of that test in a rar file and uploaded it also.
https://dl.dropboxusercontent.com/u/55970719/20130910.rar

I guess I have to return my G1 X to the Canon Vendor and tell them CHDK is not working properly on it :)

*

Offline lapser

  • *****
  • 1093
Re: Shot Histogram Request
« Reply #407 on: 10 / September / 2013, 18:07:10 »
It looks like there is something wrong with the G1 X 101a firmware port.
I posted your reply over on the G1X porting thread. Hopefully, philmoz will figure it out. See this post for more info:

http://chdk.setepontos.com/index.php?topic=7934.msg105145#msg105145
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

*

Offline lapser

  • *****
  • 1093
Re: Shot Histogram Request
« Reply #408 on: 10 / September / 2013, 18:22:04 »
Trigger the board with the camera can be a very good idea!
I was close to ask to you the same thing :-)

But I'd like also to be able to start to shoot remotely, is it possible to use the USB for I/O at the same time?
Which is the command to send a pulse on the USB in output from the camera?
http://chdk.wikia.com/wiki/Lua/PTP_Scripting#write_usb_msg
I haven't used the usb part of CHDK much, but yes you can write data to the usb port from Lua. Check out the above link.

I think the script could start taking pictures when your external computer turns on the USB power. The script could send a data pulse between pictures when it's safe to pan the camera.

Maybe your board is leaving the USB power on and sending data pulses, instead of turning the power off and back on. My initial script checked for the power going off, not the data.

reyalp is the expert on USB and CHDK, so maybe he can shed some light on this.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: Shot Histogram Request
« Reply #409 on: 10 / September / 2013, 18:46:03 »
The camera is connected to an Arduino board and so I just sending a +5V or 0V to the USB port, not serial data streaming.

Thank you for the link but I prefer just receive a 5+V or 0V instead of a real data streaming... it's easier to handle this with the arduino board.

I tried to use the script without the USB triggering and the timing is perfect.
I just need to receive on the USB a pulse to obtain the sync with the board.

 

 

Related Topics


SimplePortal © 2008-2014, SimplePortal