Page 1 of 1

esp-camera returning half pictures when high quality or higher resolution than SVGA

Posted: Fri Aug 09, 2019 12:20 am
by pushtoopen
Hi all, i've been using the ai thinker esp32-cam and the esp-eye. When requesting images using the standard esp eye, i get what looks like the system gives up and only serves up a portion of the image. The less quality i use and lower resolution, the higher likelyhood i'll recieve the entire image, but if i go above SVGA in resolution, then i get cut off versions of the picture.

here's an example of the same image taken twice.
VGA image: https://imgur.com/a/rNQMW2s
UVGA image: https://imgur.com/a/JfdopRs

I'll notice that the lighter and more detailed an image, the higher likelihood of this cutoff effect.
I only need to use this for single image capture and doing image differencing of two images,not streaming. So I'm much more interested in high resolution images to do this differencing with.


Can anyone help me understand whats happening?

Re: esp-camera returning half pictures when high quality or higher resolution than SVGA

Posted: Sat Sep 07, 2019 8:54 am
by Dzandaa
Hi
it seems that you have a buffer problem.

I use this board:
https://www.banggood.com/LILYGO-TTGO-T- ... rehouse=CN

Almost same spec of the ESP-EYE

I can capture 1600x1200 Pictures
And 1600x1200 video at 5F/S

Do you use the Espressif camera example Code for Arduino?

if yes, find that line of code:

void setup()
{
...
//init with high specs to pre-allocate larger buffers
if(psramFound())
{
config.frame_size = FRAMESIZE_XGA;
config.jpeg_quality = 10;
config.fb_count = 2;
}
else
{
config.frame_size = FRAMESIZE_SVGA;
config.jpeg_quality = 12;
config.fb_count = 1;
}

...

}

You can print psramFound() value, it must be 1 (true) or your buffer is too small for large pictures.

B->

Re: esp-camera returning half pictures when high quality or higher resolution than SVGA

Posted: Tue Sep 10, 2019 2:42 am
by pushtoopen
Thanks for the path forward. I figured thats what it might be but if youre finding success, then likely im not setting things up properly. I amd using the ESP-IDF codebase and not arduino, but i'll use your guidance and see if i cant find something similar in the codebase. If i find a fix i'll post it on here.

Re: esp-camera returning half pictures when high quality or higher resolution than SVGA

Posted: Wed Sep 11, 2019 2:31 am
by pushtoopen
This was exactly the issue, Thanks Dzannda!

For all those who want to use the basic ESP-WHO ESP-IDF library and control the camera quality output, go into your app_camera.c file and look for the "camera_config_t config;" declaration. This is the real settings for the camera output over i2C to the esp32. The settings in the web interface will post-process the picture to downscale it. Even when using the highest picture quality setting in the camera_config_t, setting the web interface to the highest resolution and setting it to the highest picture quality, the web interface still cut things off a little. Regardless, if you set the web interface quality lower, but set the firmware settings to the highest value, then you will get a nice clean high resolution setting.

Resolution: use "config" in app_camera.c to set true camera settings.

Re: esp-camera returning half pictures when high quality or higher resolution than SVGA

Posted: Sat Mar 27, 2021 6:46 pm
by RuxandraUngureanu
Hey! I use an ESP32-CAM with esp_camera.h library and I have exactly the same problem, I checked if the buffer is too small using the psramFound() function and it returns 1, so this would not be the problem. Any idea?

Re: esp-camera returning half pictures when high quality or higher resolution than SVGA

Posted: Sat Aug 14, 2021 8:22 pm
by rolly_g
I am experiencing the same issue and the psramFound() function does return 1. I have two units and they behave the same. I have tried different tweaks but I'm not getting anywhere. For bright images only the top of the image is captured. Any suggestions?