numpy.ndarray to panda3d compatible texture

hi,

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 = self.capture.read()

some conversion code?

model.setTexture(image)

any help?

thanks

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