Parameters of Thresholds function

Hello, I am an absolute beginner for the openmv. I am working on the colour detection and colour tracking. But I am not able to understand the parameters which we are passing to the function ‘thresholds’. so please explain me that parameters.


did you try to read the docs?
" thresholds must be a list of tuples [(lo, hi), (lo, hi), ..., (lo, hi)] defining the ranges of color you want to track. You may pass up to 32 threshold tuples in one call. For grayscale images each tuple needs to contain two values - a min grayscale value and a max grayscale value. Only pixel regions that fall between these thresholds will be considered. For RGB565 images each tuple needs to have six values (l_lo, l_hi, a_lo, a_hi, b_lo, b_hi) - which are minimums and maximums for the LAB L, A, and B channels respectively. For easy usage this function will automatically fix swapped min and max values. Additionally, if a tuple is larger than six values the rest are ignored. Conversely, if the tuple is too short the rest of the thresholds are assumed to be at maximum range."

please for more info read find blobs fuction on docs…

1 Like


but i have one more doubt

how to determine these values and from where we get these values

and where can i get the above mentioned document

You just use the Threshold Editor.

See Tools->Machine Vision->Threshold Editor in OpenMV.

You can drag a region of interest with your mouse directly on the image and see the histogram values below…very useful…
For docs please visit :