Hello
Once again we (my project partners and I) come to you desperate for help
Environment:
MicroPython: v1.13-r60 OpenMV: v3.9.1 HAL: v1.9.0 BOARD: OPENMV4P-STM32H743
Our scenario is that we are running a video stream (ovcer WiFi shield) off of the H7 Plus, using the example code pretty much. However, we need to do several other things in the same loop due to multithreading not being possible. Those things are checking for MQTT messages, sending UART signals and checking a GPIO pin. If we do everything but the camera stream, everything is fine, however once the camera stream is added, the whole thing crashes with memory allocation errors:
We tried some stuff with periodic garbage collector calls ( gc.collect() ), not sure if that is even the issue though. Also tried micropython-lib alternatives for the mqtt side of things, but couldn’t get past various syntax errors.
Furthermore, our performance seems to be a bit low overall, even when just using the basic camera stream script (mjpeg streamer) with these settings:
sensor.set_contrast(50)
sensor.set_brightness(50)
sensor.set_saturation(50)
sensor.set_gainceiling(16)
sensor.set_framesize(sensor.VGA)
sensor.set_pixformat(sensor.GRAYSCALE)
cframe = frame.compressed(quality=10)
Which doesn’t exactly provide HD images (see attachment) and still only averages 13-14 fps (as read out by the script):
We’re aware that the speed is reduced when the camera is connected to the IDE, but still that seems low for these settings. With extremely lowered settings (QQVGA), we haven’t been able to get more than 27fps, whilst running nothing else. Should this be the case, even over the IDE?
Also there any adivce on how we could get rid of our memory issues? This has us scratching our heads, for weeks now
Appreciate any help,
Regards,
Daniel