Some weird visual artifacts in panda3d video textures...

setRamMipmapPointerFromInt is pretty low-level, and you shouldn’t use it unless you know what you’re doing. What’s probably happening is that the pointer to the image returned by __vision.next() is probably getting destructed internally, so that Panda reads back into memory that has already been freed, and therefore may not contain the correct data anymore as it may have been reused for storing other data, or perhaps it’s already partially containing data from another frame at that point.

Consider creating a PTAUchar holding the data and passing it to set_ram_image, or if the image is of a different format (like RGBA), using set_ram_image_as(data, “RGBA”). This ensures that the data is copied, and that you’re not reading the data directly from the pointer that OpenCV is managing.