forked from mxa/Bewegungsmelder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
05b-movement.pd
51 lines (51 loc) · 1.59 KB
/
05b-movement.pd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#N canvas 779 56 517 590 10;
#X declare -lib Gem;
#X obj 28 8 cnv 15 400 50 empty empty 5b 14 24 0 24 -175655 -66577
0;
#X obj 31 186 gemwin;
#X msg 31 130 create \, 1;
#X msg 39 156 0 \, destroy;
#X obj 129 130 gemhead;
#X obj 129 319 pix_texture;
#X obj 129 379 rectangle 4 3;
#X text 237 125 This is a render-chain.;
#X text 239 139 Always start it with gemhead.;
#X text 237 168 takes the video image from your camera;
#X text 241 323 textures the video image;
#X text 242 381 onto an rectangle;
#X obj 129 195 pix_rgba;
#X text 237 197 converts the colorspace;
#X obj 129 245 pix_movement 0.2;
#X obj 129 293 alpha;
#X obj 138 272 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X text 240 244 compares the frames;
#X text 240 292 enables the alpha channel;
#X text 75 29 Using the camera to extract motion from the live video
;
#X text 36 438 use;
#X obj 64 439 pix_blob;
#X text 123 438 to express the detected movement in a number.;
#X text 35 419 Challenge:;
#X obj 129 167 pix_video;
#X obj 129 349 mn-flip;
#X floatatom 222 221 5 0 1 0 - - -;
#X text 29 67 the pix_movement object creates a black and white image
(a bitmap) from the difference to the previous frame with a threshold.
;
#X obj 324 12 declare -lib Gem;
#X text 264 220 threshold - hold shift and drag!;
#X text 29 549 Max Neupert \, GMU - Bauhaus-Universität Weimar 2008-2012
;
#X text 75 16 Pure Data + Gem;
#X connect 2 0 1 0;
#X connect 3 0 1 0;
#X connect 4 0 24 0;
#X connect 5 0 25 0;
#X connect 12 0 14 0;
#X connect 14 0 15 0;
#X connect 15 0 5 0;
#X connect 16 0 15 0;
#X connect 24 0 12 0;
#X connect 25 0 6 0;
#X connect 26 0 14 1;