Jit.findbounds trouble…

Jun 7, 2006 at 3:32pm

Jit.findbounds trouble…

im trying to track colours from a live video feed using the findbounds object…it works fine with my feed through the jit.qt.grab and then through jit.brcosa. the problem is that i want to remove various colours from the image so using ‘jit.op @op -’ i take away a .tiff image feed of the ‘backround’ of the live feed im working with, after i do this the findbounds fails to recognise any coloured points i get it to track.

is there a problem feeding the outpuf of the minus operator into findbounds? as when i make the image coming out of the minus operator exactly the same as what the feed from the above stated line it still refuses to find the ‘points’.

any help would be great.
Cheers.

#26328
Jun 7, 2006 at 4:08pm

Chances are, it’s not working because the color you’re trying to track
is no longer there. Try looking at the output of the jit.op. The image
you will get is actually a difference image, meaning that each color
represents the difference between the color values of your 2 input
matrices. To remove the background without changing the color of your
image, you will need to do something more like this:

#P window setfont “Sans Serif” 9.;
#P window linecount 2;
#P comment 187 162 76 196617 set difference threshold;
#P flonum 151 162 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P comment 149 94 56 196617 live feed;
#P inlet 55 95 15 0;
#P inlet 134 94 15 0;
#P newex 134 131 66 196617 jit.rgb2luma;
#P newex 55 132 66 196617 jit.rgb2luma;
#P user jit.pwindow -1 243 82 62 0 1 0 0 1 0;
#P newex 0 218 65 196617 jit.op @op *;
#P newex 55 186 106 196617 jit.op @op >;
#P newex 55 161 89 196617 jit.op @op absdiff;
#P window linecount 2;
#P comment 25 83 56 196617 background image;
#P connect 1 0 2 0;
#P connect 2 0 3 1;
#P connect 10 0 2 1;
#P connect 7 0 3 0;
#P connect 7 0 6 0;
#P connect 8 0 5 0;
#P connect 6 0 1 1;
#P connect 5 0 1 0;
#P connect 3 0 4 0;
#P window clipboard copycount 12;

Cheers,
Andrew B.

#78590
Jun 7, 2006 at 4:47pm

no, thats my point..the colours are there when i put it through the jit.op, im only removing a indifferent background colour…and even making exactly the same image but through the jit.op it doesnt recognise the colours it did previously without jit.op.

#78591
Jun 7, 2006 at 5:43pm

It sounds like a simple example of your problem will benefit the
discussion. Without this, we can only make vague assumptions about what
is up.

Andrew

#78592
Feb 15, 2010 at 6:48pm

Yes. Please a simple example! i’ve been trying to connect the jit.findbounds object to a jit.qt.grab object and its all in vain! please helppp! my project is going to fail :(

#78593

You must be logged in to reply to this topic.