I sporadically get a fatal error with our H7 camera when I create a difference image based on a previously saved file (“bg.bmp”). This error only occurs when the camera is connected via an external power supply. If the IDE is connected to the camera via USB, the error does not occur. The error happens in line 4.
sensor.snapshot().save("bg.bmp") img = sensor.snapshot() sensor.snapshot().save("bg2.bmp") img.difference("bg.bmp") img.save("diff.bmp")