79782935

Date: 2025-10-05 10:51:49
Score: 1
Natty:
Report link

The problem arises form the parameters used in detectMultiScale() method, try different parameters for optimal results

import numpy as np
import cv2
from matplotlib import pyplot as plt

bodydetection = cv2.CascadeClassifier('cascades/haarcascade_fullbody.xml')
img = cv2.imread('/content/full-body-shot-of-young-blonde-happy-woman-isolated-on-white-background-ER3EPG.jpg')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
body = bodydetection.detectMultiScale(gray, 1.01, 2) # Further adjusted parameters
for (x,y,w,h) in body:
   cv2.rectangle(img,(x,y),(x+w,y+h),(0,255,0),2)

cv2_imshow(img)
cv2.waitKey(0)
cv2.destroyAllWindows()

Below is an example of my input image

Body Detection

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: ISAAC RITHARSON P