Git Product home page Git Product logo

eloquentesp32cam's Introduction

EloquentArduino library

This library contains source code and examples from the eloquentarduino blog, covering very different topics:

  • data structures
  • image / camera processing
  • print utilities
  • ...other miscellaneous

You can install this library either by cloning the repo or directly from the Arduino IDE Library Manager.

If you're interested in TinyML, I suggest you check out the EloquentTinyML library.

eloquentesp32cam's People

Contributors

eloquentarduino avatar reymalahay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eloquentesp32cam's Issues

collectionServer question on resolution

Great example on using the camera itself to conveniently get training data.

On your example, you mention that "In fact, you can well capture images at the resolution you prefer (up to the RAM limits, of course) and still have space to run FOMO model.".

When doing capture with a modified camera.resolution.face() to say .vga(), the capture interface only seems to be saving the a portion of the streamed image(s). Seems to crop on the top right corner to what I assume is the default resolution of .face()

I couldn't find methods to modify this, so I thought i'd ask you first.

ESP32-CAM AI Thinker

Hello, I have have an ESP32-CAM / AI Thinker - at least I thinker it is. The board is marked ESP32-S and executes examples of AI Thinker code correctly including camera server. I have installed library 2.7.6 in Arduino IDE 1.8.13. Attempting to compile "Take a picture" example I get the following compile error:
c:\users\steve\documents\arduino\libraries\eloquentesp32cam-2.7.6\src\eloquent_esp32cam\camera\camera.h:77:32: error: 'struct camera_config_t' has no member named 'pin_sccb_scl'
config.pin_sccb_scl = pinout.pins.sccb_scl;

Attempting to compile "Save picture to SD card" I get the following error:
no matching function for call to 'Eloquent::Extra::Esp32::Wifi::Sta::connect()'

I like the simplicity of the code - it is 90% of my desired application (all that remains is ftp to my website). Any thoughts would be appreciated.

Guru Meditation Error: Core 1 panic'ed (LoadProhibited) while running example code

I'm running release v1.1.2 on an m5stack timer cam board. Using example code 3_Get_Your_First_Picture.ino, the system frequently crashes and reboots with error messages like:

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1184
load:0x40078000,len:13260
load:0x40080400,len:3028
entry 0x400805e4
Init
Camera OK
Jpeg size: 10393
Jpeg size: 12543
Jpeg size: 12450
Jpeg size: 26691
Jpeg size: 12516
Jpeg size: 12417
Jpeg size: 12488
Jpeg size: 12429
Jpeg size: 12462
Jpeg size: 12527
Jpeg size: 12622
Jpeg size: 12454
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x4008b1a0  PS      : 0x00060830  A0      : 0x800d71d9  A1      : 0x3ffc70f0  
A2      : 0xffffffff  A3      : 0xffffffff  A4      : 0xffffffff  A5      : 0x00060823  
A6      : 0x00060823  A7      : 0x00000001  A8      : 0x00000001  A9      : 0x00000004  
A10     : 0x00060823  A11     : 0x0000e4cf  A12     : 0x0000000a  A13     : 0x00000000  
A14     : 0x007bf318  A15     : 0x003fffff  SAR     : 0x0000000a  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x0000003f  LBEG    : 0x40088311  LEND    : 0x40088321  LCOUNT  : 0xfffffffe  


Backtrace: 0x4008b19d:0x3ffc70f0 0x400d71d6:0x3ffc7130 0x400d7a59:0x3ffc7180 0x400d4a54:0x3ffc71b0 0x400d3a09:0x3ffc71d0 0x400d3e33:0x3ffc71f0 0x400d3ee4:0x3ffc7210 0x400d3f23:0x3ffc7260 0x400d3f3c:0x3ffc7280 0x400d2d49:0x3ffc72a0 0x400d4e0d:0x3ffc72e0

Any help would be much appreciated.

Camera does not initialize

hi there,

Is your feature request related to a problem? Please describe.
i can successfully compile and upload the example for object detection. but the camera does not initialize, therefore my camera cannot perform object detection. instead, i get this error in the logs:

2:47:04.640 -> __EDGE IMPULSE FOMO (NO-PSRAM)__
22:47:04.671 -> E (3508) camera: Camera probe failed with error 0x105(ESP_ERR_NOT_FOUND)
22:47:04.703 -> [  3511][E][exception.h:61] set(): [Camera] Cannot init camera
22:47:04.703 -> Cannot init camera
22:47:04.736 -> E (3551) camera: Camera probe failed with error 0x105(ESP_ERR_NOT_FOUND)
22:47:04.736 -> [  3554][E][exception.h:61] set(): [Camera] Cannot init camera
22:47:04.736 -> Cannot init camera
22:47:04.768 -> E (3594) camera: Camera probe failed with error 0x105(ESP_ERR_NOT_FOUND)
22:47:04.768 -> [  3597][E][exception.h:61] set(): [Camera] Cannot init camera
22:47:04.768 -> Cannot init camera
22:47:04.801 -> E (3637) camera: Camera probe failed with error 0x105(ESP_ERR_NOT_FOUND)
22:47:04.833 -> [  3640][E][exception.h:61] set(): [Camera] Cannot init camera
22:47:04.833 -> Cannot init camera

Describe the solution you'd like
the camera should initialize during setup().

Describe alternatives you've considered
n/a

Additional context
device: ESP32-WROVER
OS: Linux
IDE: Arduino Studio

please advise.

thanks in advance,
rey malahay

The Edge Impulse FOMO sketch is saying one of the default imports is not found. it is raising the no such file or directory error as shown below

C:\Users\Administrator\AppData\Local\Temp.arduinoIDE-unsaved20231020-12548-1a4dh9p.onmo\27_EdgeImpulse_FOMO\27_EdgeImpulse_FOMO.ino:13:10: fatal error: esp32cam/tinyml/edgeimpulse/FOMO.h: No such file or directory

      ^                                   

compilation terminated.
Multiple libraries were found for "esp32cam.h"
Used: C:\Users\Administrator\Documents\Arduino\libraries\esp32cam-main
Not used: C:\Users\Administrator\Documents\Arduino\libraries\EloquentEsp32cam
exit status 1

Compilation error: esp32cam/tinyml/edgeimpulse/FOMO.h: No such file or directory

Error DRAM overflow

Dear All,

I'm trying to use AITHinker esp32-cam but it looks like it's not working because of missing memory. Here is the error, do I have any chance to make it work?

/Users/xxx/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /private/var/folders/c8/12c3wry92k15j8yj7tgz7rh00000gn/T/arduino/sketches/6F41C98F27E8199FE5E7451F48149081/PersonDetectionExample.ino.elf section .dram0.bss' will not fit in region dram0_0_seg'
/Users/xxx/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: DRAM segment data does not fit.
/Users/xxx/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: DRAM segment data does not fit.
/Users/xxx/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: region `dram0_0_seg' overflowed by 1192 bytes
collect2: error: ld returned 1 exit status

exit status 1

Compilation error: exit status 1

Nice to have feature: Option to stop or pause the motion detection daemon

The Daemon that runs motion detection as a separate RTOS task cannot be stopped after calling .start(). It would be good to provide .stop() and .pause() methods that would allow the task to delete itself or to be paused.

In my application I want to use motion detection at low resolution and then switch to taking a few high resolution pics once triggered and reverting back to low-res motion detection later. I will adapt your Your Motion_Detection_Higher_Resolution example for now but ultimately it would be better to run the motion detection as a separate task using your Daemon feature and to be able to pause motion detection temporarily while taking a set of high-res pics to ensure the detected object is properly captured at least once.

it is not an issue but a question

Hi @eloquentarduino, sorry, I'm not an expert in C programming, nor in ESP32, no more in using github; however I have a question:

I want to make a cam project which stream video on demand and take a photo with the motion detection feature.
Before taking a very long time to try to understand how I could make both jobs on a single code, I can see 2 deposits that propose video streaming and motion detection: this deposit EloquentEsp32cam and this one: https://github.com/eloquentarduino/EloquentSurveillance
As they are quite different.... Why keeping both on github? Which one should I better use (the simplest)?

Thanks,

Nice to have feature: Anomaly detection

This is a variant of motion detection to meet a different requirement. Motion detection detects significant differences between successive frames from the camera. In the event of an object moving into the field of view and staying there for some while motion detection will produce a signal at the start and end of the period while anomaly detection will produce a signal for the entire period that the object is in the field of view regardless of whether it moves around or not.

This requires the library to have a reference image against which to do the moving points comparison. The reference image could be either:

  1. captured explicitly on request from the client app or
  2. the most recent image that did not trigger anomaly detection.

Option 1 would suit a production line environment where lighting is consistent
Option 2 would suit an outdoor environment where lighting varies slowly through the day

Option 2 would require an additional moving point ratio to be set which would be the (lower) threshold below which the reference image can be replaced. Any images above the lower threshold but below the trigger threshold would be ignored.
This lower threshold could potentially be learned during a training window feature where the maximum moving point ratio between images over a period of time is captured but that is probably a step too far for the library.

modify rgb components when streaming mjpeg

Hello i would like be able to stream the mjpeg image but after making this operation on the image channel components.
Blue - Red / Blue + Red. Could this be done with the eloquent library which looks so straight forward? thank you for your feedback

fatal error: dl_image.hpp: No such file or directory

Dear friends
By choosing "Motion detection" program on Arduino 1.8.9, I face an error :
C:\Users\--\Documents\Arduino\libraries\EloquentEsp32cam\src/eloquent_esp32cam/motion/detection.h:4:24: fatal error: dl_image.hpp: No such file or directory
so what's the problem ?!

Arduino version question

Hi, which ESP32 Arduino development version should I use?

Currently, I'm using ESP32 Arduino (from Espressif) version 2.0.11 and I get a compile error when I compile examples. I guess I'm using the wrong version of ESP32 development platform.

Motion_Detection.ino: 28:7: error: expected nested-name-specifier before 'void
void setup() {
^~~~
Error compiling .ino project source

Thank you.
yukini3

25-Person detection HTTP ESP32-EYE -8M

I keep getting this error when loading the 25 example.

c:/users/.../appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users...\AppData\Local\Temp\arduino\sketches\C7F6C6DBA1C60F9A3B0B01A23222376C/25_Person_Detection_HTTP.ino.elf section .dram0.bss' will not fit in region dram0_0_seg'
c:/users/.../appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: DRAM segment data does not fit.
c:/users/.../appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: DRAM segment data does not fit.
c:/users/.../appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: region `dram0_0_seg' overflowed by 15728 bytes
collect2.exe: error: ld returned 1 exit status

exit status 1

Compilation error: exit status 1

Any ideas what I am doing wrong?

Rio's parameters in rect. and circular mode

Hello
Thank you for your good library.
I need more explanation about determining Rio's parameters in square mode.
Most of the coordinate determination is what I want. Are the X and Y points defined based on the bottom left?
What are the maximum width and length values?
I would be grateful if you could give more details.
Also in circular mode.
Sincerely

please add documentation and support for M5 Timer Camera

First time doing a request / issue. Hopefully this is the place

Can you add support for the M5 Stack ESP32 PSRAM Timer Camera X (OV3660)
SKU: U082-X. the camera pins are -->. https://github.com/m5stack/TimerCam-arduino/blob/master/src/camera_pins.h

Also as a new user to the 'EloquentEsp32cam' library -- examples "3_Get_Your_First_Picture.ino" I am not sure what "m5" references --- in the allowed values -- can a comment be added since M5 has about 5 esp32 cam variations
* Allowed values are:
* - aithinker()
* - m5(). <<<<--- need documentation on what this is?
* - m5wide()
* - eye()
* - wrover()
*/

Motion detection

Hi there,

I am looking into detecting movement and found the elequent library, which is using the get_moving_point_number() (from /include/image/dl_image.hpp)

The Function is very well explained, but I don't seem to find where the source code is. Can someone point me into the right direction?

Thank you in advance

Some header files not detected by library temporary fix

If you try to use the library in its current state, it will throw out and error about a file not detected (most likely XCLK.h or Brownout.h) thats because in "camera.h" most header file names are wrong, so i fixed this issue, to use my fix replace all "#include"s in "/src/eloquent_esp32cam/camera/camera.h" with these:


#include <esp_camera.h>
#include "./quality.h"
#include "./Brownout.h"
#include "./XCLK.h"
#include "./Resolution.h"
#include "./Pinout.h"
#include "./Sensor.h"
#include "./pixformat.h"
#include "./rgb_565.h"
#include "../extra/exception.h"
#include "../extra/time/rate_limit.h"
#include "../extra/esp32/multiprocessing/mutex.h"

then save the file and compile and it should compile without any errors!

for some reason the github is only updated to version 1.1.2 but in the arduino library manager its up to 2.2.0, this fix only works with the 2.2.0 that you can only get from arduino as far as i know

Rotate & Flip

Not a bug but a question.

I tried this but it seems to have no effect:

    camera.sensor.vflip(1);
    camera.sensor.hflip(1);

What am I doing wrong ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.