Deblur with your own kernel

For curved shake and odd blurs: draw, estimate or import the kernel yourself.

or drop it anywhere on this page · paste with Ctrl+V

No blurry photo handy?

Free · No sign-up · Photos stay on your device

Blurred on purpose, then fixed here

Three ways a frame fails, drawn here and measured with the same code

Nothing below is a photograph somebody chose. The frame is drawn by this page, broken in the way the segment names, and — if you press the control — put through the identical worker the button in the rail uses. Two of the three are cases where the answer is no.

Camera shake. Every pixel averaged across nine cells along one axis, which is what a hand-held exposure does.

The case the pass is shaped for. The energy is still in the frame, moved sideways, and a kernel of the measured shape walks most of it back.

These numbers are this processor’s, measured now. What a learned pass would cost to fetch and what it is licensed under are on the weights page.

Choose photo

Deblur with your own kernel in four steps

  1. Open the blurred photo. It is measured first, so the measured kernel is one click away.
  2. Get a kernel. Paint it cell by cell, start from the measured one, estimate it from the photo, or import a PNG or CSV.
  3. Tune and compare. Sharpness, strength and guard, with the result beside the original. A kernel that did not settle is flagged.
  4. Save, and keep the kernel. Save the photo at full size, and export the kernel to reuse on another photo from the same burst.

When a straight line is not the right kernel

The ordinary deblur assumes a straight smear or a round defocus. Real camera shake is often a curve, a hook or a double movement. A point-spread function — the shape a single point of light was smeared into — can describe any of those, and the frequency-domain path can undo any of them at the same cost.

Curved shakeEstimate the kernel from the photo, or paint the curve.
A star or a light in the frameIts streak is the kernel: paint what you see.
A burst with the same shakeExport the kernel from one photo, import it on the next.
Straight shakeThe motion deblur is simpler.

When this will not help

  • Blur that differs across the frame (a subject moving against a still background) — one kernel cannot describe it.
  • Patches with too little texture: the estimate will not settle, and the trace shows it.
  • Very long kernels on noisy photos: the result rings or grains; lower the sharpness.

Two different movements in one photo? Fix a subject that moved. Straight camera shake? Motion deblur is quicker.

Questions

What is a kernel, or PSF?

The point-spread function is the shape a single point of light was smeared into by the blur. Deconvolving a photo with the right one undoes the smear. Here it is a square grid of weights in source pixels; brighter cells carry more weight, and the grid always sums to one.

How does the blind estimate work?

It alternates between two guesses, coarse to fine: the sharp patch given the current kernel, and the kernel that best maps that patch's strongest edges onto the blurred ones. It is classical arithmetic, not a learned model, and it can fail — the convergence trace shows whether it settled.

Which file formats can I import?

A square PNG (brightness is weight) or a CSV of numbers, one row per line, between 3 and 127 cells across. Exports use the same two formats, so a kernel can move between photos of the same burst.

Why is there a sharpness control instead of rounds?

The custom kernel always runs on the frequency-domain path, where the control sets how little the result is regularised: higher is crisper and noisier.

When won't this work?

When the blur is different in different parts of the frame, when the estimation patch is flat, or when the kernel is wrong — a wrong kernel adds artifacts rather than removing blur. Compare before saving.

Is my photo uploaded?

No. Editing, estimating and deconvolving all happen in this browser tab.

Related

Photographic visual for Custom Kernel

Custom Kernel