Capture video

75 views
Skip to first unread message

g.ter...@student.utwente.nl

unread,
Nov 14, 2014, 8:05:17 AM11/14/14
to pydc...@googlegroups.com
Hi all,

I'm trying to capture data from a Firewire camera for research. I tried using cam.current_image, but it is far to slow to be usable (1 capture per second max).
Is there a faster way to capture data? My code¹ limits capture to 30 fps at the moment.

Or do I have to specify the usable bandwith somewhere? Is there a comprehensive documentation available for this library?

When I start coriander to view the camera image, it works smoothly.

Regards,

Gijsbert

1) Code is attached
test1.py

g.ter...@student.utwente.nl

unread,
Nov 17, 2014, 12:16:18 PM11/17/14
to pydc...@googlegroups.com
I found how to do it:

I used pydoc to view the documentation of the Camera module and found that the correct method for non-interactive capture is cam.shot(), which has no trouble capturing at 30 fps.
Now I capture using: data.append(cam.shot()) Afterwards I iterate over data and write the shots to files in a capture folder.
Since I will be doing only short captures for my research, lack of memory to store data is not an issue. Furthermore, since each capture spawns its own process, I can start a new capture before the previous one has finished writing to disk.

Tamas H.

unread,
Nov 26, 2014, 8:19:44 AM11/26/14
to pydc...@googlegroups.com
I have not worked for a while with the lib, but here is my 2 cents:
since the capture is dispatched to a subprocess, you can modify the acquire function to stream to the harddisk. Then your view function calls the shot(), but the data are anyway saved with full speed.

T.

--
You received this message because you are subscribed to the Google Groups "pydc1394" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pydc1394+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages