GunnarK wrote:First of all, let me introduce myself, as I am new to this forum, allthough I lurked allready for quite a while.
I am interested in panoramic imaging (obviously...) , as well as HDR-panoramas and timelapse-photography, so i am looking forward very much to the as-of-now greyed-out timelapse-tab...
So, looking back, my first post became much longer than anticipated, but I hope I could throw in a few bits of maybe usefull information to the panographers community which I plan to become a part of hopefully soon...
fma38 wrote:I have to say that I'm not yet decided if I will implement timelapse in Papywizard, or as a separate application (with large parts of code shared with Papywizard)... And as I already said to some of you, I'll be very busy in the next months/years, because I will build my new house! So, Papywizard project will certainly be put in standby for a while; or at least, I will only implement small features. Timelapse is not on my top-list priorities...
Thanks for this very interesting feedback. I started, some time ago, to implement a intelligent bracketing feature, based on gphoto2. I didn't take time to make serious tests, but the basic works. If you are interested in my code (python, of course!), I can share it with you.
About multiple exposures with one command, don't forget something: if you do so, Papywizard won't be able to save all exposures in the xml data file, so APP won't be able to load all images using the Papywizard import filter. Even if it is longer, you should better call n times your script. The shoot() method is called with an argument, which is the bracketing number (for 1 to n). So, you can select the correct command in your script.
GunnarK wrote:Indeed, the timelapse could be an independant program, but then again, the two share a lot incommon... Do you allready have soem design-ideas how you would handle such a project ?
I think it would be interesting to have the possibility of "timewarping" the timelapse. What that would mean is that you have the movement path of the camera , and the time when the camera is at which position along the path, can be set independantly. So you can have an Ease-In of an Ease-out, for example.
For a one-to one mapping, you just have a straight line as a mapping from time to position-on-path; when you want an ease-in and ease-out, that line has a slope of zero at the first and last position.
Hmm, it allready springs in my head that it could be interesting in a possibility of shooting a exposure, downloading it, finding minimum and maximum brightnesses in that pic , and exposing the next frame accordingly. That would make the "tightest" bracket possible, meaning the least amount of pictures for a well-exposed HDR-pano. Will think about that... One would have to be able to get the min/max from RAW photos as well as from JPEGs, which might be a bit more tricky, but should be doable, _iff_ one understands dcraw...
import subprocess
from PIL import Image
FILENAME = "thumbnail.jpg"
ANALYSIS_LOW_PERCENT = 10.
ANALYSIS_LOW_LEVEL = 10
ANALYSIS_HIGH_PERCENT = 2.
ANALYSIS_HIGH_LEVEL = 245
def capture():
# Shoot
cmd = ["gphoto2", "--capture-image", "--quiet"]
#p = subprocess.Popen(cmd, shell=True, bufsize=bufsize, stdin=PIPE, stdout=PIPE)
retCode = subprocess.call(cmd)
assert not retCode
print "%s=%d" % (cmd, retCode)
# List files
cmd = ["gphoto2", "--list-files"]
p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
p.wait()
for line in p.stdout:
pass # We only need the last line
num = line.split()[0][1:]
print "num=%s" % num
# Get thumbnail
cmd = ["gphoto2", "--get-thumbnail", num, "--filename", FILENAME, "--quiet"]
retCode = subprocess.call(cmd)
#assert not retCode
print "%s=%d" % (cmd, retCode)
def analysis():
# Open image and compute histogram
im = Image.open(FILENAME)
hist = im.histogram()
histogram = {'red': hist[0:256],
'green': hist[256:512],
'blue': hist[512:768]}
totalPixels = im.size[0] * im.size[1]
print "Photo size: %dx%d (%d)" % (im.size[0], im.size[1], totalPixels)
# Init
resultFlags = {'under': False, 'over': False}
# Count the number of pixels out of low exposure
lowCount = {'red': 0, 'green': 0, 'blue': 0}
print "Under-exposed pixels (level < %d):" % ANALYSIS_LOW_LEVEL
for channel in ('red', 'green', 'blue'):
for level in xrange(ANALYSIS_LOW_LEVEL):
lowCount[channel] += histogram[channel][level]
print " %s: %d (%.1f%%)" % (channel, lowCount[channel], lowCount[channel] * 100. / totalPixels)
if lowCount[channel] * 100. / totalPixels > ANALYSIS_LOW_PERCENT:
resultFlags['under'] = True
# Count the number of pixels out of high exposure
highCount = {'red': 0, 'green': 0, 'blue': 0}
print "Over-exposed pixels (level > %d):" % ANALYSIS_HIGH_LEVEL
for channel in ('red', 'green', 'blue'):
for level in xrange(ANALYSIS_HIGH_LEVEL, 256):
highCount[channel] += histogram[channel][level]
print " %s: %d (%.1f%%)" % (channel, highCount[channel], highCount[channel] * 100. / totalPixels)
if highCount[channel] * 100. / totalPixels > ANALYSIS_HIGH_PERCENT:
resultFlags['over'] = True
return resultFlags
capture()
result = analysis()
fma38 wrote:About analysing the RAW, I don't think it is mandatory: you don't need a very important accuracy. Don't forget that the way how over-exposed pixels are spread arround the image also very important: small white dots (little reflects) are not a problem: a large area is. But doing such analyse will take too much time, and is not possible.
GunnarK wrote:Partly, I agree :-)
Some of my aspects are HDR imaging, so for doing this accurately, you need a "sun" which is not clipped. Unfortunately, the sun is only about half a degree when seen from earth. So, depending on the lens, it may occupy only a few pixels, but for computer graphics rendering, these few pixels are very important to get in their full dynamic range, because thats where most of the light in the scene is comming from.
For less "measurement type" aspects, which most of the use is, i think, this is absolutely ok. But for the use mentioned above, i will do a few tests if one can safely make the assumption to work on the preview pics only. I would love to do that, because it's much quicker, of course...
BTW, i just started to play a bit with your code, it's really elegant and simple... I need to "delve into Python" a bit more, but it's certainly worth the splash!
Would you mind if I would try to mould that into a plugin based on the tetheredPlugin, but with automatick setting of upper and lower bounds for the bracket ?
fma38 wrote:No problem, you can use this code: it is open-source. The only restriction is to publish your modifications (if you want to publish anything) under the same free license (you can switch to GPL if you want, CeCILL is fully compatible).
gphoto2 --get-config autofocusdrive --get-config manualfocusdrive --get-config time --get-config imgcomment --get-config imgcommentenable --get-config lcdofftime --get-config recordingmedia --get-config meterofftime --get-config csmmenu --get-config reversedial --get-config battery --get-config orientation --get-config acpower --get-config externalflash --get-config flashopen --get-config flashcharged --get-config fastfs --get-config capturetarget --get-config imgquality --get-config imgsize --get-config iso --get-config whitebalance --get-config colormodel --get-config autoiso --get-config autoisopadv --get-config longexpnr --get-config autofocusmode --get-config assistlight --get-config exposurecompensation --get-config nikonflashmode --get-config nikonflashcommandermode --get-config nikonflashcommanderpower --get-config af-area-illumination --get-config afbeep --get-config f-number --get-config focallength --get-config minfocallength --get-config maxfocallength --get-config apertureatminfocallength --get-config apertureatmaxfocallength --get-config focusmode --get-config exposurebiascompensation --get-config exptime --get-config expprogram --get-config capturemode --get-config focusmetermode --get-config exposuremetermode --get-config flashmode --get-config nikon-shutterspeed --get-config focusareawrap --get-config exposurelock --get-config aelaflmode --get-config filenrsequencing --get-config flashsign --get-config viewfindergrid --get-config imagereview --get-config imagerotationflag --get-config nocfcardrelease --get-config flashmodemanualpower --get-config autofocusarea --get-config flashexposurecompensation --get-config bracketing --get-config evstep --get-config bracketset --get-config bracketorder --get-config burstnumber --get-config autowhitebias --get-config tungstenwhitebias --get-config flourescentwhitebias --get-config daylightwhitebias --get-config flashwhitebias --get-config cloudywhitebias --get-config shadewhitebias --get-config whitebiaspresetno --get-config whitebiaspreset0 --get-config whitebiaspreset1 --get-config selftimerdelay --get-config centerweightsize --get-config flashshutterspeed --get-config remotetimeout --get-config optimizeimage --get-config sharpening --get-config tonecompensation --get-config saturation --get-config hueadjustment --get-config lowlight --get-config lightmeter --get-config aflocked --get-config aelocked --get-config fvlocked > all_get-config-setting.txt
gphoto2 -- setconfig evstep=0 --get-config time --get-config recordingmedia --get-config capturetarget --get-config imgquality --get-config imgsize --get-config iso --get-config whitebalance --get-config exposurebiascompensation --get-config exptime --get-config expprogram --get-config nikon-shutterspeed --get-config evstep > what_we_need_config_for_03EV.txt
gphoto2 -- setconfig evstep=1 --get-config time --get-config recordingmedia --get-config capturetarget --get-config imgquality --get-config imgsize --get-config iso --get-config whitebalance --get-config exposurebiascompensation --get-config exptime --get-config expprogram --get-config nikon-shutterspeed --get-config evstep > what_we_need_config_for_05EV.txt
Users browsing this forum: No registered users and 1 guest