kivy.uix.camera.Camera play attribute - only single frame

403 views
Skip to first unread message

Alan Christopher Thomas

unread,
Oct 28, 2011, 10:05:02 AM10/28/11
to Kivy users support
I'm instantiating a Camera widget with play=True:

cam = Camera(play=True)
self.root.add_widget(cam)

The texture is rendered onto the widget. However, Kivy only grabs a
single frame from the camera stream and renders it as an image, then
doesn't continue playing/updating the texture.

Setting play=False results in no texture being rendered until play is
set to True. Once play has been set to True, no matter how many times
I set it back to False and then True again, the widget texture is
never updated with another frame. It only uses the first frame as a
still image.

Is this the normal behavior for play, or should I be getting a
continuously updating video stream on the widget?

Kivy 1.0.8, Mac OSX 10.6, python 2.6.


[INFO ] Kivy v1.0.8
[INFO ] [Logger ] Record log in /Users/athomas/.kivy/logs/
kivy_11-10-28_8.txt
[INFO ] [Factory ] 99 symbols loaded
[DEBUG ] [Cache ] register <kv.lang> with limit=None,
timeout=Nones
[DEBUG ] [Cache ] register <kv.image> with limit=None,
timeout=60s
[DEBUG ] [Cache ] register <kv.texture> with limit=1000,
timeout=60s
[DEBUG ] [Cache ] register <kv.shader> with limit=1000,
timeout=60s
[DEBUG ] [Cache ] register <kivy.loader> with limit=500,
timeout=60s
[INFO ] [Loader ] using <pygame> as thread loader
[INFO ] [Camera ] using <opencv> as camera provider
[DEBUG ] [App ] kv <webcam.kv> not found
[INFO ] [Window ] using <pygame> as window provider
[INFO ] [GL ] OpenGL version <2.1 ATI-1.6.38>
[INFO ] [GL ] OpenGL vendor <ATI Technologies Inc.>
[INFO ] [GL ] OpenGL renderer <ATI Radeon HD 6750M OpenGL
Engine>
[INFO ] [GL ] Shading version <1.20>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <16>
[INFO ] [Shader ] fragment compiled successfully
[INFO ] [Shader ] vertex compiled successfully
[DEBUG ] [ImagePygame ] Load </Applications/Kivy.app/Contents/
Resources/kivy/kivy/data/glsl/default.png>
[INFO ] [Window ] virtual keyboard not allowed, single mode,
not docked
[INFO ] [OSC ] using <multiprocessing> for socket
[DEBUG ] [Base ] Create provider from tuio,0.0.0.0:3333
[DEBUG ] [Base ] Create provider from mouse
[DEBUG ] [Base ] Create provider from mactouch
[INFO ] [Base ] Start application main loop
[DEBUG ] [OSC ] Start thread <0.0.0.0:3333>
[INFO ] [OSC ] listening for Tuio on 0.0.0.0:3333
*** Recognized (0x62) family*** (20 cols X 12 rows) using
raw16bitRange= 452, thresh8bits= 3, zsignal_per_pixelsum= 47
[INFO ] [GL ] NPOT texture support is available
[INFO ] [GL ] BGRA texture support is available

Chris Allick

unread,
Oct 28, 2011, 10:13:56 AM10/28/11
to kivy-...@googlegroups.com
I fell asleep before I could figure this out, but had the same question.  I'd like to do camera vision projects in Kivy, but cannot figure out how to get a stream going.  Also, has anyone figured out how to use the PS3Eye camera on OS X with Kivy?  It works in Processing/openFrameworks.

Alan Christopher Thomas

unread,
Nov 10, 2011, 3:26:04 PM11/10/11
to Kivy users support
Still wondering if anyone else has experienced this or has any clue as
to why the Camera widget isn't getting a continuously updating stream.
I'm stuck. Any thoughts?

Mathieu Virbel

unread,
Nov 14, 2011, 5:58:46 AM11/14/11
to kivy-...@googlegroups.com
Look like a bug, but you must report it on github guys :) http://kivy.org/docs/contribute.html#reporting-an-issue

Alan Christopher Thomas

unread,
Nov 14, 2011, 9:47:44 AM11/14/11
to Kivy users support
Ah, sorry about that. Thanks for opening the issue!

On Nov 14, 4:58 am, Mathieu Virbel <txp...@gmail.com> wrote:
> Look like a bug, but you must report it on github guys :)http://kivy.org/docs/contribute.html#reporting-an-issue
Reply all
Reply to author
Forward
0 new messages