Grab quality jit.qt.grab

Dec 2, 2008 at 10:28pm

Grab quality jit.qt.grab

Just comparing the quality of my 640 x 480 web cam in both Max/Jitter and Quartz composer. Even with the quality set to max and trying the video modes the image in Jitter is pixelated a bit compared to QC.
Is this expected, or am I missing something? For my comparison I adapted the jit.qt.grab help file to be 640 x 480.

Carl

#41154
Dec 3, 2008 at 11:33am

Are you in vmode 1 or 2? I don’t believe that codec quality affects vmode 0.

jb

#146316
Dec 3, 2008 at 12:50pm

tried it in all settings including v2. Just looks a little rough (pixelated)compared to Quartz composer. I just wanted to know if this is expected. Anybody else ever do this comparison?

This is on a MacBook pro with a ATI Radeon X1600 and a built in iSight. 640 x 480

My problem is that the patch I have made in MAX is proving really hard (for me) to put together in Quartz Composer.

I really like working in Jitter.

#146317
Dec 3, 2008 at 1:20pm

Why don’t you post your patch so I can be sure that there’s nothing wrong there before looking into this.

jb

#146318
Dec 3, 2008 at 2:04pm

OK here is a basic example of the jit.qt.grab @ 640 x 480 and an example of the same thing in Quartz composer uploaded I hope.
The QC patch has little pixelation compared to Max/Jitter.

max v2;
#N vpatcher 546 44 1362 548;
#P origin 15 -3;
#P window setfont “Sans Serif” 9.;
#P newex 302 95 61 196617 delay 4500;
#P newex 231 94 61 196617 delay 4000;
#P message 353 133 14 196617 5;
#P number 353 175 35 9 0 5 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 353 196 79 196617 codecquality $1;
#P newex 62 196 46 196617 metro 2;
#P newex 158 93 61 196617 delay 3000;
#P newex 89 93 61 196617 delay 2000;
#P newex 62 26 48 196617 loadbang;
#P message 279 145 14 196617 2;
#P number 279 182 35 9 0 2 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 279 201 52 196617 vmode $1;
#P newex 123 287 113 196617 jit.window ug 640 480;
#P message 179 195 33 196617 close;
#P message 123 195 30 196617 open;
#P toggle 62 171 15 0;
#P toggle 517 160 15 0;
#P window setfont “Fixedwidth Serif” 10.;
#P newex 517 133 64 1441802 select 27;
#P newex 517 108 40 1441802 key;
#P toggle 605 212 15 0;
#P newex 605 190 70 1441802 select 104;
#P newex 605 165 40 1441802 key;
#P newex 564 241 212 1441802 sel 0 1;
#P window linecount 2;
#P message 564 262 98 1441802 ; max showmenubar;
#P message 665 262 98 1441802 ; max hidemenubar;
#P window linecount 1;
#P message 517 178 83 1441802 fullscreen $1;
#P window setfont “Sans Serif” 9.;
#P comment 566 306 134 196617 Esc for fullscreen;
#P newex 123 253 98 196617 jit.qt.grab 640 480;
#P fasten 19 0 12 0 67 107 67 107;
#P connect 12 0 22 0;
#P fasten 19 0 20 0 67 67 94 67;
#P fasten 20 0 13 0 94 152 128 152;
#P connect 13 0 0 0;
#P fasten 14 0 0 0 184 231 128 231;
#P fasten 16 0 0 0 284 234 128 234;
#P fasten 22 0 0 0 67 233 128 233;
#P fasten 23 0 0 0 358 232 128 232;
#P fasten 2 0 15 0 522 240 128 240;
#P connect 0 0 15 0;
#P fasten 19 0 21 0 67 67 163 67;
#P fasten 19 0 26 0 67 68 236 68;
#P fasten 21 0 18 0 163 136 284 136;
#P connect 18 0 17 0;
#P connect 17 0 16 0;
#P fasten 19 0 27 0 67 68 307 68;
#P fasten 26 0 25 0 236 122 358 122;
#P connect 25 0 24 0;
#P connect 24 0 23 0;
#P connect 9 0 10 0;
#P connect 10 0 11 0;
#P fasten 27 0 11 0 307 130 522 130;
#P connect 11 0 2 0;
#P fasten 8 0 5 0 610 234 569 234;
#P connect 5 0 4 0;
#P connect 6 0 7 0;
#P fasten 11 0 8 0 522 210 610 210;
#P connect 7 0 8 0;
#P connect 5 1 3 0;
#P pop;

#146319
Dec 3, 2008 at 5:05pm

OK, I tested your patch side by side with QC using my MBP’s built-in iSight. The only thing I could demonstrate is that QC neglects to close the camera driver when I quit it, and that it’s hard to use (for me). I saw no difference in quality. I’m in a kind of dark room, though.

Maybe you can post some TIFFs or something and show me what you are seeing.

jb

#146320
Dec 3, 2008 at 6:27pm

Ok this is the Quartz Composer version .png

will post the Jitter one in the next post

#146321
Dec 3, 2008 at 6:31pm

The Jitter version has significantly more pixelation. This is noticeable on the side of my face and hat.

To some people this may seem a negligible difference but to me Quartz just looks so much better.

#146322
Dec 3, 2008 at 6:59pm

OK, I think I see what’s going on. It appears that you’re capturing at 640×480 and then blowing up to (big)x(big) and are seeing pixels as you scale. QC almost certainly uses a GL surface for displaying images, which you could best recreate using jit.gl.videoplane and friends. Try hooking the output of jit.qt.grab to the input of the jit.gl.videoplane help file (use send or something) and see if the pixels go away.

jb

#146323
Dec 3, 2008 at 8:37pm

Well, clearly they are displaying things differently, as your aspect ratios are also different :P

#146324
Dec 3, 2008 at 9:53pm

Yes. A feeble mistake but only with interpolation on can I get the same quality as I get in quartz. I have now set the rect attribute to my screen dimensions and turned on interpolation. The result is very subtly different. In fact I prefer the image in Jitter, seems to have more detail.

I have been on Quartz for so long I am re-un-learning some stuff.

So if my screen res is 1680 x 1050 and I send it the 640 x 480 image with interpolation on my patch is now right?

As regards the aspect ratio is that not what is also happening with the Quartz example i.e a 640 x 480 image then displayed full screen 1680 x 1050?

Anyway they look identical now.

#146325
Dec 3, 2008 at 9:58pm

Like this?

max v2;
#N vpatcher 546 44 1362 548;
#P origin 15 -3;
#P toggle 292 247 15 0;
#P window setfont “Sans Serif” 9.;
#P message 292 272 52 196617 interp $1;
#P newex 302 95 61 196617 delay 4500;
#P newex 231 94 61 196617 delay 4000;
#P message 353 133 14 196617 5;
#P number 353 175 35 9 0 5 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 353 196 79 196617 codecquality $1;
#P newex 62 196 46 196617 metro 2;
#P newex 158 93 61 196617 delay 3000;
#P newex 89 93 61 196617 delay 2000;
#P newex 62 26 48 196617 loadbang;
#P message 279 145 14 196617 2;
#P number 279 182 35 9 0 2 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 279 201 52 196617 vmode $1;
#P newex 123 305 125 196617 jit.window ug 1680 1050;
#P message 179 195 33 196617 close;
#P message 123 195 30 196617 open;
#P toggle 62 171 15 0;
#P toggle 517 160 15 0;
#P window setfont “Fixedwidth Serif” 10.;
#P newex 517 133 64 1441802 select 27;
#P newex 517 108 40 1441802 key;
#P toggle 605 212 15 0;
#P newex 605 190 70 1441802 select 104;
#P newex 605 165 40 1441802 key;
#P newex 564 241 212 1441802 sel 0 1;
#P window linecount 2;
#P message 564 262 98 1441802 ; max showmenubar;
#P message 665 262 98 1441802 ; max hidemenubar;
#P window linecount 1;
#P message 517 178 83 1441802 fullscreen $1;
#P window setfont “Sans Serif” 9.;
#P comment 566 306 134 196617 Esc for fullscreen;
#P newex 123 253 98 196617 jit.qt.grab 640 480;
#P fasten 19 0 12 0 67 107 67 107;
#P connect 12 0 22 0;
#P fasten 19 0 20 0 67 67 94 67;
#P fasten 20 0 13 0 94 152 128 152;
#P connect 13 0 0 0;
#P fasten 14 0 0 0 184 231 128 231;
#P fasten 16 0 0 0 284 234 128 234;
#P fasten 22 0 0 0 67 233 128 233;
#P fasten 23 0 0 0 358 232 128 232;
#P fasten 2 0 15 0 522 240 128 240;
#P connect 0 0 15 0;
#P fasten 28 0 15 0 297 295 128 295;
#P fasten 19 0 21 0 67 67 163 67;
#P fasten 19 0 26 0 67 68 236 68;
#P fasten 21 0 18 0 163 136 284 136;
#P connect 18 0 17 0;
#P connect 17 0 16 0;
#P fasten 27 0 29 0 307 179 297 179;
#P connect 29 0 28 0;
#P fasten 19 0 27 0 67 68 307 68;
#P fasten 26 0 25 0 236 122 358 122;
#P connect 25 0 24 0;
#P connect 24 0 23 0;
#P connect 9 0 10 0;
#P connect 10 0 11 0;
#P fasten 27 0 11 0 307 130 522 130;
#P connect 11 0 2 0;
#P fasten 8 0 5 0 610 234 569 234;
#P connect 5 0 4 0;
#P connect 6 0 7 0;
#P fasten 11 0 8 0 522 210 610 210;
#P connect 7 0 8 0;
#P connect 5 1 3 0;
#P pop;

#146326
Dec 4, 2008 at 10:57am

No, like this: let your graphics card interpolate and scale for you.

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 107 401 58 196617 t b b erase;
#P newex 108 473 122 196617 jit.gl.render ug @ortho 1;
#P newex 183 371 171 196617 jit.gl.videoplane ug @scale 1.3 1. 1.;
#P newex 362 155 61 196617 delay 4500;
#P newex 291 154 61 196617 delay 4000;
#P message 413 193 14 196617 5;
#P number 413 235 35 9 0 5 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 413 256 79 196617 codecquality $1;
#P newex 73 246 51 196617 qmetro 2;
#P newex 218 153 61 196617 delay 3000;
#P newex 149 153 61 196617 delay 2000;
#P newex 122 86 48 196617 loadbang;
#P message 339 205 14 196617 2;
#P number 339 242 35 9 0 2 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 339 261 52 196617 vmode $1;
#P newex 390 384 125 196617 jit.window ug 1680 1050;
#P message 239 255 33 196617 close;
#P message 183 255 30 196617 open;
#P toggle 73 221 15 0;
#P toggle 577 220 15 0;
#P window setfont “Fixedwidth Serif” 10.;
#P newex 577 193 64 1441802 select 27;
#P newex 577 168 40 1441802 key;
#P toggle 665 272 15 0;
#P newex 665 250 70 1441802 select 104;
#P newex 665 225 40 1441802 key;
#P newex 624 301 212 1441802 sel 0 1;
#P window linecount 2;
#P message 624 322 98 1441802 ; max showmenubar;
#P message 725 322 98 1441802 ; max hidemenubar;
#P window linecount 1;
#P message 577 238 83 1441802 fullscreen $1;
#P window setfont “Sans Serif” 9.;
#P comment 626 366 134 196617 Esc for fullscreen;
#P newex 183 313 98 196617 jit.qt.grab 640 480;
#P fasten 2 0 15 0 582 300 395 300;
#P connect 0 0 28 0;
#P connect 22 0 30 0;
#P connect 12 0 22 0;
#P connect 30 0 29 0;
#P connect 30 1 0 0;
#P connect 30 2 29 0;
#P connect 5 1 3 0;
#P connect 7 0 8 0;
#P connect 11 0 2 0;
#P fasten 11 0 8 0 582 270 670 270;
#P connect 6 0 7 0;
#P connect 5 0 4 0;
#P fasten 8 0 5 0 670 294 629 294;
#P fasten 27 0 11 0 367 190 582 190;
#P connect 10 0 11 0;
#P connect 9 0 10 0;
#P connect 24 0 23 0;
#P connect 25 0 24 0;
#P fasten 26 0 25 0 296 182 418 182;
#P fasten 19 0 20 0 127 127 154 127;
#P fasten 19 0 21 0 127 127 223 127;
#P fasten 19 0 26 0 127 128 296 128;
#P fasten 19 0 27 0 127 128 367 128;
#P connect 17 0 16 0;
#P connect 18 0 17 0;
#P fasten 21 0 18 0 223 196 344 196;
#P fasten 23 0 0 0 418 292 188 292;
#P fasten 16 0 0 0 344 294 188 294;
#P fasten 14 0 0 0 244 291 188 291;
#P connect 13 0 0 0;
#P fasten 20 0 13 0 154 212 188 212;
#P window clipboard copycount 31;

#146327

You must be logged in to reply to this topic.