New ESP32-CAM module

Deouss
Posts: 425
Joined: Tue Mar 20, 2018 11:36 am

Re: New ESP32-CAM module

Postby Deouss » Tue Jan 08, 2019 12:39 pm

Finally I could capture SVGA JPEG format. There is a small limitation though - the jpeg quality cannot exceed 30%.
Unfortunately that camera cannot run with external clock of 20Mhz as it is by default. Tops 10Mhz.
Maybe it is related to powering the peripherals like ledc. Wonder if SPI or RMT would work too
It delivers heavy artifacted images. I haven't touched the m5stack board yet and also for camera esp-eye is perfect with all that psram )

chegewara
Posts: 2375
Joined: Wed Jun 14, 2017 9:00 pm

Re: New ESP32-CAM module

Postby chegewara » Tue Jan 08, 2019 1:26 pm

Hi,
i had no problem with this board to capture SVGA jpeg image with 20MHz XCLK, also jpeg quality is no issue. Only problem is that you need very good and stable power source or you get artifacts instead of image.

CalinB wrote: Yes. Even SVGA 800x600 if i lower the quality. (the higher number indicate the lower quality)
JPEG quality parameter is in fact jpeg compression rate. Higher value is higher compression and lower image quality. Its bug in original code on github for this board.

Deouss
Posts: 425
Joined: Tue Mar 20, 2018 11:36 am

Re: New ESP32-CAM module

Postby Deouss » Tue Jan 08, 2019 2:40 pm

JPEG quality parameter is in fact jpeg compression rate. Higher value is higher compression and lower image quality. Its bug in original code on github for this board.

So what code is bug fixed one? Can you post a github link?
I assume it is in camera.c

chegewara
Posts: 2375
Joined: Wed Jun 14, 2017 9:00 pm

Re: New ESP32-CAM module

Postby chegewara » Tue Jan 08, 2019 3:32 pm


Deouss
Posts: 425
Joined: Tue Mar 20, 2018 11:36 am

Re: New ESP32-CAM module

Postby Deouss » Wed Jan 09, 2019 12:30 am

Yes, it is working! That bug fix for jpeg quality completely corrected whole image at 20Mhz !
Now all works like a charm!
Thanks!

Deouss
Posts: 425
Joined: Tue Mar 20, 2018 11:36 am

Re: New ESP32-CAM module

Postby Deouss » Thu Jan 10, 2019 12:43 pm

Looking at this code (for ESP-EYE board)
https://github.com/espressif/esp32-came ... r/camera.c

They use another and different compression ratio calculation.

Playing with camera code I discovered that those ratios are responsible for artifacts and buffer size.
Too bad the esp-cam board cannot allocate more than 100K ram block for camera data. At least I am unable to allocate it having wifi enabled. This board should definitely have a psram or it will limit camera capture abilities.
So Esspressif guys - design another esp-cam board but with psram please)

I am tempted to flash the esp-eye board with simple cam demo just for test but I will break the original image I guess.

chegewara
Posts: 2375
Joined: Wed Jun 14, 2017 9:00 pm

Re: New ESP32-CAM module

Postby chegewara » Thu Jan 10, 2019 1:47 pm

This board from OP has psram (64Mbit) also esp-eye is with psram.

Deouss
Posts: 425
Joined: Tue Mar 20, 2018 11:36 am

Re: New ESP32-CAM module

Postby Deouss » Thu Jan 10, 2019 3:01 pm

chegewara wrote:
Thu Jan 10, 2019 1:47 pm
This board from OP has psram (64Mbit) also esp-eye is with psram.
Somehow I bought one of the first prototype boards without psram...
Now looks like they are selling upgraded ones - with 4mb psram but either way espressif warns that writing to psram is not particularly fast - whatever that means. They also mention the I2S can run in two modes - 1 frame buffer and 2 frame buffers.
I have to try the second one - it allows double frame rate - interesting - 60fps?

Deouss
Posts: 425
Joined: Tue Mar 20, 2018 11:36 am

Re: New ESP32-CAM module

Postby Deouss » Fri Jan 11, 2019 12:43 pm

It turned out the module as on the picture already has psram) The psram was disabled in the menuconfig by default.
So it looks like all those esp32-cam boards come with 4mb psram :)
Regarding pixelformats and resolutions - I had problems with receiving rgb and grayscale format from dma.
Camera module was throwing dma errors for some reason.
Anyways I created TCP client on Windows that listens to esp-cam module when camera is active and all seems to work pretty smooth at 24fps/SVGA 800x600 (JPEG)
I wonder if the camera can be clocked by RMT which can go up to 80Mhz vs current LEDC (40Mhz max)

Ashish
Posts: 1
Joined: Tue May 07, 2019 7:07 am

Re: New ESP32-CAM module

Postby Ashish » Tue May 07, 2019 7:11 am

chegewara wrote:
Thu Jan 03, 2019 11:40 pm
I dont know how to convert raw jpeg from camera to jpg file, but what i did was to send base64 raw jpeg to aws and store in jpg file on S3. Then file looks like normal jpg image.


Hi Chegewara, Please can you give this code for putting it into the S3 Bucket.My Mail id is : ashishbharadwaj100@gmail.com

Who is online

Users browsing this forum: No registered users and 61 guests