DCT Sign-Only Correlation with Application to Image Matching and the Relationship with Phase-Only Correlation (DOI:10.1109/ICASSP.2007.366138)
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.
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.
- esp32motion : enhanced EPZS algorithm accuracy. Now it is possible to choose FFMPEG or MPEG4_AVC version by changing
FFMPEG
value inesp32-motion/epsz.c
- added JPEG decoder :
- Now it won't load the library from the internal ROM/jpgd.h but instead a custom
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)- developped a DCT-phase filter which can be usefull for motion detection
- developped a DCT based denoiser
- Removed upscaling (too slow)
- GUI added a test "Motion Algorithm" which is just the capture converted to gray. It shows the decoder latency and the effect of artifacts filtering.
- Now it won't load the library from the internal ROM/jpgd.h but instead a custom
- DCT denoiser can be enable/disable in
tjpgdcnf.h
underDCT_FILTER
- DCT phase and modulation can be enable/disable in
tjpgdcnf.h
underPHASE_DCT
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:
- An ESP32 Module: Either ESP32-CAM.
- A Camera Module: Either OV2640.
- Press F1 (Show All Commands) and type
PlatformIO: Open PlatformIO Core CLI
. It will open a terminal and loadpio
. 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.- Under
Camera Web Server ---> Wifi Settings
you can change WiFi configuration (STA and AP)
pio run -t build -e release
ordebug
pio run -t upload -e release
ordebug
- Follow from step 4. in next section
After you've completed the hardware settings, please follow the steps below:
- Connect the camera to ESP32 module. For connection pins, please see here
- Configure the example through
idf.py menuconfig
; - Build And Flash the application to ESP32;
- Open Your Browser and point it to
http://[ip-of-esp32]/
; - To Get Image press
Get Still
orStart Stream
; - Use The Options to enable/disable Motion detection, Filtering and more;
t. View The Stream in a player like VLC: Open Network
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 .