Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no accelerated colorspace conversion found from yuv420p to rgb24. #211

Open
anishgoel1 opened this issue Nov 30, 2023 · 2 comments
Open

Comments

@anishgoel1
Copy link

anishgoel1 commented Nov 30, 2023

I'm currently running a very simple test case for image capture, but the resulting image is always black with the message that "no accelerated colorspace conversion found from yuv420p to rgb24." and "no frame". I thought this initially was because of my cv2 build, but after trying multiple times over again, I can't get it to fully work. I'm using the most recent versions of cv2 and DJITelloPy. Here is a sample test case that is producing this:

from djitellopy import tello
import cv2

drone = tello.Tello()
drone.connect()

drone.streamon()
img = drone.get_frame_read().frame
img = cv2.resize(img, (340, 260))
cv2.imwrite("picture.png", img)
drone.streamoff()

upon running this, picture.png is entirely black and the messages no accelerated colorspace conversion found from yuv420p to rgb24 and no frame appear._ I'm running this on a Mac M2 air.
Screenshot 2023-11-30 at 1 29 21 AM

@raulperezalejo
Copy link

raulperezalejo commented May 22, 2024

I can confirm the same result with the same code in a Apple M1 Pro, should be relates with not having graphic acceleration?

@cynthia2006
Copy link

cynthia2006 commented May 27, 2024

This is not an issue of OpenCV, but of FFmpeg, more specifically of libswrescale. This is because aside from x86, hardware accelarate conversion of YUV 4:2:0 to RGB colorspace is not implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants