Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

Face Detection using Python

$
0
0

@vatsy61 wrote:

Hi all,

I am trying another project which is based on face detection from images using python. I have done some parts of it but I am stuck at a particular part in the project. Please find the link and the error that I am facing and want to know how to solve this error.

Link: https://realpython.com/face-recognition-with-python/

Code:
import sys
imagePath = sys.argv[1]
cascPath = “C:/Users/Vatsal Shah/Desktop/Vatsal/Rutgers/Notes for Sem 3/abc/haarcascade_frontalface_default.xml”

faceCascade = cv2.CascadeClassifier(cascPath)
image = cv2.imread(imagePath)

cv2.imshow(“Faces found”, image)
cv2.waitKey(0)

Error:

error Traceback (most recent call last)
in ()
----> 1 cv2.imshow(“Faces found”, image)
2 cv2.waitKey(0)

error: OpenCV(3.4.1) C:\projects\opencv-python\opencv\modules\highgui\src\window.cpp:356: error: (-215) size.width>0 && size.height>0 in function cv::imshow

If you can look out let me know.

Best,
vatsy61

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles