This is pretty easy to do if you can write in Python. Here's a good article on using an open-source computer vision package to detect overall picture blurriness:
Here's a quick script that will sort pictures into blurred/ok directories:
# Sorts pictures in current directory into two subdirs, blurred and ok
FOCUS_THRESHOLD = 80
BLURRED_DIR = 'blurred'
OK_DIR = 'ok'
blur_count = 0
files = [f for f in os.listdir('.') if f.endswith('.jpg')]
for infile in files:
print('Processing file %s ...' % (infile))
cv_image = cv2.imread(infile)
# Covert to grayscale
gray = cv2.cvtColor(cv_image, cv2.COLOR_BGR2GRAY)
# Compute the Laplacian of the image and then the focus
# measure is simply the variance of the Laplacian
variance_of_laplacian = cv2.Laplacian(gray, cv2.CV_64F).var()
# If below threshold, it's blurry
if variance_of_laplacian < FOCUS_THRESHOLD:
blur_count += 1
print('Done. Processed %d files into %d blurred, and %d ok.' % (len(files), blur_count, len(files)-blur_count))
Your trickiest issue will be to install python and opencv into your system. Google python3 for your OS, and how to install pip with it, you can use pip3 to install opencv. Or, there are some python+opencv pre-build installs as well. You don't need the newest version of opencv to get this script to run.
The script works great, and it measures overall picture blurriness. This is good for most pictures. However, overall picture measurement means those one-face-and-bokeh-filled-background photographs will be put into the blurry directory, and you'll have to sort them back out. Anyway, you should go through the blurred pictures to make sure there's no misplaced keepers in there.
I hope this script speeds up your workflow.
A neat improvement to this script is to include face detection, and compute the blurriness on the biggest faces in the photograph, and use those values for the blurriness threshold, defaulting to the overall bluriness if no faces are detected. I'll leave that improvement up to you!