QVGA image (GRAYSCALE and RGB565) have very low quality (even if compressed to JPEG q=100 or saved as RAW): look like it’s 2x upscaled QQVGA.
I have to use VGA and call frame.mean_pool(2, 2); to get acceptable quality, but frame rate drops.
Camera is H7 and runs firmware 4.1.0. Is there any way to improve this?
On QVGA image I almost see 2x2 blocks of pixels, when QVGA is downsamples by a factor of 2 it looks almost identically as QQVGA.
What camera is this? The MT9M114 or OV7725? Below VGA we turn on hardware binning.
The OV7725 doesn’t look good in general, nor the MT9M114. But, which camera are you using? With the MT9M114 there are a few different modes for binning.
I’m using OV7725 sensor with H7. Is there are any registers I could write to improve this?
Not really, it’s not designed to be a high quality camera. The image quality you are getting is the best we were able to get after tuning.
But, quality is subjective… is there some criteria you need?
Yeah that image actually looks very good to me because the edges are sharp.
I’m just exploring how everything works, there are no any criterias except visual one. I used a BAYER format and saved “RAW” image to sdcard on OpenMV Cam. It seems like bayer image already comes in low quality from the sensor at 320x240.
I read the datasheet on OV7725 and seems like there is no way to improve quality by changing any of available registers.
I applied two debayer algorithms: simple bilinear interpolation and one described in this paper: https://www.microsoft.com/en-us/research/publication/high-quality-linear-interpolation-for-demosaicing-of-bayer-patterned-color-images/, which yelds a more sharper image.
I wonder which algorithm used by OpenMV firmware to debayer?
Here are results i got (left-top: bilinear, right-top: alg. from the paper, bottom-left: “raw” bayer)
We just do simple bilinear interpolation. It’s the standard algorithm. We do not handle edge transitions to improve speed.
The algorithm you linked to above is much more computational complex than what we do. That’s MHT debayering. If we were to do that the frame rate would drop by a huge amount. Talking about our software debayering code. The camera typically outputs and image that’s already debayered when you put it in RGB565 mode.