class skimage.feature.Cascade  
Bases: object Class for cascade of classifiers that is used for object detection. The main idea behind cascade of classifiers is to create classifiers of medium accuracy and ensemble them into one strong classifier instead of just creating a strong one. The second advantage of cascade classifier is that easy examples can be classified only by evaluating some of the classifiers in the cascade, making the process much faster than the process of evaluating a one strong classifier.  Attributes 
 
epscnp.float32_t 

Accuracy parameter. Increasing it, makes the classifier detect less false positives but at the same time the false negative score increases.  
stages_numberPy_ssize_t 

Amount of stages in a cascade. Each cascade consists of stumps i.e. trained features.  
stumps_numberPy_ssize_t 

The overall amount of stumps in all the stages of cascade.  
features_numberPy_ssize_t 

The overall amount of different features used by cascade. Two stumps can use the same features but has different trained values.  
window_widthPy_ssize_t 

The width of a detection window that is used. Objects smaller than this window can’t be detected.  
window_heightPy_ssize_t 

The height of a detection window.  
stagesStage* 

A link to the c array that stores stages information using Stage struct.  
featuresMBLBP* 

Link to the c array that stores MBLBP features using MBLBP struct.  
LUTscnp.uint32_t* 

The ling to the array with look-up tables that are used by trained MBLBP features (MBLBPStumps) to evaluate a particular region.      
__init__()  
Initialize cascade classifier.  Parameters 
 
xml_filefile’s path or file’s object 

A file in a OpenCv format from which all the cascade classifier’s parameters are loaded.  
epscnp.float32_t 

Accuracy parameter. Increasing it, makes the classifier detect less false positives but at the same time the false negative score increases.     
  
detect_multi_scale()  
Search for the object on multiple scales of input image. The function takes the input image, the scale factor by which the searching window is multiplied on each step, minimum window size and maximum window size that specify the interval for the search windows that are applied to the input image to detect objects.  Parameters 
 
img2-D or 3-D ndarray 

Ndarray that represents the input image.  
scale_factorcnp.float32_t 

The scale by which searching window is multiplied on each step.  
step_ratiocnp.float32_t 

The ratio by which the search step in multiplied on each scale of the image. 1 represents the exaustive search and usually is slow. By setting this parameter to higher values the results will be worse but the computation will be much faster. Usually, values in the interval [1, 1.5] give good results.  
min_sizetyple (int, int) 

Minimum size of the search window.  
max_sizetyple (int, int) 

Maximum size of the search window.  
min_neighbour_numberint 

Minimum amount of intersecting detections in order for detection to be approved by the function.  
intersection_score_thresholdcnp.float32_t 

The minimum value of value of ratio (intersection area) / (small rectangle ratio) in order to merge two detections into one.    Returns 
 
outputlist of dicts 

Dict have form {‘r’: int, ‘c’: int, ‘width’: int, ‘height’: int}, where ‘r’ represents row position of top left corner of detected window, ‘c’ - col position, ‘width’ - width of detected window, ‘height’ - height of detected window.     
  
eps 
  
features_number 
  
stages_number 
  
stumps_number 
  
window_height 
  
window_width