cv.jit Blob Tracking - only biggest Blob Coordinates
Hello,
I am working on a juggle tracker and for this I am using open cv and colour Tracking. Right now it is working unstable, so what I want to do now is to only track the "biggest blob". In the help file of cv.jit.label it says, that I am supposed to use mode 1 and then I can get the biggest blob using: jit.op @op == @val 1.
When I use the objects this way, I can get the drawing of the biggest blob, but I don't to how to extract the x/y coordinates of it. I also get a lot of -1 numbers.
Can anybody help me with extracting x/y of the biggest blob?
any suggestions?
just send the results of the jit.op to cv.jit.blobs.centroids
thanks for the reply! I tried that, but what I get is a Matrix with one row and a lot of cells that have -1, -1, 0 inside and only the last cell seems to contain the coordinates of the blob. (See the picture)
Hm. I can reproduce, and I'm not sure what that's about. If I were you, I would just skip the [jit.==], and just take the first cell of cv.jit.blobs.centroids, which will by default be the biggest blob. So spill out the matrix coming out of there, and just take the first cell values....
okay thank you, would you do this with a getcell message?
A couple of options
hope this helps,
\M
Perfect! thank you