detect(self,
img,
scale_factor=1.1,
min_neighbors=1,
group_overlapping=True)
| source code
|
Detect objects from a grayscale image.
Input:
img: a POINTER(IplImage) of depth IPL_DEPTH_8U and 1 or 3 channels
scale_factor: The factor by which the search window is scaled
between the subsequent scans, for example, 1.1 means increasing window by 10%.
min_neighbors: Minimum number (minus 1) of neighbor rectangles that makes up an object.
All the groups of a smaller number of rectangles than min_neighbors-1 are rejected.
If min_neighbors is 0, the function does not any grouping at all and returns all
the detected candidate rectangles, which may be useful if the user wants to apply
a customized grouping procedure.
group_overlapping: if True then overlapping locations are grouped
Output:
z: an 'int' numpy.array of tuples (x,y,w,h) representing the object locations
|