aboutsummaryrefslogtreecommitdiff
path: root/examples/09_vp_calibration
diff options
context:
space:
mode:
Diffstat (limited to 'examples/09_vp_calibration')
-rw-r--r--examples/09_vp_calibration/09_vp_calibration.pd150
-rw-r--r--examples/09_vp_calibration/test.pd107
2 files changed, 72 insertions, 185 deletions
diff --git a/examples/09_vp_calibration/09_vp_calibration.pd b/examples/09_vp_calibration/09_vp_calibration.pd
index 2277360..9e1f8a9 100644
--- a/examples/09_vp_calibration/09_vp_calibration.pd
+++ b/examples/09_vp_calibration/09_vp_calibration.pd
@@ -1,4 +1,4 @@
-#N canvas 904 187 901 736 10;
+#N canvas 898 205 901 736 10;
#X declare -path ../../;
#X obj 17 13 declare -path ../../;
#X text -18 0 declare path to be sure externals were found...;
@@ -7,8 +7,8 @@
#X obj 234 268 pix_image pattern.png;
#X obj 234 290 pix_texture;
#X msg 23 555 destroy;
-#N canvas 1042 262 739 611 compute_perspective 0;
-#N canvas 1 98 450 300 format 0;
+#N canvas 973 376 826 658 compute_perspective 0;
+#N canvas 1 110 450 300 format 0;
#X obj 93 7 inlet;
#X obj 118 140 outlet;
#X msg 108 68 \$1 \$4 0 \$7 \$2 \$5 0 \$8 0 0 1 0 \$3 \$6 0 \$9;
@@ -104,8 +104,7 @@
#X obj 17 496 outlet;
#X obj -136 497 outlet;
#X obj -123 -47 inlet;
-#X msg 474 -23 -1 1 1 1 -1 -1 1 -1;
-#X msg 304 5 -4 3 4 3 -4 -3 4 -3;
+#X msg 115 61 -1 1 1 1 -1 -1 1 -1;
#X msg -122 256 srcMatrix -4 3 4 3 -4 -3 4 -3;
#X msg -130 235 srcMatrix -1 1 1 1 -1 -1 1 -1;
#X msg -136 214 srcMatrix -1 1 1 1 -1 -1 1 -1;
@@ -114,30 +113,29 @@
#X obj 201 107 bng 15 250 50 0 empty empty reset 17 7 0 10 -262144
-1 -1;
#X obj -123 -25 pix_info ______________;
-#X msg 434 40 srcMatrix -1 1 1 1 -1 -1 1 -1;
#X obj -11 7 * -1;
#X obj 39 7 * -1;
#X obj -123 -2 t a b;
-#X obj -96 37 spigot;
+#X obj -96 27 spigot;
#X obj -118 123 spigot;
#X obj 43 -47 inlet;
#X obj 43 -23 == 0;
-#X obj 90 -10 print;
-#X obj -47 194 print;
-#X obj -96 62 pack -1 0 0 0 0 0 0 0 0;
-#X obj -96 82 route -1;
+#X obj -96 72 pack -1 0 0 0 0 0 0 0 0;
+#X obj -96 92 route -1;
#X msg -96 153 srcMatrix \$1 \$2 \$3 \$4 \$5 \$6 \$7 \$8;
-#X msg -67 118 set \$1 \$2 \$3 \$4 \$5 \$6 \$7 \$8;
#X msg 124 330 invert \$1;
#X obj 124 310 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
-#X msg 244 -52 -1830 1330 1830 1330 -1830 -1330 1830 -1330;
-#X msg 139 -32 -1 1 1 1 -1 -1 1 -1;
+#X msg -96 49 -1;
+#X msg 139 -31 -1 1 1 1 -1 -1 1 -1;
+#X obj 88 37 t b b;
+#X obj 88 15 sel 1 0;
+#X msg -67 118 set \$1 \$2 \$3 \$4 \$5 \$6 \$7 \$8;
#X connect 0 0 27 0;
#X connect 1 0 0 0;
#X connect 2 0 28 0;
#X connect 2 1 1 0;
-#X connect 5 0 34 0;
+#X connect 5 0 33 0;
#X connect 7 0 20 0;
#X connect 8 0 21 0;
#X connect 9 0 24 0;
@@ -154,7 +152,7 @@
#X connect 16 5 14 0;
#X connect 16 6 9 0;
#X connect 16 7 10 0;
-#X connect 17 0 56 0;
+#X connect 17 0 51 0;
#X connect 18 0 26 0;
#X connect 19 0 18 0;
#X connect 19 1 18 1;
@@ -170,49 +168,50 @@
#X connect 24 1 18 6;
#X connect 25 0 18 0;
#X connect 25 1 18 7;
-#X connect 26 0 36 0;
-#X connect 29 0 38 0;
+#X connect 26 0 35 0;
+#X connect 29 0 37 0;
+#X connect 30 0 54 0;
+#X connect 33 0 2 0;
#X connect 34 0 2 0;
-#X connect 35 0 2 0;
-#X connect 36 0 35 0;
-#X connect 36 1 2 0;
-#X connect 37 0 56 0;
-#X connect 38 0 42 0;
-#X connect 38 1 40 0;
-#X connect 38 1 49 3;
-#X connect 38 1 49 7;
-#X connect 38 2 41 0;
-#X connect 38 2 49 2;
-#X connect 38 2 49 4;
-#X connect 40 0 49 1;
-#X connect 40 0 49 5;
-#X connect 41 0 49 6;
-#X connect 41 0 49 8;
-#X connect 42 0 35 0;
-#X connect 42 1 43 0;
-#X connect 42 1 44 0;
-#X connect 43 0 49 0;
-#X connect 44 0 34 0;
+#X connect 35 0 34 0;
+#X connect 35 1 2 0;
+#X connect 36 0 51 0;
+#X connect 37 0 40 0;
+#X connect 37 1 38 0;
+#X connect 37 1 45 3;
+#X connect 37 1 45 7;
+#X connect 37 2 39 0;
+#X connect 37 2 45 2;
+#X connect 37 2 45 4;
+#X connect 38 0 45 1;
+#X connect 38 0 45 5;
+#X connect 39 0 45 6;
+#X connect 39 0 45 8;
+#X connect 40 0 34 0;
+#X connect 40 1 41 0;
+#X connect 40 1 42 0;
+#X connect 41 0 50 0;
+#X connect 42 0 33 0;
+#X connect 43 0 44 0;
+#X connect 43 0 42 1;
+#X connect 43 0 53 0;
+#X connect 44 0 41 1;
#X connect 45 0 46 0;
-#X connect 45 0 44 1;
-#X connect 46 0 43 1;
#X connect 46 0 47 0;
-#X connect 49 0 50 0;
-#X connect 50 0 51 0;
-#X connect 50 0 52 0;
-#X connect 51 0 2 0;
-#X connect 52 0 56 0;
-#X connect 53 0 2 0;
-#X connect 54 0 53 0;
-#X connect 56 0 16 0;
+#X connect 46 0 54 0;
+#X connect 47 0 2 0;
+#X connect 48 0 2 0;
+#X connect 49 0 48 0;
+#X connect 50 0 45 0;
+#X connect 51 0 16 0;
+#X connect 52 0 51 0;
+#X connect 52 1 33 0;
+#X connect 52 1 30 0;
+#X connect 53 0 52 0;
+#X connect 54 0 51 0;
#X coords 0 -1 1 1 242 62 2 100 100;
#X restore 144 155 pd compute_perspective;
-#X obj 234 379 scaleXYZ 1 1 0;
#X msg 9 527 color 0 0 1 1 \, dimen 640 480 \, create \, 1;
-#X obj 501 332 gemhead;
-#X obj 501 353 pix_image pattern.png;
-#X obj 501 405 pix_texture;
-#X obj 501 427 pix_opencv_warpperspective;
#X obj 144 295 pix_texture;
#X obj 144 87 gemhead;
#X obj 144 66 == 0;
@@ -224,38 +223,33 @@
#X msg 234 -14 1;
#X text 249 24 CPU;
#X text 249 38 GPU;
-#X obj 234 312 scaleXYZ 4 3 1;
#X obj 234 405 square 1 1;
#X obj 144 359 rectangle 1 1;
#X obj 144 324 scaleXYZ 4 3 1;
-#X floatatom 339 301 5 0 0 0 - - -;
-#X obj 323 444 GEMglMultTransposeMatrixf;
#X obj 234 353 GEMglMultTransposeMatrixf;
#X text 375 62 This demonstrates how to use pix_opencv_warpperspective
to compute perspective transformation and to apply it with OpenGL;
#X text 403 130 Very useful to quickly setup video projector;
+#X obj 234 332 scaleXYZ 1 1 1;
+#X obj 234 379 scaleXYZ 1 1 0;
#X connect 2 0 4 0;
#X connect 4 0 5 0;
-#X connect 5 0 24 0;
+#X connect 5 0 25 0;
#X connect 6 0 3 0;
-#X connect 7 0 14 0;
-#X connect 7 1 30 1;
-#X connect 8 0 25 0;
-#X connect 9 0 3 0;
-#X connect 10 0 11 0;
-#X connect 11 0 12 0;
-#X connect 12 0 13 0;
-#X connect 14 0 27 0;
-#X connect 15 0 18 0;
-#X connect 16 0 15 0;
-#X connect 17 0 2 0;
-#X connect 17 0 16 0;
-#X connect 17 0 7 1;
-#X connect 18 0 19 0;
-#X connect 19 0 7 0;
-#X connect 20 0 21 0;
-#X connect 21 0 17 0;
-#X connect 24 0 30 0;
-#X connect 27 0 26 0;
-#X connect 28 0 24 1;
-#X connect 30 0 8 0;
+#X connect 7 0 9 0;
+#X connect 7 1 22 1;
+#X connect 8 0 3 0;
+#X connect 9 0 21 0;
+#X connect 10 0 13 0;
+#X connect 11 0 10 0;
+#X connect 12 0 2 0;
+#X connect 12 0 11 0;
+#X connect 12 0 7 1;
+#X connect 13 0 14 0;
+#X connect 14 0 7 0;
+#X connect 15 0 16 0;
+#X connect 16 0 12 0;
+#X connect 21 0 20 0;
+#X connect 22 0 26 0;
+#X connect 25 0 22 0;
+#X connect 26 0 19 0;
diff --git a/examples/09_vp_calibration/test.pd b/examples/09_vp_calibration/test.pd
deleted file mode 100644
index 40fa21b..0000000
--- a/examples/09_vp_calibration/test.pd
+++ /dev/null
@@ -1,107 +0,0 @@
-#N canvas 647 219 963 860 10;
-#X msg 132 17 -1 1 1 1 -1 -1 1 -1;
-#X obj 128 88 gemhead;
-#X obj 128 179 GEMglHint GL_PERSPECTIVE_CORRECTION_HINT GL_NICEST;
-#X obj 128 669 GEMglEnd;
-#X obj 264 242 GLdefine GL_SMOOTH;
-#X obj 264 220 loadbang;
-#X obj 264 262 loadbang;
-#X obj 264 284 GLdefine GL_POLYGON;
-#X obj 128 302 GEMglBegin;
-#X obj 128 260 GEMglShadeModel;
-#X obj 281 652 loadbang;
-#X obj 128 692 GEMglShadeModel;
-#X obj 281 674 GLdefine GL_FLAT;
-#X msg 273 578 1 0 1;
-#X msg 315 578 1 1 0;
-#X floatatom 309 415 3 0 100 0 - - -;
-#X obj 309 436 * 0.01;
-#X msg 331 218 bang;
-#X floatatom 212 316 5 0 0 0 - - -;
-#X floatatom 298 321 5 0 0 0 - - -;
-#N canvas 85 188 247 179 Gem.init 0;
-#X obj 118 46 loadbang;
-#X msg 118 81 reset;
-#X obj 118 113 outlet;
-#X connect 0 0 1 0;
-#X connect 1 0 2 0;
-#X restore 557 112 pd Gem.init;
-#N canvas 340 107 682 322 gemwin 0;
-#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
--1 -1 1 1;
-#X obj 102 161 r \$0-gemstart;
-#X obj 102 182 select 1 0;
-#X msg 102 214 create \, 1;
-#X msg 177 215 destroy;
-#X obj 102 239 t a;
-#X obj 318 54 inlet;
-#X obj 318 255 gemwin;
-#X obj 318 100 t a a;
-#X obj 318 287 outlet;
-#X obj 350 128 route create destroy;
-#X obj 350 150 t b;
-#X msg 350 172 1;
-#X obj 390 150 t b;
-#X msg 390 172 0;
-#X obj 350 195 t f;
-#X msg 350 219 set \$1;
-#X text 118 122 rendering;
-#X connect 1 0 2 0;
-#X connect 2 0 3 0;
-#X connect 2 1 4 0;
-#X connect 3 0 5 0;
-#X connect 4 0 5 0;
-#X connect 5 0 8 0;
-#X connect 6 0 8 0;
-#X connect 7 0 9 0;
-#X connect 8 0 7 0;
-#X connect 8 1 10 0;
-#X connect 10 0 11 0;
-#X connect 10 1 13 0;
-#X connect 11 0 12 0;
-#X connect 12 0 15 0;
-#X connect 13 0 14 0;
-#X connect 14 0 15 0;
-#X connect 15 0 16 0;
-#X connect 16 0 0 0;
-#X coords 0 -1 1 1 85 40 1 100 100;
-#X restore 557 143 pd gemwin;
-#X obj 128 111 pix_image patten.png;
-#X obj 128 133 pix_texture;
-#X obj 128 388 GEMglTexCoord2f 0 0;
-#X obj 128 409 GEMglVertex3f -1 -1 0;
-#X obj 128 485 GEMglVertex3f -1 1 0;
-#X obj 128 464 GEMglTexCoord2f 0 1;
-#X obj 128 552 GEMglVertex3f 1 1 0;
-#X obj 128 531 GEMglTexCoord2f 1 1;
-#X obj 128 601 GEMglTexCoord2f 1 0;
-#X obj 128 624 GEMglVertex3fv 1 -1 0;
-#X connect 1 0 22 0;
-#X connect 2 0 9 0;
-#X connect 3 0 11 0;
-#X connect 4 0 9 1;
-#X connect 5 0 4 0;
-#X connect 6 0 7 0;
-#X connect 7 0 8 1;
-#X connect 8 0 24 0;
-#X connect 9 0 8 0;
-#X connect 10 0 12 0;
-#X connect 12 0 11 1;
-#X connect 13 0 30 1;
-#X connect 14 0 30 1;
-#X connect 15 0 16 0;
-#X connect 16 0 27 2;
-#X connect 17 0 4 0;
-#X connect 18 0 25 1;
-#X connect 19 0 25 2;
-#X connect 20 0 21 0;
-#X connect 22 0 23 0;
-#X connect 23 0 2 0;
-#X connect 24 0 25 0;
-#X connect 25 0 27 0;
-#X connect 26 0 29 0;
-#X connect 27 0 26 0;
-#X connect 28 0 30 0;
-#X connect 29 0 28 0;
-#X connect 30 0 31 0;
-#X connect 31 0 3 0;