KIvy Camera not working

116 views
Skip to first unread message

Zafar Ahmed

unread,
Jul 25, 2023, 3:52:43 PM7/25/23
to Kivy users support
I am trying to use opencv, kivy to build an app which uses camera on my android phone. Which works fine on Ubuntu/windows, But when I open the app on Android phone, the camera is not working. it shows a black screen with a small square in the left corner of the screen. Anyone can help me please? If you have any recommendations or another way to access Android camera, please let me know. Thank you

Soul Reaver

unread,
Jul 25, 2023, 4:03:24 PM7/25/23
to kivy-...@googlegroups.com
Have you tried with Kivy Camera and see if it works?

On Tue, Jul 25, 2023, 3:52 PM Zafar Ahmed <zafar.a...@gmail.com> wrote:
I am trying to use opencv, kivy to build an app which uses camera on my android phone. Which works fine on Ubuntu/windows, But when I open the app on Android phone, the camera is not working. it shows a black screen with a small square in the left corner of the screen. Anyone can help me please? If you have any recommendations or another way to access Android camera, please let me know. Thank you

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/a54ac2ed-4d63-4064-ac3e-c39f2364a94dn%40googlegroups.com.

Robert

unread,
Jul 25, 2023, 4:56:47 PM7/25/23
to Kivy users support
The Kivy Camera does not work on modern Android devices.

Use https://github.com/Android-for-Python/Camera4Kivy

Soul Reaver

unread,
Jul 27, 2023, 11:59:11 PM7/27/23
to Kivy users support

I am using One plus 6t. when i tried to use camera4kivy, I am getting errors: previewcamerax object has no attribute '_fbo'  Nonetype object has not attribute ''setTexture

Soul Reaver

unread,
Jul 28, 2023, 12:09:21 AM7/28/23
to Kivy users support
What actually happened was when I use connectcamera function, i see the camera icon flickering as if it toggle between camera start and stop. I got the following errors when I calle selectcamera function :  previewcamerax object has no attribute '_fbo'  Nonetype object has not attribute ''setTexture

Robert

unread,
Jul 28, 2023, 1:07:56 AM7/28/23
to Kivy users support
Never seen this reported.
Is this with one of the examples, or your own code?

If it is your own code:
1) try the photo example
2) re-check the install instructions were followed https://github.com/Android-for-Python/Camera4Kivy#buildozerspec and that camerax_provider is copied to your app.

Soul Reaver

unread,
Jul 28, 2023, 8:01:05 AM7/28/23
to kivy-...@googlegroups.com
Yes it occurred with both example and my code. It worked fine on my ios device but not on one plus 6t. Is it compatible on old devices?

Robert

unread,
Jul 28, 2023, 12:24:36 PM7/28/23
to Kivy users support
I don't know of anything specific, in general the widget depends on Android's camerax api https://developer.android.com/training/camerax/devices

You might share the full log, perhaps there is a clue?

Soul Reaver

unread,
Jul 28, 2023, 1:46:16 PM7/28/23
to kivy-...@googlegroups.com
One plus 6t is not in the list. I will reun it again send the log

Reply all
Reply to author
Forward
0 new messages