Determine if an image is in focus using OpenCV

Zahid Parvez
4 min readFeb 3, 2023

Determining if an image is tricky and it isn't as straight forward as using the variance from the Laplacian function...

Consider the following images, which images do you consider blurry?

Disclaimer — images 2 to 4 was generated with thispersondoesnotexist.com

--

--

Zahid Parvez

I am an analyst with a passion for data, software, and integration. In my free time, I also like to dabble in design, photography, and philosophy.