Permalink
Browse files

Limit detection rate to 3fps, small setup_mode fix.

  • Loading branch information...
1 parent 1b80e57 commit a8f0a5bdb7b5d6cd3b8285b4c34f1b8a873682a4 JoergWeber committed Sep 30, 2008
Showing with 134 additions and 112 deletions.
  1. +1 −0 CHANGELOG
  2. +1 −0 CREDITS
  3. +4 −4 alg.c
  4. +2 −2 alg.h
  5. +125 −106 motion.c
  6. +1 −0 motion.h
View
@@ -20,6 +20,7 @@ Features
possible combinations. (Joerg Weber)
* Get rid of ffmpeg-config in configure.in for debian. (Angel Carpintero)
* Implement 'gapless' event mode to allow for recording of movies without 'holes'. (Joerg Weber)
+ * Limit detection rate to 3fps at framerates above 5fps, to reduce CPU load. (Joerg Weber)
Bugfixes
* Fix Problem Encoding 1280x1024 resolution videos
View
@@ -1383,6 +1383,7 @@ Joerg Weber
* Split locate_motion into separate 'mode' and 'style' option to allow all
possible combinations.
* Gapless_event mode.
+ * Limit detection rate to 3fps at framerates above 5fps, to reduce CPU load.
Dirk Wesenberg
* Track pan/tilt support for uvcvideo ( Michal Licko ,Dirk Wesenberg and Angel Carpintero )
View
8 alg.c
@@ -159,15 +159,15 @@ void alg_locate_center_size(struct images *imgs, int width, int height, struct c
/* draw a box around the movement */
-void alg_draw_location(struct coord *cent, struct images *imgs, int width, unsigned char *new, int style, int mode)
+void alg_draw_location(struct coord *cent, struct images *imgs, int width, unsigned char *new, int style, int mode, int process_thisframe)
{
unsigned char *out = imgs->out;
int x, y;
out = imgs->out;
/* debug image always gets a 'normal' box */
- if (mode == LOCATE_BOTH) {
+ if ((mode == LOCATE_BOTH) && process_thisframe) {
int width_miny = width * cent->miny;
int width_maxy = width * cent->maxy;
@@ -223,7 +223,7 @@ void alg_draw_location(struct coord *cent, struct images *imgs, int width, unsig
/* draw a RED box around the movement */
-void alg_draw_red_location(struct coord *cent, struct images *imgs, int width, unsigned char *new, int style, int mode)
+void alg_draw_red_location(struct coord *cent, struct images *imgs, int width, unsigned char *new, int style, int mode, int process_thisframe)
{
unsigned char *out = imgs->out;
unsigned char *new_u, *new_v;
@@ -238,7 +238,7 @@ void alg_draw_red_location(struct coord *cent, struct images *imgs, int width, u
new_v = new + v;
/* debug image always gets a 'normal' box */
- if (mode == LOCATE_BOTH) {
+ if ((mode == LOCATE_BOTH) && process_thisframe) {
int width_miny = width * cent->miny;
int width_maxy = width * cent->maxy;
View
4 alg.h
@@ -32,8 +32,8 @@ struct segment {
};
void alg_locate_center_size(struct images *, int width, int height, struct coord *);
-void alg_draw_location(struct coord *, struct images *, int width, unsigned char *, int, int);
-void alg_draw_red_location(struct coord *, struct images *, int width, unsigned char *, int, int);
+void alg_draw_location(struct coord *, struct images *, int width, unsigned char *, int, int, int);
+void alg_draw_red_location(struct coord *, struct images *, int width, unsigned char *, int, int, int);
int alg_diff(struct context *, unsigned char *);
int alg_diff_standard(struct context *, unsigned char *);
int alg_lightswitch(struct context *, int diffs);
Oops, something went wrong.

0 comments on commit a8f0a5b

Please sign in to comment.