Camera webserver esp32 with motion library
DCT Sign-Only Correlation with Application to Image Matching and the Relationship with Phase-Only Correlation (DOI:10.1109/ICASSP.2007.366138)
Last version:
Configuration :
#define AC_OPTIM 0
#define PHASE_DCT 1
Motion without output | Motion with output |
---|---|
![]() |
![]() |
#define PHASE_DCT 3 |
#define PHASE_DCT 2 |
Interpretation: Motion are created from the DC component only so we can’t capture motion where there is edges already. The advantage though is that you don’t have those horizontal lines interfering. Atm I can’t fix the issue related of background edges interfering the motion.
DCT-sign DC + All AC | DCT-sign DC only |
---|---|
![]() |
![]() |
#define PHASE_DCT 1 |
#define PHASE_DCT 1 + manual changes |
Edges of objects are more detailed because we have all frequencies. | Horizontal line artifacts disappear. But loose edges details. |
Interpretation: The process of returning moving object is done by differentating the background (DCT-sign DC only) from the current image (DCT-sign DC only). However since the background DC are the same values as the moving object, the differentiate would be 0 and therefore won’t considerate as moving object. Atm I can’t find any solution to fix this.
FFMPEG
value in esp32-motion/epsz.c
jpgd.h
library in development.jpgd.h
can handle new features, at the moment : jpg2gray
: convert directly during decoding to monochromejpg2gray_filtered
: during conversion apply a median filter to remove horizontal line artifacts. (cf .gif below)jpg2gray_filtered
tjpgdcnf.h
under DCT_FILTER
tjpgdcnf.h
under PHASE_DCT
algo | demo | input size | time |
---|---|---|---|
lucas kanade | ![]() |
160 x 120 | 600ms (+130ms display time) |
block matching ARPS | ![]() |
640 x 480 | 130ms (no motion) to 380ms (motion) (+2sec display) with 8x8 MB search 9 |
block matching EPZS | ![]() |
640 x 480 | 150ms to 380ms (+2sec display) with 6x6 MB search 9 |
Note : Block matching takes longer to display (2sec per frame) because of upscaling to input image size for a nicer display. That’s why we see so much latency.
To run this example, you need the following components:
PlatformIO: Open PlatformIO Core CLI
. It will open a terminal and load pio
. From there run the command :pio run -t menuconfig -e release
: Will load release config file sdkconfig.release (-O2 optim, IRAM optimisation). This mode is specific for serial device since it can’t debug.pio run -t menuconfig -e debug
: Will load debug config file sdkconfig.debug (-Og debug, Flash instead of IRAM, reduced CLCK speed). This mode is specific for JTAG/ESP-Prog device.Camera Web Server ---> Wifi Settings
you can change WiFi configuration (STA and AP)pio run -t build -e release
or debug
pio run -t upload -e release
or debug
After you’ve completed the hardware settings, please follow the steps below:
idf.py menuconfig
;http://[ip-of-esp32]/
;Get Still
or Start Stream
;http://[ip-of-esp32]:81/stream
;For more details of the http handler, please refer to esp32-camera.
This code is revisited from https://github.com/espressif/esp-who .