Loading Images with jitter

Jun 29, 2008 at 3:43pm

Loading Images with jitter

Hello everyone!

I am quite new in Max/Msp-Jitter world!
I want to load some images in to jitter and make some kind of a fast slide show.
How could that be possible?

thanx
anton

#38649
Jun 30, 2008 at 9:49am

Magic.

No seriously, there are many ways to do it. You could, for example, load every image into a separate frame of a jit.qt.movie object, then you navigate easily. But you could also use jit.matrixset to store them, but if the images are not the same size this is a little tricky.

I don’t know how far you are using jitter, but your question is a bit too general to make a patch example. You should go and try a few things yourself and see how they work out, and come back here if you have more specific questions. Good luck!

#134942
Jun 30, 2008 at 6:47pm

Firstly thanx for the reply!
Secondly I know that my email wasn’t very clear on what I want to do.
Here is the situation:
Grab images with max sth like 15 per second and I store to a folder. Then another software does some image analysis trying to find the appropriate ones. Then the “good” images are copied in another folder. From there now I want to load them some how with jitter and play the on top of an existing looping video. The images should be shown with the same spead (around 15 fps)

thanks a lot
lyan

#134943
Jun 30, 2008 at 9:29pm

Take a look at image2movie.pat in jitter example (demo) folder.

#134944
Jun 30, 2008 at 10:38pm

Thanx for the tip but I want to do that live!
the whole thing suppose to be a live installation..
any other suggestions?

thanx
lyan

#134945
Jul 1, 2008 at 2:45pm

Moreover is there a way to check how many files-images, I have in a folder?

#134946
Jul 1, 2008 at 3:52pm

sketch

#P window setfont “Sans Serif” 14.;
#P window linecount 1;
#P message 132 299 193 196622 “countdown 011.png” 1;
#P window setfont “Sans Serif” 9.;
#P newex 60 60 41 196617 delay 1;
#P newex 60 60 41 196617 delay 1;
#P window setfont “Sans Serif” 14.;
#P newex 132 269 97 196622 prepend set;
#P newex 132 238 85 196622 route read;
#P user jit.pwindow 54 378 138 104 0 1 0 0 1 0;
#P newex 56 207 86 196622 jit.qt.movie;
#P window setfont “Sans Serif” 9.;
#P newex 56 185 65 196617 prepend read;
#B color 5;
#P number 215 69 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 215 88 48 196617 depth $1;
#P number 183 154 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 183 134 72 196617 route populate;
#P newex 138 87 74 196617 prepend prefix;
#P button 15 64 15 0;
#P newex 106 134 75 196617 print populated;
#P newex 15 39 60 196617 prepend set;
#P user dropfile 84 38 354 57 0 fold;
#P newex 138 66 54 196617 route text;
#P user textedit 84 38 354 57 32896 3 9 G5:/Users/G5/Desktop/temp/frames2/;
#P message 61 88 73 196617 autopopulate 1;
#P user ubumenu 59 114 100 196617 0 1 1 0;
#X add “countdown 001.png”;
#X add “countdown 002.png”;
#X add “countdown 003.png”;
#X add “countdown 004.png”;
#X add “countdown 005.png”;
#X add “countdown 006.png”;
#X add “countdown 007.png”;
#X add “countdown 008.png”;
#X add “countdown 009.png”;
#X add “countdown 010.png”;
#X add “countdown 011.png”;
#X add “countdown 012.png”;
#X add “countdown 013.png”;
#X add “countdown 014.png”;
#X add “countdown 015.png”;
#X add “countdown 016.png”;
#X add “countdown 017.png”;
#X add “countdown 018.png”;
#X add “countdown 019.png”;
#X add “countdown 020.png”;
#X add “countdown 021.png”;
#X add “countdown 022.png”;
#X add “countdown 023.png”;
#X add “countdown 024.png”;
#X add “countdown 025.png”;
#X add “countdown 026.png”;
#X add “countdown 027.png”;
#X add “countdown 028.png”;
#X add “countdown 029.png”;
#X add “countdown 030.png”;
#X add “countdown 031.png”;
#X add “countdown 032.png”;
#X add “countdown 033.png”;
#X add “countdown 034.png”;
#X add “countdown 035.png”;
#X add “countdown 036.png”;
#X add “countdown 037.png”;
#X add “countdown 038.png”;
#X add “countdown 039.png”;
#X add “countdown 040.png”;
#X add “countdown 041.png”;
#X add “countdown 042.png”;
#X add “countdown 043.png”;
#X add “countdown 044.png”;
#X add “countdown 045.png”;
#X add “countdown 046.png”;
#X add “countdown 047.png”;
#X add “countdown 048.png”;
#X add “countdown 049.png”;
#X add “countdown 050.png”;
#X add “countdown 051.png”;
#X add “countdown 052.png”;
#X add “countdown 053.png”;
#X add “countdown 054.png”;
#X add “countdown 055.png”;
#X add “countdown 056.png”;
#X add “countdown 057.png”;
#X add “countdown 058.png”;
#X add “countdown 059.png”;
#X add “countdown 060.png”;
#X add “countdown 061.png”;
#X add “countdown 062.png”;
#X add “countdown 063.png”;
#X add “countdown 064.png”;
#X add “countdown 065.png”;
#X add “countdown 066.png”;
#X add “countdown 067.png”;
#X add “countdown 068.png”;
#X add “countdown 069.png”;
#X add “countdown 070.png”;
#X add “countdown 071.png”;
#X add “countdown 072.png”;
#X add “countdown 073.png”;
#X add “countdown 074.png”;
#X add “countdown 075.png”;
#X add “countdown 076.png”;
#X add “countdown 077.png”;
#X add “countdown 078.png”;
#X add “countdown 079.png”;
#X add “countdown 080.png”;
#X add “countdown 081.png”;
#X add “countdown 082.png”;
#X add “countdown 083.png”;
#X add “countdown 084.png”;
#X add “countdown 085.png”;
#X add “countdown 086.png”;
#X add “countdown 087.png”;
#X add “countdown 088.png”;
#X add “countdown 089.png”;
#X add “countdown 090.png”;
#X add “countdown 091.png”;
#X add “countdown 092.png”;
#X add “countdown 093.png”;
#X add “countdown 094.png”;
#X add “countdown 095.png”;
#X add “countdown 096.png”;
#X add “countdown 097.png”;
#X add “countdown 098.png”;
#X add “countdown 099.png”;
#X add “countdown 100.png”;
#X add “countdown 101.png”;
#X add “countdown 102.png”;
#X add “countdown 103.png”;
#X add “countdown 104.png”;
#X add “countdown 105.png”;
#X add “countdown 106.png”;
#X add “countdown 107.png”;
#X add “countdown 108.png”;
#X add “countdown 109.png”;
#X add “countdown 110.png”;
#X add “countdown 111.png”;
#X add “countdown 112.png”;
#X add “countdown 113.png”;
#X add “countdown 114.png”;
#X add “countdown 115.png”;
#X add “countdown 116.png”;
#X add “countdown 117.png”;
#X add “countdown 118.png”;
#X add “countdown 119.png”;
#X add “countdown 120.png”;
#X add “countdown 121.png”;
#X add “countdown 122.png”;
#X add “countdown 123.png”;
#X add “countdown 124.png”;
#X add “countdown 125.png”;
#X add “countdown 126.png”;
#X add “countdown 127.png”;
#X add “countdown 128.png”;
#X add “countdown 129.png”;
#X add “countdown 130.png”;
#X add “countdown 131.png”;
#X add “countdown 132.png”;
#X add “countdown 133.png”;
#X add “countdown 134.png”;
#X add “countdown 135.png”;
#X add “countdown 136.png”;
#X add “countdown 137.png”;
#X add “countdown 138.png”;
#X add “countdown 139.png”;
#X add “countdown 140.png”;
#X add “countdown 141.png”;
#X add “countdown 142.png”;
#X add “countdown 143.png”;
#X add “countdown 144.png”;
#X add “countdown 145.png”;
#X add “countdown 146.png”;
#X add “countdown 147.png”;
#X add “countdown 148.png”;
#X add “countdown 149.png”;
#X add “countdown 150.png”;
#X add “countdown 151.png”;
#X add “countdown 152.png”;
#X add “countdown 153.png”;
#X add “countdown 154.png”;
#X add “countdown 155.png”;
#X add “countdown 156.png”;
#X add “countdown 157.png”;
#X add “countdown 158.png”;
#X add “countdown 159.png”;
#X add “countdown 160.png”;
#X add “countdown 161.png”;
#X add “countdown 162.png”;
#X add “countdown 163.png”;
#X add “countdown 164.png”;
#X add “countdown 165.png”;
#X add “countdown 166.png”;
#X add “countdown 167.png”;
#X add “countdown 168.png”;
#X add “countdown 169.png”;
#X add “countdown 170.png”;
#X add “countdown 171.png”;
#X add “countdown 172.png”;
#X add “countdown 173.png”;
#X add “countdown 174.png”;
#X add “countdown 175.png”;
#X add “countdown 176.png”;
#X add “countdown 177.png”;
#X add “countdown 178.png”;
#X add “countdown 179.png”;
#X add “countdown 180.png”;
#X add “countdown 181.png”;
#X add “countdown 182.png”;
#X add “countdown 183.png”;
#X add “countdown 184.png”;
#X add “countdown 185.png”;
#X add “countdown 186.png”;
#X add “countdown 187.png”;
#X add “countdown 188.png”;
#X add “countdown 189.png”;
#X add “countdown 190.png”;
#X add “countdown 191.png”;
#X add “countdown 192.png”;
#X add “countdown 193.png”;
#X add “countdown 194.png”;
#X add “countdown 195.png”;
#X add “countdown 196.png”;
#X add “countdown 197.png”;
#X add “countdown 198.png”;
#X add “countdown 199.png”;
#X add “countdown 200.png”;
#X add “countdown 201.png”;
#X add “countdown 202.png”;
#X add “countdown 203.png”;
#X add “countdown 204.png”;
#X add “countdown 205.png”;
#X add “countdown 206.png”;
#X add “countdown 207.png”;
#X add “countdown 208.png”;
#X add “countdown 209.png”;
#X add “countdown 210.png”;
#X add “countdown 211.png”;
#X add “countdown 212.png”;
#X add “countdown 213.png”;
#X add “countdown 214.png”;
#X add “countdown 215.png”;
#X add “countdown 216.png”;
#X add “countdown 217.png”;
#X add “countdown 218.png”;
#X add “countdown 219.png”;
#X add “countdown 220.png”;
#X add “countdown 221.png”;
#X add “countdown 222.png”;
#X add “countdown 223.png”;
#X add “countdown 224.png”;
#X add “countdown 225.png”;
#X add “countdown 226.png”;
#X add “countdown 227.png”;
#X add “countdown 228.png”;
#X add “countdown 229.png”;
#X add “countdown 230.png”;
#X add “countdown 231.png”;
#X add “countdown 232.png”;
#X add “countdown 233.png”;
#X add “countdown 234.png”;
#X add “countdown 235.png”;
#X add “countdown 236.png”;
#X add “countdown 237.png”;
#X add “countdown 238.png”;
#X add “countdown 239.png”;
#X add “countdown 240.png”;
#X prefix_set 0 1 G5:/Users/G5/Desktop/temp/frames2/ 0;
#P comment 71 21 289 196617 drag and drop a folder on the textedit to populate the ubumenu!;
#P window setfont “Sans Serif” 14.;
#P comment 361 38 100 196622 drop file here;
#P window linecount 2;
#P comment 260 130 100 196622 howmany files;
#P connect 20 0 23 0;
#P fasten 19 0 20 0 137 265 137 265;
#P fasten 3 1 16 0 109 156 61 156;
#P connect 3 1 9 0;
#P connect 15 0 14 0;
#P connect 12 0 13 0;
#P fasten 3 2 12 0 154 131 188 131;
#P connect 6 0 11 0;
#P fasten 5 0 6 0 89 60 143 60;
#P connect 17 1 19 0;
#P fasten 10 0 5 0 20 83 77 83 77 36 89 36;
#P connect 8 0 10 0;
#P fasten 8 0 5 0 20 60 77 60 77 35 89 35;
#P connect 17 0 18 0;
#P fasten 14 0 3 0 220 108 64 108;
#P connect 4 0 3 0;
#P fasten 11 0 3 0 143 108 64 108;
#P connect 16 0 17 0;
#P fasten 7 0 8 0 89 60 77 60 77 35 20 35;
#P window clipboard copycount 24;

#134947
Jul 1, 2008 at 3:57pm

ignore the upper post i was to quick

#P window setfont “Sans Serif” 14.;
#P window linecount 2;
#P comment 429 76 100 196622 movre the numbers;
#P number 350 75 70 14 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 43 154 38 196622 t b l;
#P message 147 299 193 196622 “countdown 016.png” 1;
#P window setfont “Sans Serif” 9.;
#P newex 75 60 41 196617 delay 1;
#P newex 75 60 41 196617 delay 1;
#P window setfont “Sans Serif” 14.;
#P newex 147 269 97 196622 prepend set;
#P newex 147 238 85 196622 route read;
#P user jit.pwindow 69 378 138 104 0 1 0 0 1 0;
#P newex 71 207 86 196622 jit.qt.movie;
#P window setfont “Sans Serif” 9.;
#P newex 71 185 65 196617 prepend read;
#B color 5;
#P number 230 69 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 230 88 48 196617 depth $1;
#P number 198 154 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 198 134 72 196617 route populate;
#P newex 153 87 74 196617 prepend prefix;
#P button 30 64 15 0;
#P newex 121 134 75 196617 print populated;
#P newex 30 39 60 196617 prepend set;
#P user dropfile 99 38 369 57 0 fold;
#P newex 153 66 54 196617 route text;
#P user textedit 99 38 369 57 32896 3 9 G5:/Users/G5/Desktop/temp/frames2/;
#P message 76 88 73 196617 autopopulate 1;
#P user ubumenu 74 114 100 196617 0 1 1 0;
#X prefix_set 0 1 G5:/Users/G5/Desktop/temp/frames2/ 0;
#P comment 86 21 289 196617 drag and drop a folder on the textedit to populate the ubumenu!;
#P window setfont “Sans Serif” 14.;
#P comment 376 38 100 196622 drop file here;
#P window linecount 2;
#P comment 275 130 100 196622 howmany files;
#P fasten 25 0 3 0 355 110 79 110;
#P connect 3 1 24 0;
#P connect 3 1 9 0;
#P connect 24 0 17 0;
#P connect 24 1 16 0;
#P connect 20 0 23 0;
#P fasten 19 0 20 0 152 265 152 265;
#P connect 15 0 14 0;
#P connect 12 0 13 0;
#P fasten 3 2 12 0 169 131 203 131;
#P connect 6 0 11 0;
#P fasten 5 0 6 0 104 60 158 60;
#P connect 17 1 19 0;
#P fasten 10 0 5 0 35 83 92 83 92 36 104 36;
#P connect 8 0 10 0;
#P fasten 8 0 5 0 35 60 92 60 92 35 104 35;
#P connect 17 0 18 0;
#P fasten 14 0 3 0 235 108 79 108;
#P connect 4 0 3 0;
#P fasten 11 0 3 0 158 108 79 108;
#P connect 16 0 17 0;
#P fasten 7 0 8 0 104 60 92 60 92 35 35 35;
#P window clipboard copycount 27;

#134948
Jul 1, 2008 at 3:59pm

You can use this live too, but you still need to load a list of images you’re going to analyze later. Jazmatajz’s hint would be useful here i think, provided you modify it.

If you use [folder], dump all the files you like into a list, and then do [zl len] you’ll know how many there are…

I posted a small patch in this thread:
http://www.cycling74.com/forums/index.php?t=msg&th=34514&start=0&rid=5118&S=f6ea317dba636318ea30b17e5d62224f
Maybe you could check that out. All the files with some particular extension are collected in a [zl reg].

You could then create a [metro 66] -> [counter] -> [zl nth] to load and 15 pictures per second.

#134949
Jul 1, 2008 at 4:42pm

great guys thnx a lot!
I ll try and I ll u know

lyan

#134950
Jul 2, 2008 at 9:03pm

thanx Bas I didn’t know the existence of [folder] object!
this does the trick!

Actually I do have one more question (I hope the last cause I need my project to reach its completion!)…

How can I know the current frame of a movie that is played with [jit.qt.movie] object. I know the framedump but what I do want is while paying to give me its current frame even while looping!

Best
lyan

#134951
Jul 2, 2008 at 9:16pm

04 controllingmovieplayback (jitter tutorial)

#P window setfont “Fixedwidth Serif” 10.;
#P window linecount 1;
#P message 8 130 50 1441802 gettime;
#P newex 300 289 38 1441802 sel 1;
#P window setfont Times 10.;
#P comment 262 196 321 1310730 Gets the timing , rate , and volume information of the movie clip when it loads;
#P window linecount 2;
#P comment 247 62 115 1310730 Stop and start the movie at its current time position;
#P window linecount 1;
#P comment 479 75 91 1310730 Reset the looppoints;
#P comment 371 39 191 1310730 Change the movie’s playback rate and volume;
#P comment 620 408 139 1310730 Set the looppoints for the movie;
#P window setfont “Fixedwidth Serif” 10.;
#P newex 609 464 32 1441802 pack;
#P message 478 91 158 1441802 looppoints , getlooppoints;
#P message 609 488 103 1441802 looppoints $1 $2;
#P message 476 360 50 1441802 size $1;
#P user rslider 609 425 141 18 2836 1 0 0 0;
#P flonum 367 75 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 418 75 38 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 418 91 43 1441802 vol $1;
#P message 367 91 50 1441802 rate $1;
#P window setfont Times 10.;
#P comment 323 408 268 1310730 Change when the movie is stopped to ‘scrub’ the movie playback;
#P comment 454 269 108 1310730 Movie timescale and fps.;
#P window setfont “Fixedwidth Serif” 10.;
#P message 286 385 43 1441802 set $1;
#P flonum 418 268 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 374 268 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont Times 10.;
#P comment 225 325 59 1310730 Current time;
#P comment 220 408 63 1310730 Current frame;
#P window setfont “Fixedwidth Serif” 10.;
#P number 286 408 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 286 360 27 1441802 /;
#P number 286 324 51 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont Times 10.;
#P comment 333 385 58 1310730 Total frames;
#P comment 341 325 50 1310730 Total time;
#P comment 471 302 142 1310730 Timescale/Fps=time values/frame;
#P window setfont “Fixedwidth Serif” 10.;
#P number 396 385 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 396 360 27 1441802 /;
#P number 396 325 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 438 325 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 438 302 32 1441802 / 1.;
#P newex 242 266 68 1441802 unpack s 0;
#P newex 242 240 369 1441802 route read time duration timescale fps rate vol looppoints;
#P message 242 178 308 1441802 getfps , gettimescale , getduration , getrate , getvol;
#P message 286 430 53 1441802 frame $1;
#P message 312 91 38 1441802 start;
#P message 279 91 32 1441802 stop;
#P user jit.pwindow 54 235 162 122 0 1 0 0 1 0;
#P window setfont Times 10.;
#P comment 24 39 29 1310730 Open;
#P comment 70 86 26 1310730 Play;
#P window setfont “Fixedwidth Serif” 10.;
#P message 169 61 43 1441802 time 0;
#P message 152 61 14 1441802 1;
#P button 152 39 15 0;
#P newex 55 105 55 1441802 metro 40;
#P toggle 55 85 15 0;
#P message 22 53 113 1441802 read crashtest.mov;
#P newex 55 209 128 1441802 jit.qt.movie 320 240;
#B color 5;
#P window setfont Times 10.;
#P comment 167 39 44 1310730 Restart;
#P user panel 49 202 174 166;
#X brgb 127 255 255;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 18 35 121 42;
#X brgb 255 127 255;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 245 35 400 80;
#X brgb 127 127 255;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 217 405 552 46;
#X brgb 127 255 127;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 2 77 128 74;
#X brgb 255 255 127;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P fasten 44 1 48 1 745 457 636 457;
#P connect 48 0 46 0;
#P connect 44 0 48 0;
#P fasten 20 7 44 0 555 294 614 294;
#P fasten 45 0 44 0 481 391 614 391;
#P connect 24 0 25 0;
#P fasten 24 0 45 0 401 347 481 347;
#P fasten 36 0 22 1 423 286 465 286;
#P connect 22 0 23 0;
#P fasten 35 0 22 0 379 292 443 292;
#P connect 20 4 36 0;
#P connect 42 0 41 0;
#P fasten 20 6 42 0 511 264 706 264 706 56 423 56;
#P fasten 23 0 31 1 443 354 308 354;
#P fasten 23 0 25 1 443 354 418 354;
#P connect 25 0 26 0;
#P fasten 20 2 24 0 335 279 352 279 352 312 401 312;
#P connect 20 3 35 0;
#P connect 43 0 40 0;
#P fasten 20 5 43 0 467 264 706 264 706 56 372 56;
#P connect 21 1 54 0;
#P connect 32 0 18 0;
#P connect 37 0 32 0;
#P connect 31 0 37 0;
#P connect 30 0 31 0;
#P fasten 20 1 30 0 291 262 343 262 343 318 291 318;
#P connect 20 0 21 0;
#P fasten 6 1 20 0 178 233 247 233;
#P fasten 54 0 19 0 305 311 234 311 234 174 247 174;
#P fasten 10 0 12 0 157 57 174 57;
#P connect 10 0 11 0;
#P connect 6 0 15 0;
#P fasten 7 0 6 0 27 124 5 124 5 158 60 158;
#P connect 55 0 6 0;
#P fasten 46 0 6 0 614 522 771 522 771 158 60 158;
#P fasten 47 0 6 0 483 158 60 158;
#P fasten 40 0 6 0 372 158 60 158;
#P fasten 41 0 6 0 423 158 60 158;
#P fasten 18 0 6 0 291 457 22 457 22 195 60 195;
#P fasten 17 0 6 0 317 158 60 158;
#P fasten 16 0 6 0 284 158 60 158;
#P fasten 12 0 6 0 174 158 60 158;
#P fasten 19 0 6 0 247 198 60 198;
#P connect 9 0 55 0;
#P connect 9 0 6 0;
#P connect 8 0 9 0;
#P fasten 11 0 8 0 157 81 60 81;
#P window clipboard copycount 56;

#134952

You must be logged in to reply to this topic.