A lightroom plugin that lets you discard all blurry photos from catalogue during import
Computer vision, Lightroom, plugin, extension, python, Lua, Machine Learning
- Blur detection: https://www.pyimagesearch.com/2015/09/07/blur-detection-with-opencv/
- Good discussion: https://stackoverflow.com/questions/7765810/is-there-a-way-to-detect-if-an-image-is-blurry
- Fourier transform:
- Paper, Analysis of focus measure operators for shape-from-focus : https://pdfs.semanticscholar.org/8c67/5bf5b542b98bf81dcf70bd869ab52ab8aae9.pdf
- If have time and energy, try using a focus detect with lower average computation time (Table 5)
- http://www.cse.cuhk.edu.hk/leojia/all_final_papers/blur_detect_cvpr08.pdf
- Saliency detection (only select the area of the picture that "stands out," or is "salient." This way pictures with small subjects and large bokeh backgrounds won't flag as false positives.):
- "Laplacian edge detection": http://www.owlnet.rice.edu/~elec539/Projects97/morphjrks/laplacian.html
- Image normalization:
- Histogram stretching:
- Normalizing brightness: https://stackoverflow.com/a/38138050
- Using RAW images in numpy: https://pypi.python.org/pypi/rawpy
- Some code for converting matrix of image to black and white: https://imagepy.wordpress.com/2015/11/21/raw-image-processing-in-python-an-example/
- https://stackoverflow.com/questions/2595176/which-machine-learning-classifier-to-choose-in-general
- "scikit-learn algorithm cheat sheet"
- http://scikit-learn.org/stable/modules/svm.html#classification
- Determining what parameters to
- Test data:
- Convert images to grayscale
- Calculate variance of Laplacian (a measure of sharpness/blurriness)
- The images that fail to meet a threshold (the example sets it at 100) are "blurry"
- (Requires a Windows machine) Use Lightroom SDK to develop a plugin
- On import runs all photos through the algorithm
- Opens a new dialog box with all images that fail to meet the thredhold
- If RAW images, use show embedded JPEG preview
- Removes all selected images from dialog box from catalogue
- Improve filtering by:
- Image normalization (normalize contrast and brightness)
- Saliency detection