Hello python brothers
Can any one give me a code that can use the camera and click a piture automatically after every 5 mins and save it to a predefined folder in a the memory card.
Thanks in advance
Hello python brothers
Can any one give me a code that can use the camera and click a piture automatically after every 5 mins and save it to a predefined folder in a the memory card.
Thanks in advance
Hi fellow!
From a webbrowser I would write that:
I didn't test it but it should be quite close to what you need.Code:def capture(): img = camera.take_photo() img.save( your_path ) timer = e32.Ao_timer() # loop forever while True: timer.after( 300, capture )
LFD
Devices:
Nokia E61 3rd Edition - pys60 1.4.0
Tips and modules:
http://www.lfdm.net/thesis
thanks
It works fine to click one picture...But it doesnt take continous pics..
Thats what i want..Is there anything that has to be done before the camera can take 2nd pic?
Do you mean that you want to save many pictures with different filenames?
If so, you could use:
Code:from time import ctime your_path="E:\\image " def capture(): img = camera.take_photo() img.save( your_path + ctime + ".png") #this saves the picture in png format with a date in the filename :)
Nokia E66
PyS60 1.4.4 final
No i didnt want that.
I want to take repetative pictures from the camera and dont care for the file names.But in the code lfd gave the camera can take only one pic..I want to take pics every 5 mins...
LFD please suggest a solution..
As I said it was not testedCode:import e32, camera your_path = "D:\\tmp.png" def capture(): img = camera.take_photo() img.save( your_path ) i = 0 # loop forever while True: print "Wait" e32.ao_sleep(3) capture() print "Picture %d saved\n" %(i) i+=1 print "Finished"
This solution works on my emulator.
Cheers,
LFD
Devices:
Nokia E61 3rd Edition - pys60 1.4.0
Tips and modules:
http://www.lfdm.net/thesis