JPEG streaming over rpc sometimes blurry / look sub-sampled


First of all, thanks a lot for all the hard and soft development you did guys, it’s amazing how many things we can achieve with your cameras for such a cheap price!

My current problem concerns the OpenMV H7 cam (OV7725 sensor I guess)

I have downloaded your code to send jpeg streaming over rpc protocol, in such a way that I can receive the streaming in Python environnement and display images using pygame.

Problem is, for unknown reasons (I suspect it happen when the scene moves), sometimes the streaming gets blurry, then sharp, then blurry again, blinking blurry / sharp and sometimes it stabilizes itself. From what I read on the forum, it may due to some horse power of the STM32 which is not fast enough in certain conditions to keep image quality when objects move, thus downsampling the resolution in the streaming. Is it true?

Whatever the reason, I need to keep image quality constant, even if i have to : - lowering the exposure time
-lowering the jped compression factor

  • limiting the frame rate ? (even if sensor.set_framerate does not seem to work…)

Any suggestions to solve that problem?
Thanks a lot in advance,

We have a dynamic jpeg quality compression algorithm. It tries to increase the quality as much as it can until there’s an overflow, and then it lowers the quality.

You can force the quality of the image by adding a img.compress(quality=90) at the end of your loop to force the jpeg quality.


Jpeg compression quality factor is already set at 90 in the callback process, every time. (I’m not on my code currently but the command is something like sensor.snapshot().compress(quality=90).bytearray(). )

Not sure, but it appears that my problem occurs on Raspberry Pi 4 but not when camera is plugged to a laptop. Could it come from the RPI USB bus?


If the quality is fixed at 90 then it will stay at that level. Not sure what could be wrong then.