Jump to content

Recommended Posts

Posted

Hi guys

I have been roped into taking photos for the school leavers party disco thing. But as with most things there's a catch what they want is a sectioned off "photobooth" area, with the photos i am taking to be displayed in a slideshow as they are being taken. I was just wondering if anyone had any ideas how i would go about doing this without stopping every so often to transfer files to the laptop. I will have a laptop with me connected up so maybe there's a bit of software that allows me to connect my camera via usb?

 

Any help would be appreciated

Posted
I will have a laptop with me connected up so maybe there's a bit of software that allows me to connect my camera via usb?

 

I did this at Christmas to make print-on-demand Christmas cards. I wrote my own Python script to get the pictures from the camera then put them in a "Christmas card" template for printing. It was a bit slow (Python's Image Library and ReportLab probably aren't the fastest ways of processing 12 megapixel images), but it seemed to work okay. You could modify the script to simply get pictures from the camera and dump them in a folder somewhere on the computer, then have a web page dynamically load those images for a slide show. Here's a quick copy-and-paste of the Python script I wrote:

 

import os
import time
import win32com.client

MY_CAMERA="D5100"
WIA_IMG_FORMAT_PNG = "{B96B3CAF-0728-11D3-9D7B-0000F81EF32E}"
WIA_COMMAND_TAKE_PICTURE="{AF933CAC-ACAD-11D2-A093-00C04F72DC3C}"

# Save an image accquired via WIA to a file.
def saveImage(image):
foldername = "Z:\Camera\pics"
filenames = sorted(os.listdir(foldername))
if filenames == []:
	filenumber = 1
else:
	filename = filenames.pop()
	while filename.lower() == "thumbs.db":
		if filenames == []:
			filename = "DSC_0000"
		else:
			filename = filenames.pop()
	filenumber = int(filename[4:8]) + 1
filename = "DSC_"
for pl in range(1,4):
	if filenumber < pow(10,pl):
		filename = filename + "0"
filename = filename + str(filenumber) + ".JPG"
image.SaveFile(foldername + os.sep + filename)
return(foldername + os.sep + filename)

# Checks the camera attached via the WIA protocol (Windows's implemenattion of PTP) and grabs
# any new photos as they appear.
def acquireImage():
# Find the camera
devman=win32com.client.Dispatch("WIA.DeviceManager")
for info in devman.DeviceInfos:
	for prop in info.Properties:
		if prop.Name=="Name" and prop.Value==MY_CAMERA:
			dev = info.Connect()
			
previousCount = dev.Items.count
while True == True:
	currentCount = dev.Items.count
	for pl in range(previousCount, currentCount):
		print "New image - number: " + str(pl)
		imagePath = saveImage(dev.Items[pl].Transfer(WIA_IMG_FORMAT_PNG))
		print "Done: " + imagePath
		
	previousCount = currentCount
	time.sleep(1)
	
acquireImage()

 

I've trimmed out the parts that require PIL and ReportLab, the above should just do a basic image grab from the camera - check yourself before actually running it. I ran this under ActiveState Python on Windows 7 - I think the win32com.client comes as part of the ActiveState package, but I'm not sure.

Posted

Thanks for that it was really helpful, That was what i was thinking to be honest have something pull the files from the camera. I have quite a while to experiment and get something dialed in.

 

Many thanks

Posted
Another idea that may be simpler but enough for your needs: Welcome to Eye-Fi | Eye-Fi

 

Eye-Fi cards are excellent - I have the DSLR here set up with one, so teachers can just take pictures and have them appear a short while later on the network. They can be a little variable in operation, though - they are quite small, and contained in a camera, so the wireless signal can be a bit variable at times. A situation where there's a lot of people milling around might not be the best environment for them.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...