Skip to content

Commit

Permalink
removing haar casc option
Browse files Browse the repository at this point in the history
  • Loading branch information
Shantnu Tiwari committed Apr 23, 2017
1 parent bea69f9 commit 628f788
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Run the code like this:

*python face_detect.py abba.png haarcascade_frontalface_default.xml*
*python face_detect.py abba.png*

If you want to understand how the code works, the details are here:

Expand Down
2 changes: 1 addition & 1 deletion face_detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Get user supplied values
imagePath = sys.argv[1]

This comment has been minimized.

Copy link
@shubham-xxx

shubham-xxx Sep 19, 2020

cv2.error: OpenCV(4.4.0) error is occuring.......

cascPath = sys.argv[2]
cascPath = "haarcascade_frontalface_default.xml"

# Create the haar cascade
faceCascade = cv2.CascadeClassifier(cascPath)
Expand Down
4 changes: 2 additions & 2 deletions face_detect_cv3.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Get user supplied values
imagePath = sys.argv[1]
cascPath = sys.argv[2]
cascPath = "haarcascade_frontalface_default.xml"

# Create the haar cascade
faceCascade = cv2.CascadeClassifier(cascPath)
Expand All @@ -21,7 +21,7 @@
#flags = cv2.CV_HAAR_SCALE_IMAGE
)

print "Found {0} faces!".format(len(faces))
print("Found {0} faces!".format(len(faces)))

# Draw a rectangle around the faces
for (x, y, w, h) in faces:
Expand Down

0 comments on commit 628f788

Please sign in to comment.