Hey friends lets checkout a small, simple and cute python program for taking photos with with your webcam without the help of any third party application programs.
import os
import datetime
import opencv.adaptors
from opencv import highgui
import Image
def get_image(camera):
im = highgui.cvQueryFrame(camera)
# Add the line below if you need it (Ubuntu 8.04+)
im = opencv.cvGetMat(im)
#convert Ipl image to PIL image
dir(im)
print "image taken"
return opencv.adaptors.Ipl2PIL(im)
#_______________find usernae___________
a=os.popen('whoami')
l=a.read()
s=l.split('\n')
uname=s[0]
#______________find date n time _________
now = datetime.datetime.now()
now = str(now)
im=None
camera= highgui.cvCreateCameraCapture(0)
im = get_image(camera)
os.chdir('/home/%s/Pictures' %(uname) )
fname='image_'+now+'.png'
im.save(fname, "PNG")
#### code ends here
for more details check crack bytezz