Go App Analyzes Sharpness Levels

Programming Snapshot – Rating Image Sharpness in Go

© Photo by Dan DeAlmeida on Unsplash

© Photo by Dan DeAlmeida on Unsplash

Article from Issue 312/2026
Author(s):

Which image in a series is the sharpest? Mike Schilli explores the depths of sharpness physics with homemade Go tools.

My relatively new smartphone usually takes exceptionally sharp pictures, but not always. Why is that? A smartphone camera does not just contain an image sensor but also a powerful AI brain that directs the camera's autofocus to what it thinks should be the focal point of the image.

Veteran photographers know that critical viewers of, say, animal photos expect the area around the eyes to be razor-sharp. The rest of the animal can appear slightly out of focus due to limited depth of field without detracting from the overall impression. Now, Apple and other smartphone camera manufacturers use all sorts of tricks to determine the area to focus on while conserving battery life as much as possible. This does not seem to work with reptiles like the one in Figure 1. No matter how many times I took photos of that cheeky little lizard on a hiking trail, not a single photo in the series turned out 100 percent sharp – in order to make the lizard's head "pop," as the pros say.

Figure 1: ChatGPT fails miserably at locating the eyes (left); Grok gets it correct the first time (right).

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Download Article PDF now with Express Checkout
Price $2.95
(incl. VAT)

Buy Linux Magazine

Related content

  • Showtime

    A GUI application written in Go helps Mike Schilli select videos from his phone using animated thumbnails and get rid of the clutter.

  • Free Selection

    The photogrep GUI tool, built using Go and Fyne, is designed to filter photos just like the grep tool filters file names from a pipe.

  • Treasure Map

    To help track down a particular photo, Mike Schilli often turns to his cellphone's geosearch function. Replicating this functionality with Go and Fyne turned out to be a trouble-free experience.

  • Marathon Runners

    Rather than using ho-hum bar graphs to display Internet bandwidth usage, Mike Schilli enlists cartoon characters to do the job. Along the way, you get a free introduction to 2D gaming sprite technology.

  • Spotlight

    Before sharing screenshots, you may want to highlight points of interest. Mike Schilli whips up a Go app with the Fyne framework that acts like a highlighter pen.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News