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

pushtoopen
Posts: 16
Joined: Sun Feb 25, 2018 4:11 pm

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

Postby pushtoopen » Fri Aug 09, 2019 12:20 am

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?

Dzandaa
Posts: 4
Joined: Tue May 28, 2019 11:00 am

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

Postby Dzandaa » Sat Sep 07, 2019 8:54 am

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->

pushtoopen
Posts: 16
Joined: Sun Feb 25, 2018 4:11 pm

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

Postby pushtoopen » Tue Sep 10, 2019 2:42 am

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.

pushtoopen
Posts: 16
Joined: Sun Feb 25, 2018 4:11 pm

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

Postby pushtoopen » Wed Sep 11, 2019 2:31 am

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.

RuxandraUngureanu
Posts: 1
Joined: Sat Mar 27, 2021 6:07 pm

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

Postby RuxandraUngureanu » Sat Mar 27, 2021 6:46 pm

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?

rolly_g
Posts: 1
Joined: Sat Aug 14, 2021 8:11 pm

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

Postby rolly_g » Sat Aug 14, 2021 8:22 pm

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?

Who is online

Users browsing this forum: No registered users and 18 guests