ESP32 Camera (ESP32 Cam) Library

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
choies
Posts: 8
Joined: Sat Jan 30, 2016 11:06 am

ESP32 Camera (ESP32 Cam) Library

Post by choies » Fri Jun 21, 2019 2:14 pm

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?

hendra
Posts: 2
Joined: Wed Dec 07, 2016 7:14 am

Re: ESP32 Camera (ESP32 Cam) Library

Post by hendra » Fri Jun 21, 2019 7:01 pm

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

choies
Posts: 8
Joined: Sat Jan 30, 2016 11:06 am

Re: ESP32 Camera (ESP32 Cam) Library

Post by choies » Sat Jun 22, 2019 7:06 am

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?

rpr
Posts: 79
Joined: Sat Oct 27, 2018 5:17 pm

Re: ESP32 Camera (ESP32 Cam) Library

Post by rpr » Fri Sep 06, 2019 3:34 am

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.

stumin
Posts: 1
Joined: Tue Oct 29, 2019 10:49 am

Re: ESP32 Camera (ESP32 Cam) Library

Post by stumin » Tue Oct 29, 2019 10:54 am


rpr
Posts: 79
Joined: Sat Oct 27, 2018 5:17 pm

Re: ESP32 Camera (ESP32 Cam) Library

Post by rpr » Wed Oct 30, 2019 11:12 pm

Thanks very much. I will check this out.

User avatar
Kip
Posts: 31
Joined: Sat Dec 26, 2015 7:23 am

Re: ESP32 Camera (ESP32 Cam) Library

Post by Kip » Tue Nov 05, 2019 10:07 pm

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

straga
Posts: 10
Joined: Mon Apr 17, 2017 7:38 am

Re: ESP32 Camera (ESP32 Cam) Library

Post by straga » Sat Mar 21, 2020 12:56 pm

Some info if esp_idf v4 and latest esp32-camera.

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

ricogte
Posts: 8
Joined: Sat Mar 28, 2020 9:48 am

Re: ESP32 Camera (ESP32 Cam) Library

Post by ricogte » Sat Mar 28, 2020 10:01 am

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.

ricogte
Posts: 8
Joined: Sat Mar 28, 2020 9:48 am

Re: ESP32 Camera (ESP32 Cam) Library

Post by ricogte » Sun Apr 05, 2020 5:48 am

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

Post Reply