Closed JagjitBhatia-UIC closed 5 years ago
Yes, this is developed for an older OpenCV version. Unfortunately, the change you suggest would destroy backwards compatibility. An acceptable alternatives could be a try-except attempt (or, even better, detecting what version of OpenCV is used and using the appropriate flags from thereon). In addition, it should be changed for all OpenCV calls that hinge on the older versions, not just this one.
The line "flags = cv2.cv.CV_HAAR_SCALE_IMAGE" was throwing an error. This is most likely because the updated Python OpenCV library no longer supports importing the legacy cv module. For more information, please visit the link below:
https://stackoverflow.com/questions/36242860/attribute-error-while-using-opencv-for-face-recognition