Getting camera image directly


How do you get get the camera image directly into a numpy array rather than having a window displaying it?


You can use offscreen window mode to avoid having a window show up.

You can attach a texture to the window using, and then you can use RTMCopyRam mode (which copies the result of the render to RAM every frame) or RTMTriggeredCopyRam (which will copy it every time after you call

Then, you can extract the RAM image of this texture using tex.getRamImage() or tex.getRamImageAs("RGBA") in order to obtain it as something you can then convert easily into a numpy array.

Let us know if you need specific help with any of the steps!