How can I update the Android Gallery after a photo?
You can force the MediaScanner to add a specific file (or let it know it was deleted or modified) sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(myNewFile)));
You can force the MediaScanner to add a specific file (or let it know it was deleted or modified) sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(myNewFile)));
Refer to this line of code, it failed on checking that cascade is non empty. Please check path to XML files with trained cascades. You may need to specify full path to XML’s like this: face_cascade = cv2.CascadeClassifier(‘D:\opencv\data\haarcascades\haarcascade_frontalface_default.xml’) eye_cascade = cv2.CascadeClassifier(‘D:\opencv\data\haarcascades\haarcascade_eye.xml’) Or just put this files to directory containig your script.