Page 1 of 2

ESP32 Camera (ESP32 Cam) Library

Posted: Fri Jun 21, 2019 2:14 pm
by choies
I have an ESP32 camera(OV2640) board.

https://www.aliexpress.com/item/3299266 ... 4c4d7c0Bk3

Is there any MicroPython library for ESP32 camera board for using " import camera"?

Code: Select all

 import camera
if not, is there any plan to make MicroPython library for the camera?

Re: ESP32 Camera (ESP32 Cam) Library

Posted: Fri Jun 21, 2019 7:01 pm
by hendra
Try this:

https://github.com/tsaarni/esp32-micropython-webcam

I've manage to get it work after a few tweaks and you have to use a custom firmware from here:
https://github.com/Lennyz1988/micropyth ... ses/tag/v1

Re: ESP32 Camera (ESP32 Cam) Library

Posted: Sat Jun 22, 2019 7:06 am
by choies
Thank you for your valuable answer.

Now I can see an image from a web browser.

I have more questions about this.

1. How can I set the image size (ex: .frame_size = FRAMESIZE_UXGA,//QQVGA-QXGA Do not use sizes above QVGA when not JPEG)?
2. Is it possible to send a streaming image to see it by the web browser?

Re: ESP32 Camera (ESP32 Cam) Library

Posted: Fri Sep 06, 2019 3:34 am
by rpr
I just got a esp32 camera board and this firmware works well. I wonder if the esp-idf exposes more functionality. Many thanks for developing and linking to this.

Re: ESP32 Camera (ESP32 Cam) Library

Posted: Tue Oct 29, 2019 10:54 am
by stumin

Re: ESP32 Camera (ESP32 Cam) Library

Posted: Wed Oct 30, 2019 11:12 pm
by rpr
Thanks very much. I will check this out.

Re: ESP32 Camera (ESP32 Cam) Library

Posted: Tue Nov 05, 2019 10:07 pm
by Kip
Thanks for the firmware and examples.

I noticed that in the webcam example https://github.com/tsaarni/esp32-microp ... /webcam.py that camera has a capture method that stores the camera sensor data into a buf. Would anyone know of any way to convert this data to an image file (say jpg)? then save it to flash or the sd card?

Code: Select all

import camera
camera.init()
buf = camera.capture()
camera.deinit()
EDIT: I got it working! Now I have a small digital camera (just need some batteries). I got it to save images as .jpg on an sd card. The sd card writing is a bit hit and miss though...

Re: ESP32 Camera (ESP32 Cam) Library

Posted: Sat Mar 21, 2020 12:56 pm
by straga
Some info if esp_idf v4 and latest esp32-camera.

https://github.com/straga/micropython_c ... 20c3bd865f

Re: ESP32 Camera (ESP32 Cam) Library

Posted: Sat Mar 28, 2020 10:01 am
by ricogte
Good morning all,
I am desperately trying to use the ESP32-cam card by programming it in Python under windows. But I can't do it yet.
I manage to make my card work using lines of code developed for arduino. I can flash my ESP32-cam card with uPyCraft, then communicate with it via the uPyCraft prompt.
But I can't go any further. I can upload programs from my PC to my card with uPycraft, but how do I upload an entire library, including the one you specify in this section of the forum?
Then, do you have a first example to use this library?
Thank you in advance.

Re: ESP32 Camera (ESP32 Cam) Library

Posted: Sun Apr 05, 2020 5:48 am
by ricogte
I managed to get an image with the camera module.
A question however: "camera.capture()" gives an image in jpeg format. Is it possible to specify arguments in order to obtain an image in bmp format? My goal is to do image processing on it.
If not, is the only solution to modify the firmware with ESP-IDF?
Thank you
Have a good day