title: How to merge overlapping rectangle in OpenCV ? (Python)
body: <p>I'm using two haarcascade algorythm (frontal and profil) at the same time to improve the face detection.</p>
  
  <p><strong>I've found that I need to use <code>cv2.GroupRectangles(rectList, groupThreshold)</code> but it's not working.</strong> The program returns me this : </p>
  
  <blockquote>
    <p>The true value of a array with more than one element is ambigious. Use
    a.any() or a.all()</p>
  </blockquote>
  
  <p>How can i integrate it into my code ?</p>
  
  <pre><code>import cv2
  
      image=cv2.imread("/home/pi/Downloads/test.jpg")
      face_cascade=cv2.CascadeClassifier("Path of first algorithm")
      profil_cascade=cv2.CascadeClassifier("Path of second algorithm")
  
      gray=cv2.cvtColor(image,cv2.COLOR_BGR2GRAY)
      face=face_cascade.detectMultiScale(gray, 1.06, 5)
      profil=profil_cascade.detectMultiScale(gray, 1.1, 5)
      cv2.groupRectangles(face and profil, 2)
  
      print("I've found "+str(len(face)+len(profil))+ " face(s)")
  
      for (x,y,w,h) in face:
          cv2.rectangle(image,(x,y),(x+w,y+h),(0,0,255),2)
      for (x,y,w,h) in profil:
          cv2.rectangle(image,(x,y),(x+w,y+h),(0,255,0),2)
  
      cv2.imwrite("/home/pi/Download/result.jpg", image)
  </code></pre>
  
  <p><strong>Thank you in advance, and have a nice day :)</strong></p>