This function measures the relative degree of focus of an image. Several up-to-date focus measuring algorithms have been implemented and the function supports uint8 or double images. If you find this function useful, please cite:
S. Pertuz et al., Analysis of focus measure operators for shape-from-focus. Pattern Recognition (2012), http:/
You can find implementation details in the referenced paper. For additional information, please visit:
Very helpful, allows you to try quickly many different methods and see what suits your case.
There is for sure a small bug in SFIL case, between 270 and 315 degrees, R(:,:,7) appears twice instead of R(:,:,7) and R(:,:,8)