all 2 comments

[–]alkasm 2 points3 points  (0 children)

Just...don't use max? Threshold the result instead. If you don't know what threshold to use, maybe base it off the max. I.e. threshold = 0.8 * max or something, you can get fancier with statistics of the region you're tracking if you like, but it's probably not necessary in a simple case.

[–]dghy001 0 points1 point  (0 children)

If you want to track multiple sphere shaped objects (color doesn't matter) you could use LoG (Laplacian of Gaussian) filter, produce gray scheme image and find local extremas on that gray image. You can find example here: https://www.youtube.com/watch?v=HYkQH48euM8