can someone please share some knowledge to a slight jitter-newbe?
I would really appreciate all views or suggestions that could help me solve my dilemma.
I need to track balls on a pool-table, find each balls XY-value and color. Different colors trigger different sounds in the pool-table hole closest to the balls location on the pool-table.
This is my plan:
cv.jit.touches track all balls, XY-values are used to cut each blobs matrix (pool-ball size). Matrix sendt to jit.findbounds, color analyzed and given a color-ID connected to cv.jit.touches blob-ID.
This color-ID stay with the blob-ID until it is lost or a new blob is created, then a new color-check and ID is given.
This is my problem:
Pool-cue, players bodies and colors produce problematic blobs in cv.jit.touches. I need a way to remove this "noise" or make less influential.
jit.qt.grab (320 240, 120 fps matrix) -> jit.rgb2luma ->
jit.op @op > @val 155 (all balls visible, no noise) ->
cv.jit.label @charmode 1 @threshold 1 (low setting 2 track all balls) ->
(here I tried to use jit.op min/max here to remove larger blobs than the pool-balls but could not do it)
cv.jit.blobs.centroids -> send matrix to cv.jit.touches
Blobs with smaller area than the "threshold" value will be rejected, how make cv.jit.label reject blobs that are bigger than some threshold value?
And how should this matrix be sent and accepted by cv.jit.touches to track the blobs > && < than threshold $1 && $2?
I would be very happy for any information that would help me solve this, I am sorry for not being so intelligent and knowable within jitter.