Unicorn
Unicorn

Reputation: 23

Pydroid3 opencv -215 assertion failed (permission issue)

I have 2 xiaomi smartphones: Xiaomi Redmi 3 (lineageOS, Android 11) and Xiaomi Mi9 lite (MIUI, Android 10). (The goal is to use Redmi 3 on my pet project). I tried to run the same piece of code on both devices, but its work only with Mi9 lite.

import cv2
cam = cv2.VideoCapture(0)
s, img = cam.read()
cv2.imwrite('qqq.jpg', img)

On redmi 3 I've got the error: enter image description here

looks like some premission issue, cause opencv cant get the image from camera. And idk how to solve that, i already got Pydroid permission plugin but that doesnt work.

Upvotes: 0

Views: 583

Answers (1)

Unicorn
Unicorn

Reputation: 23

Looks like pydroid can work properly only with Camera 2 API. enter image description here

But redmi 3 camera has not that technology:

enter image description here

Upvotes: 0

Related Questions