基础怎么用官网说的太多了,但是就博主使用的过程中,有些坑还是要提醒下同样使用OpenMv的同学。
首先贴出官网对于该函数的说明:
image.find_blobs(thresholds[, roi=Auto,x_stride=2, y_stride=1, invert=False, area_threshold=10,pixels_threshold=10, merge=False, margin=0, threshold_cb=None,merge_cb=None])
Finds all blobs (connected pixel regionsthat pass a threshold test) in the image and returns a list of blob objects whichdescribe each blob. Please see the blob object moremore information.
thresholds must be a listof tuples [(lo, hi), (lo, hi), ..., (lo, hi)] defining theranges of color you want to track. You may pass up to 16 threshold tuples inone image.find_blobs call. For grayscale images each tupleneeds to contain two values - a min grayscale value and a max grayscale value.Only pixel regions that fall between these thresholds will be considered. ForRGB565 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 channelsrespectively. For easy usage this function will automatically fix swapped minand max values. Additionally, if a tuple is larger than six values the rest areignored. Conversely, if the tuple is too short the rest of the thresholds areassumed to be zero.