Jan 1, 2007 at 10:14pm
The patch i’m working on is tracking the movement of a person and the white t-shirt he is wearing is clashing with colours of his hands and feet which I am trying to track.
I have used the cv.jit.blobs.bounds object to select the t-shirt and have replaced this region with a black square using the jit.lcd object, which will make colour tracking easier.
The problem I have is that parts of the colours on the person’s hands and feet are also replaced by black squares because parts of them are the same frequency of colour contained in the white t-shirt.
I know that I can single out the bounds of the largest blob by using the jit.op object with the arguement:
jit.op @op == @val 1
However, when I put this object where I thought it would go in the chain of objects, it wouldnt output any values. Having moved the object around the chain of objects, I still can’t work out how to only output the values for the largest 1 or 2 blobs.
If anyone could help me out I would very much appreciate it, I’ve been tearing my hair out over this for ages :(
Jan 2, 2007 at 9:53pm
I’m not sure from your message exactly where you are going wrong.
[cv.jit.label @charmode 1 @mode 1]
This will paint the largest blob white and leave everything else black. You can track this blob using either cv.jit.centroids or jit.findbounds.
Now, if you do:
You get bounds for every single blob in your image. The first blob that comes out is the biggest, so you can ignore it, using only the others. Like this:
#P window setfont “Sans Serif” 9.;
You must be logged in to reply to this topic.