How to take 6 photos In a row just using Kivy?

Asked

Viewed 29 times

-2

I wanted an example of how to take 6 photos in a row using kivy.uix.camera. Note: Without having to consult the Kivy sample site, all the examples I saw had comments talking to read the Kivy document, but I haven’t found this feature yet for photo.

1 answer

1

And it’s not just calling 6 times the function?

camera = Camera(play=False)

camera.export_to_png('c:/fotos/1.png')
camera.export_to_png('c:/fotos/2.png')
camera.export_to_png('c:/fotos/3.png')
camera.export_to_png('c:/fotos/4.png')
camera.export_to_png('c:/fotos/5.png')
camera.export_to_png('c:/fotos/6.png')

Or with for:

for i in range(1, 6):
    camera.export_to_png('c:/fotos/' + str(i) + '.png')

And if you want to go from half to half a second it wouldn’t just be applying a simple Sleep?

import time

camera = Camera(play=False)

for i in range(1, 6):
    camera.export_to_png('c:/fotos/' + str(i) + '.png')
    time.sleep(0.5)

If you know how to use Python and you know time.sleep then you know that you can work with seconds or lower values, in the example was half a second with 0.5, if it is an interval of a second:

time.sleep(1)

I don’t think there’s complexity, I think maybe you’re waiting for the API to do something that should be part of your algorithm, it’s a constructive criticism, it’s no use wanting to be advanced if you skip the basics of the programming language and it seems to me that your lack of understanding is in the basics of Python and not in the use of Kivy

Browser other questions tagged

You are not signed in. Login or sign up in order to post.