Dev.to WebDev 🛠 Dev 👁 0 📖 2 min read

Fixing blurry photos in the browser: what actually works

Most blurry photos are not a lost cause, and they are also not all the same problem. Before reaching for any tool, it helps to know which kind of blur you are looking at, because each one recovers differently.

Most blurry photos are not a lost cause, and they are also not all the same problem. Before reaching for any tool, it helps to know which kind of blur you are looking at, because each one recovers differently.

Three kinds of blur

Motion blur happens when the camera or the subject moved during the exposure. It looks like a smear in one direction. It is the most recoverable kind, because the missing information is directional and regular.

Out-of-focus blur comes from missed focus, and it spreads detail evenly in every direction. Small misses recover well. A portrait focused on the background instead of the face is much harder.

Low-resolution or compression blur is not really blur at all. It is missing detail, and no amount of sharpening invents it back. Upscaling can make it look smoother, but the detail will not appear.

A workflow that respects the original

  1. Work on a copy. Always.
  2. Fix the exposure and colour first. Sharpening a badly exposed image just amplifies noise.
  3. Apply the smallest amount of sharpening that produces a visible improvement at 100% zoom.
  4. Compare side by side. If you cannot tell the difference at 100%, you have gone too far or not far enough.

The mistake almost everyone makes is over-sharpening. Edges get a bright halo, skin turns plastic, and text develops a crunchy outline. Recovery looks best when it is subtle.

Doing it without installing anything

For a handful of images, a desktop application is a lot of installation for very little use. Browser tools handle this fine now, because the work is small and the results are easy to judge on screen. UnblurX is one of them: you upload the image, compare the preview against the original, and export when it looks right.

The honest limitation is worth repeating: restoration improves detail that is still in the file. It does not rebuild a face from a photo where the face is a smear of six pixels. Knowing that up front saves a lot of disappointment.

When to give up on the photo

If the subject is smaller than a few dozen pixels, or the motion blur is longer than the subject is wide, the information is gone. A reshoot, or a different photo from the same session, is the better answer.

That rule of thumb has served me better than any slider.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.