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

Shot Histogram Request

  • 467 Replies
  • 148013 Views
*

Offline lapser

  • *****
  • 1093
Re: Shot Histogram Request
« Reply #210 on: 31 / March / 2013, 16:26:12 »
Advertisements
(I assumed P mode was Portrait, as this cam has an Auto and Manual mode, but nothing specifically called P If this is not the correct mode srsa_4,  let me know)... and it works  :D. It seems a little flakey if I use any other settings.
P is "Program" auto exposure that sets aperture and shutter speed. You could try it in Manual, setting the aperture as wide as possible (lowest F stop). Portrait mode probably isn't right for a sunset.
Quote
I just sat it on the fence post, no waterproof housing, slightly risky as there is a chance of frost. I notice the script doesn't switch off the display, not sure if this is possible, but it would help preserve the battery life a bit if it is. 
You switch the display on and off by pressing <set> while the shots are being taken. Be careful not to jiggle the camera, though. <up> and <down> move the log line. <right> and <left> turns the metering area display on or off. <display> controls the ND filter (if any). That may crash the camera, so don't try it unless you're ready for that possibility.

I waterproofed my G1X on the snowshoe trip by putting it display side down in the middle of a sheet of plastic wrap. I wrapped it around the camera, and put a rubber band around the barrel of the lens to hold it.  Then I cut the plastic with scisssors so it's not in the shot. With a point and shoot, you'd have to do it with the camera turned on and the lens out. It worked pretty well. I think it holds the camera heat in enough to keep the lens from fogging, or the camera from freezing. Plus you can see the screen and all the buttons work.
« Last Edit: 01 / April / 2013, 00:36:23 by lapser »
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

*

Offline srsa_4c

  • ******
  • 4451
Re: Shot Histogram Request
« Reply #211 on: 31 / March / 2013, 20:07:02 »
Sorry about the confusion, Canon is only using "P" mode on cameras with manual modes. On Ixus cameras, it's displayed as "M" mode (but it doesn't provide full manual control, the name is misleading).

*

Offline lapser

  • *****
  • 1093
Re: Shot Histogram Request
« Reply #212 on: 01 / April / 2013, 12:07:22 »
Canon is only using "P" mode on cameras with manual modes. On Ixus cameras, it's displayed as "M" mode (but it doesn't provide full manual control, the name is misleading).
I seemed to have a conflict in Manual Exposure mode on the SX50 when overriding exposure in half shoot. I haven't tracked it down, but it may have been related to setting the Av propcase. I heard clicking, and it slowed down the shot rate until I switched the mode dial to Aperture Priority mode. It was also in continuous shooting mode, so that might be it too. There's a continuous mode with auto focus that may have been triggered for some reason.

I'd be interested to see how fast you can shoot in continuous mode. If you set the interval to 5 (1/2 second), that would be a good test. An interval of 1 would shoot as fast as possible (but slightly irregular).
==========

I did another test from Skinner Butte last night. I set a small shot meter area on one street and another on the sky. When the sky got dark, the the other shot meter kept the exposure correct for the city lights, and had the added benefit of keeping the shutter time under 1/2 second so it didn't slow down the shot rate (and speed up the resulting video).

I used a Norah Jones song for the music, but EMI blocks the video in some countries. I apologize if you're in one of them:

http://www.youtube.com/watch?v=pozFliELR4w#ws
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

*

Offline ahull

  • *****
  • 634
Re: Shot Histogram Request
« Reply #213 on: 02 / April / 2013, 14:35:01 »
Hi lapser, Love all of the detail with the traffic lights and traffic in that last time lapse.

As far as my testing goes...  they say that if you make things idiot proof, it just inspires a better kind of idiot to break it. Looks like I figured out how to break your script in a new and interesting manner.

Since I couldn't make it load in Auto or Manual mode for some reason (one shot, then camera crash, as I described previously...) I decided to see what mode other than Portrait it would work in. So I put the camera in night snapshot mode, set it up and left it to do its thing.

When I returned it had taken a bunch of pictures, *but* every other picture was exposed differently. The odd numbered images got progressively darker as the sun set, the even numbered images got lighter.  Not sure how I and/or the camera  managed this feat (would perhaps make for some interesting HDR  shots, but didn't make a very good timelapse).  Its not a complaint about the script, I'm just trying to figure what fat fingered mistake I made.... That was last nights effort.

Tonight is overcast, and the local farmer is shifting his ewes down to the yard, so dog walk was curtailed, and no test tonight. I am going to try again tomorrow if I get a chance

*

Offline lapser

  • *****
  • 1093
Re: Shot Histogram Request
« Reply #214 on: 02 / April / 2013, 15:31:26 »
Since I couldn't make it load in Auto or Manual mode for some reason (one shot, then camera crash, as I described previously...) I decided to see what mode other than Portrait it would work in. So I put the camera in night snapshot mode, set it up and left it to do its thing.

When I returned it had taken a bunch of pictures, *but* every other picture was exposed differently.
It's still a very experimental script, and CHDK modifications, so it's not something you did. For testing, you don't need to wait for sunset. Just point the camera at the screen and hold it there, and start the script.

Will you try setting "Show Meters" to 1, and "Log File" to 1. Then, the first picture will show the metering area in the picture. It should be about the same as the metering area you see and can move around when the script starts. The picture at the end of the last time lapse script is a good example of what it looks like.

If the log file works, you should see a file in the CHDK/LOGS folder like:

04021308.LOG

If you can post this log file, and the first picture (small size is ok) with the metering lines on it, that might help.

You can also try setting MAX ISO to 100 (same as MIN ISO) and see if that changes anything, in case there's an error in setting ISO on that camera.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

*

Offline ahull

  • *****
  • 634
Re: Shot Histogram Request
« Reply #215 on: 02 / April / 2013, 18:51:45 »
Good suggestions. I'll give them a try when I can. 
I may continue my testing at sunset routine though as sounds likely to produce more interesting results  :P
Besides these days just around sunset is about the only time I am likely to have a few spare moments.


*

Offline lapser

  • *****
  • 1093
Re: Shot Histogram Request
« Reply #216 on: 02 / April / 2013, 21:12:54 »
Good suggestions. I'll give them a try when I can. 
OK, be sure to try continuous mode and infinity focus. I think you press the <left> for focus and <down> for continuous drive mode (burst mode).

If nothing else, I'd like to see if the pictures are displayed on the screen in continuous mode like on my camera.
=================

I wasn't totally happy with the smoothing routine because it bunches up ev96 changes in groups of 3, and that's more visible than I'd like. I updated it to only do a ev96 change every 4 unchanged shots. I'll see if that works tonight. It looks like it might be a good sunset.

Last night was really nice, but I got 11,000 pictures and I'm processing them all through Lightroom, which takes all day. It should make the sunset colors a little brighter, though. I'll try to post something when it's ready.

Here's my current smoothing code:

Code: (lua) [Select]
  --smoothing
    if(tvd>1)then
      tvd=tvd-smooth
      if(tvd<=0)then
        if(nztvd>3)then tvd=1 else tvd=0 end
      end
    elseif(tvd<-1)then
      tvd=tvd+smooth
      if(tvd>=0)then
        if(nztvd>3)then tvd=-1 else tvd=0 end
      end
    else
      tvd=0
      nztvd=-1
    end
    if(tvd==0)then nztvd=nztvd+1 else nztvd=0 end
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 #217 on: 03 / April / 2013, 17:25:38 »
I think the smoothing code above worked better from looking at the log file, but I'll have to see what the video looks like tomorrow (still processing in Lightroom).

I finished the videos from April 1, which was a really pretty, light up the sky kind of sunset:

http://www.youtube.com/watch?v=deOMHla_MGk#ws

http://www.youtube.com/watch?v=MrpzuGwGsrs#ws
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 #218 on: 04 / April / 2013, 15:20:42 »
The smoothing code did work better for most of the video, except at the beginning. I had one meter set on the sun as it was just about to set, so the shutter time was 1/2500 at the start. At this high speed, changes of one tv96 unit apparently aren't as accurate as they are at slower speeds. I think this is what caused the "fluttering" at the beginning of the video in the darker, upper left corner away from the sun. After the sun went down, I didn't see any more "flutter" even as it got dark and the stars came out.

I've been planning to add automatic ND filter control to the script. Maybe I could apply the ND filter if the shutter speed was over 1/1000 or so. The filter is around 2.5 Fstop, but would have to be calibrated more accurately to keep from flashing when it went in or out.

SX50:
http://www.youtube.com/watch?v=WiVrgVYbuh8#ws

G1X:
http://www.youtube.com/watch?v=eY7bjRyNUhY#ws
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

*

Offline lapser

  • *****
  • 1093
Rounding Error
« Reply #219 on: 05 / April / 2013, 10:18:43 »
This smoothing/fluttering problem smelled like rounding errors, so I looked into it.

I was converting the shot meter result from (double) to (int) using truncation since the absolute value isn't critical, only the relative value from the last shot. However, truncation doesn't work correctly for signed values. That is, everything between -1.0 and +1.0 is truncated to integer 0.

The usual way of rounding is to add 0.5 and truncate. However, for negative numbers, you need to subtract 0.5.  The correct rounding function is:

Code: [Select]
int iround(double x)
{
  return (int)(x+((x>0)?0.5:-0.5))
}

Here's a more complete discussion of rounding:
http://www.cs.tut.fi/~jkorpela/round.html

I'm not sure this fix will solve my "fluttering" problem, but it should help.

[EDIT] Is there a built in rounding function I can use that will round negative numbers correctly, i.e. rint() or lrint()? How would I call them? Thanks.

[EDIT2] I also corrected the rounding in my new Apex96 conversion functions. The shutter time conversions are accurate now for negative tv96 values (Shutter time >1 sec). For example, instead of showing 4.97 seconds when I wanted 5 seconds, it now shows 5.00 seconds.
« Last Edit: 05 / April / 2013, 13:56:38 by lapser »
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

 

Related Topics


SimplePortal © 2008-2014, SimplePortal