I am trying to do a basic emotion recognition with fisherface in python however I can't seem to get past the below error. It is trying to read .jpg files in folders. I have re-installed python and OpenCV(4.1.0) but still same error.
Here is the code that fails:
emotions = ["anger", "neutral", "contempt", "disgust", "happy", "happy", "sadness", "surprise"] #Emotion list
fishface = cv2.face.FisherFaceRecognizer_create() #Initialize fisher face classifier
def get_files(emotion):
files = glob.glob("C:\\Users\\Noel\\Documents\\Project AI\\Phyton\\dataset\\%s\\*" %emotion)
random.shuffle(files)
This is the error message:
error: OpenCV(4.1.0) C:\projects\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
I tried arranging the path and also tried to move the folder to a new location.