cv.jit Blob Tracking - only biggest Blob Coordinates

    May 15 2019 | 2:02 pm
    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?

    • May 17 2019 | 10:11 am
      any suggestions?
    • May 20 2019 | 9:48 pm
      just send the results of the jit.op to cv.jit.blobs.centroids
    • May 21 2019 | 1:55 pm
      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)
    • May 21 2019 | 2:38 pm
      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....
    • May 21 2019 | 3:03 pm
      okay thank you, would you do this with a getcell message?
    • May 21 2019 | 3:45 pm
      A couple of options
      hope this helps,
    • May 23 2019 | 9:52 pm
      Perfect! thank you