Find the SHARPEST SPOT IN YOUR PHOTOS – a simple batch method

Опубликовано: 28 Апрель 2026
на канале: TomPhoto
797
53

I present a simple-to-use method for determining the sharpest region in your photo (indicating where you focused) and assessing the overall photo sharpness. The method automatically calculates sharpness values for all photos in the current folder. The results are presented both graphically and numerically, allowing you to easily identify the best photos from your collection. In the accompanying video, I provide step-by-step instructions for setting up my photo sharpness tool. It's user-friendly! You can download it from the link provided in the LINKS section below.

ATTN! In the video I talk about a sharpness script (sharpest_region.py) that uses Sobel operators. I have created another version of this script (sharpest_region2.py) that uses Laplacian operator (and you can also download it below). The scripts both work the same way and one is not better than the other. They use different algorithms and which one is better may depend on the particular type of photo. Give them both a try. The sharpest_region.py is less sensitive to noise and is my preference, but the sharpest_region2.py is able to better detect sharper edges.

HOW TO TURN THE SCRIPT INTO WINDOWS EXE FILE?
1) Install PyInstaller via the terminal like this:
pip install pyinstaller
2) navigate to where your Python script is.
3) generate exe file like this:
pyinstaller --onefile your_script.py

Chapters (click to jump):
00:00 Photo sharpness
00:42 How to run my tool
01:53 Example
02:36 Results
03:30 When to use it

----------------------------------------------------------------------------------------------------------------
*** If you like this video, please consider SUBSCRIBING to my channel
----------------------------------------------------------------------------------------------------------------

LINKS (read the text above as well):

Download the SHARPNESS SCRIPT (sharpest_region.py, using Sobel operators) here:
https://drive.google.com/file/d/1eJND...

Download the NEW SHARPNESS SCRIPT (sharpest_region2.py, using Laplacian operator) here:
https://drive.google.com/file/d/1vfGw...

Algorithm (Sobel) description: https://drive.google.com/file/d/1AJ-g...

How to install Python:    • A quick method for MEASURING SHARPNESS of ...  
(Watch until 7:05)

Running a Python script on Mac or Linux:    • A quick method for MEASURING SHARPNESS of ...  
(Watch until time 4:04)

Running a Python script on Windows:    • A quick method for MEASURING SHARPNESS of ...  
(Watch until time 5:58)

Troubleshooting id script won’t run:    • A quick method for MEASURING SHARPNESS of ...  
(Watch until 7:24)

A fast script to measure photo sharpness:    • A quick method for MEASURING SHARPNESS of ...  

PR_127