Forums > Jitter

color tracking coordinates goes wrong when viewing full screen

May 11, 2011 | 10:21 am

Hi there, first post!

I’m building a live video chromakey thingy, where it should be possible to grab a physical object in a color and track it, so that that object becomes a 3d object on the live video.

So far it’s going good, but I want to project it on a wall, therefore in full screen. I have used the patch to color track from Robert Ramirez in this thread http://www.cycling74.com/forums/topic.php?id=32257. The problem is that when I go full screen in both Robert Ramirez patch and my patch with live video, the color tracked object stays in the upper left corner.

I believe the problem is that the coordinates from the color tracker is from 320 to 240. Could this be the problem? And how do I fix it?


May 11, 2011 | 12:33 pm

Here is Robert Ramirez example patch

– Pasted Max Patch, click to expand. –

May 11, 2011 | 2:33 pm

"I believe the problem is that the coordinates from the color tracker is from 320 to 240. Could this be the problem? And how do I fix it?"

Yes, this is the cause of the problem. The (quick) fix is to determine a ratio of pixels for fullscreen mode. In this hacked/modified version of the example patch by Robert, the scaling value for both the x and y co-ords is changed to 4.0 when the fullscreen toggle is a activated. This scaling value is not quite the right value for the fullscreen value on my machine (=1440×900 – and quite probably not on yours either) – the original image is somewhat stretched in fullscreen mode anyway as the ratio of width to height of the fullscreen image is not 4:3 (320:240). I’t will be up to you to determine the best ratio(s) for your uses, but I would suggest working to the least distorted image in fullscreen if that is your final destination.

– Pasted Max Patch, click to expand. –

May 15, 2011 | 12:21 am

jit.displays can also help determine overall size and screen proportion. then use [scale] to go from 320 x 240 to (whatever your screen is).

(didn’t look at patches so maybe jit.displays is already there)


May 17, 2011 | 8:04 pm

Or the screensize object. Just learned about that one recently.


Viewing 5 posts - 1 through 5 (of 5 total)