#include "camera_info.h"
#include "action_stack.h"
#include "console.h"
#include "keyboard.h"
#include "clock.h"
#include "viewport.h"
#include "debug_led.h"
#include "gui.h"
#include "gui_draw.h"
#include "script_api.h"
#include "script.h"
#include "motion_detector.h"
#include "module_def.h"
#include "gui_lang.h"
gehe zum Quellcode dieser Datei
|
enum | {
MD_MEASURE_MODE_U =0,
MD_MEASURE_MODE_Y =1,
MD_MEASURE_MODE_V =2,
MD_MEASURE_MODE_R =3,
MD_MEASURE_MODE_G =4,
MD_MEASURE_MODE_B =5
} |
|
enum | { MD_DO_IMMEDIATE_SHOOT =1,
MD_MAKE_DEBUG_LOG_FILE =2,
MD_MAKE_RAM_DUMP_FILE =4,
MD_NO_SHUTTER_RELEASE_ON_SHOOT =8
} |
|
enum | { MD_REGION_NONE =0,
MD_REGION_INCLUDE =1,
MD_REGION_EXCLUDE =2
} |
|
|
static int | md_detect_motion (void) |
|
static void | time_counter_capture (time_counter *t) |
|
static int | action_stack_AS_MOTION_DETECTOR () |
|
static void | md_kbd_sched_immediate_shoot (int no_release) |
|
static int | clip (int v) |
|
void | md_close_motion_detector () |
|
int | md_init_motion_detector (int columns, int rows, int pixel_measure_mode, int detection_timeout, int measure_interval, int threshold, int draw_grid, int clipping_region_mode, int clipping_region_column1, int clipping_region_row1, int clipping_region_column2, int clipping_region_row2, int parameters, int pixels_step, int msecs_before_trigger) |
|
static int | md_running () |
|
static int | md_measure_y () |
|
static int | md_measure_u () |
|
static int | md_measure_v () |
|
static int | md_measure_r () |
|
static int | md_measure_g () |
|
static int | md_measure_b () |
|
int | md_get_cell_val (int column, int row) |
|
int | md_get_cell_diff (int column, int row) |
|
void | md_draw_grid () |
|
int | _module_unloader () |
|
int | _module_can_unload () |
|
#define md_save_calls_history |
( |
) | |
|
#define MD_XY2IDX |
( |
|
x, |
|
|
|
y |
|
) |
| ((y)*motion_detector.columns+(x)) |
#define MOTION_DETECTOR_CELLS 1024 |
#define mx_dump_memory |
( |
|
x) | |
|
Aufzählungswerte |
---|
MD_MEASURE_MODE_U |
|
MD_MEASURE_MODE_Y |
|
MD_MEASURE_MODE_V |
|
MD_MEASURE_MODE_R |
|
MD_MEASURE_MODE_G |
|
MD_MEASURE_MODE_B |
|
Definiert in Zeile 52 der Datei motion_detector.c.
Aufzählungswerte |
---|
MD_DO_IMMEDIATE_SHOOT |
|
MD_MAKE_DEBUG_LOG_FILE |
|
MD_MAKE_RAM_DUMP_FILE |
|
MD_NO_SHUTTER_RELEASE_ON_SHOOT |
|
Definiert in Zeile 63 der Datei motion_detector.c.
Aufzählungswerte |
---|
MD_REGION_NONE |
|
MD_REGION_INCLUDE |
|
MD_REGION_EXCLUDE |
|
Definiert in Zeile 71 der Datei motion_detector.c.
int _module_can_unload |
( |
) | |
|
static int action_stack_AS_MOTION_DETECTOR |
( |
) | |
|
|
static |
void md_close_motion_detector |
( |
) | |
|
static int md_detect_motion |
( |
void |
) | |
|
|
static |
Definiert in Zeile 602 der Datei motion_detector.c.
606 register int col,
row;
676 int in_clipping_region=0;
683 in_clipping_region=1;
729 if (diff < 0) diff = -diff;
Definiert in Zeile 789 der Datei motion_detector.c.
825 int in_clipping_region = 0;
832 in_clipping_region = 1;
int md_get_cell_diff |
( |
int |
column, |
|
|
int |
row |
|
) |
| |
int md_get_cell_val |
( |
int |
column, |
|
|
int |
row |
|
) |
| |
int md_init_motion_detector |
( |
int |
columns, |
|
|
int |
rows, |
|
|
int |
pixel_measure_mode, |
|
|
int |
detection_timeout, |
|
|
int |
measure_interval, |
|
|
int |
threshold, |
|
|
int |
draw_grid, |
|
|
int |
clipping_region_mode, |
|
|
int |
clipping_region_column1, |
|
|
int |
clipping_region_row1, |
|
|
int |
clipping_region_column2, |
|
|
int |
clipping_region_row2, |
|
|
int |
parameters, |
|
|
int |
pixels_step, |
|
|
int |
msecs_before_trigger |
|
) |
| |
Definiert in Zeile 213 der Datei motion_detector.c.
247 if (columns < 1) columns = 3;
248 if (rows < 1) rows = 3;
252 if (columns > rows) columns--;
256 if(msecs_before_trigger<0)
258 msecs_before_trigger=0;
272 if(detection_timeout<0)
277 if(measure_interval<0)
300 if (clipping_region_column1>clipping_region_column2)
311 if (clipping_region_row1>clipping_region_row2)
static void md_kbd_sched_immediate_shoot |
( |
int |
no_release) | |
|
|
static |
static int md_measure_b |
( |
) | |
|
|
static |
Definiert in Zeile 577 der Datei motion_detector.c.
579 register int x,
y, uvx, cy, cu;
580 register int curr = 0;
589 uvx = x & 0xFFFFFFFC;
590 cu = (int)
img[y + uvx] - 128;
593 cu = (
signed char)
img[y + uvx];
595 curr +=
clip(((cy<<12) + cu*7258 + 2048)>>12);
static int md_measure_g |
( |
) | |
|
|
static |
Definiert in Zeile 550 der Datei motion_detector.c.
552 register int x,
y, uvx, cy, cu, cv;
553 register int curr = 0;
562 uvx = x & 0xFFFFFFFC;
563 cu = (int)
img[y + uvx] - 128;
564 cv = (int)
img[y + uvx + 2] - 128;
567 cu = (
signed char)
img[y + uvx];
568 cv = (
signed char)
img[y + uvx + 2];
570 curr +=
clip(((cy<<12) - cu*1411 - cv*2925 + 2048)>>12);
static int md_measure_r |
( |
) | |
|
|
static |
Definiert in Zeile 525 der Datei motion_detector.c.
527 register int x,
y, uvx, cy, cv;
528 register int curr = 0;
537 uvx = x & 0xFFFFFFFC;
538 cv = (int)
img[y + uvx + 2] - 128;
541 cv = (
signed char)
img[y + uvx + 2];
543 curr +=
clip(((cy<<12) + cv*5743 + 2048)>>12);
static int md_measure_u |
( |
) | |
|
|
static |
Definiert in Zeile 479 der Datei motion_detector.c.
481 register int x,
y, uvx;
482 register int curr = 0;
490 uvx = x & 0xFFFFFFFC;
491 curr += (int)
img[y + uvx] - 128;
494 curr += (
signed char)
img[y + uvx];
static int md_measure_v |
( |
) | |
|
|
static |
Definiert in Zeile 502 der Datei motion_detector.c.
504 register int x,
y, uvx;
505 register int curr = 0;
513 uvx = x & 0xFFFFFFFC;
514 curr += (int)
img[y + uvx + 2] - 128;
517 curr += (
signed char)
img[y + uvx + 2];
static int md_measure_y |
( |
) | |
|
|
static |
static int md_running |
( |
) | |
|
|
static |