numpy.ndarray to panda3d compatible texture


I use cv2 library to capture a 640x480 frame.
I would like to set this frame as a texture to one of my models but I don’t know how to
convert the frame (numpy.ndarray) to a panda3d compatible texture.

capture = cv2.VideoCapture(self.devNum)
frame =

some conversion code?


any help?


You should be able to pass an ndarray directly into setRamImage or setRamImageAs(…, “RGB”)