cv2 It cannot run on Android.
Software Versions
- Python: python3
- OS:Android
- Kivy: /
- Kivy installation method:
Describe the bug A clear and concise description of what the bug is.
The issue tracker is a tool to address bugs only (search known bugs: https://git.io/vM1iE). Please use the #support Discord channel at https://chat.kivy.org/ or Stack Overflow for support questions, more information at https://git.io/vM1yQ.
Expected behavior
A clear and concise description of what you expected to happen.
[WARNING] stderr: Traceback (most recent call last):
[WARNING] stderr: File "/root/kivy_installer/.buildozer/android/app/main.py", line 5, in
Code and Logs and screenshots
// REPLACE ME: Paste your code and logs here, a template can be found at https://git.io/vM1id.
from kivy.app import App
from kivy.uix.image import Image
from kivy.clock import Clock
from kivy.graphics.texture import Texture
import cv2
class Re_App(App):
def __init__(self):
super(Re_App, self).__init__()
self.apt = cv2.VideoCapture(0)
self.body = Image()
def build(self):
return self.body
def on_start(self):
Clock.schedule_interval(self.update, 1/30)
def update(self, dt):
is_code, image = self.apt.read()
width, height = image.shape[1], image.shape[0]
texture1 = Texture.create(size=(width, height))
texture1.blit_buffer(image.tobytes(), colorfmt='bgr')
self.body.texture = texture1
Re_App().run()
Additional context Add any other context about the problem here.