|
ESP32 motion
|
#include "motion.h"#include <stdbool.h>#include <math.h>#include <string.h>#include "esp_timer.h"Functions | |
| int | costFuncSAD (const uint8_t *currentImg, const uint8_t *refImg, int offset_curr, int offset_ref, size_t mbSize, size_t w) |
| Computes the Sum of Absolute Difference (SAD) for the given two blocks . More... | |
| uint8_t * | motionComp (const uint8_t *imgI, const MotionVector16_t *motionVect, size_t w, size_t h, size_t mbSize) |
| Compute motion compensated image's PSNR . More... | |
| bool | motionEstARPS (MotionEstContext *c) |
| Perform Adaptive Rood Pattern Search algorithm. More... | |
Variables | |
| const int | SDSP [6][2] |
Block matching algo
| int costFuncSAD | ( | const uint8_t * | currentImg, |
| const uint8_t * | refImg, | ||
| int | offset_curr, | ||
| int | offset_ref, | ||
| size_t | mbSize, | ||
| size_t | w | ||
| ) |
Computes the Sum of Absolute Difference (SAD) for the given two blocks
.
\[ SAD = \sum_{i=0}^{n-1}\sum_{j=0}^{n-1} |Cur_{ij}-Ref_{ij}| \]
| currentImg | : img for which we are finding the SAD |
| refImg | : img which the SAD is being computed |
| offset_curr | : offset applied to img current |
| offset_ref | : offset applied to ref img |
| mbSize | : the side of the 2 square blcks |
| w | : width of images |
| const int SDSP[6][2] |