Log in
TechniqueBy HypernaturalVersion 2, updated

Measure fine detail

hn/python-measure-detail

Measure how much fine detail (film grain, pores, hair, small print) is left in a box of a 1080p frame: the spread of a high-pass filter, compared across the source and its edits or renders. Use to catch an edit or render that smoothed a face into plastic skin or lost the grain, and to pick a grain strength from a ladder against the source.

SKILL.md

Give it a box and several stills or video frames of the same picture: the source first, then its edits, renders or grain variants. You get one detail number per input, and its ratio to the first. The frame is fitted to 1920×1080, the box is cut from its greyscale, and the score is the standard deviation of a 4-neighbour high-pass over it. Grain, pores, hair strands and print push it up. Smoothing pulls it down. Use it to compare like with like. It doesn't grade one picture on its own.

Run it

Write references/detail.md's script into the job's scripts/ as detail.py, as is, and run it with exec python:

exec python scripts/detail.py --box 760,60,1144,380 --image <source>_first.jpg <swap>_a.png <swap>_b.png
exec python scripts/detail.py --box 760,60,1144,380 --video <source shot>.mp4 <take>.mp4 --frame 12
  • --box left,top,right,bottom is in 1080p pixels. Pick a face or a flat patch (a wall, a sleeve) that shows the same thing in every input.
  • With --image and --video together, the first image is the reference.
  • --frame picks the same frame index from every video.

What you get

JSON per input: detail, and vs_first, the ratio to the reference.

Reading the numbers

  • A full-frame edit made at 4K and scaled down to 1080p read 0.96 on a face where the source read 2.16. Its grain and a moustache were gone. The same edit made at 2K read 3.19 and kept them. A drop to about half the source is visible smoothing.
  • Above the source is not automatically better. Added grain and compression noise raise it too. Look at a 100% crop to tell grain from noise.
  • Grain ladder: measure the source and every grain strength on the same flat patch. Pick by eye from 100% crops, using the number to narrow the rungs. Grain vanishes when the crop is scaled down. Grain in post won't fix shine that is in the lighting.

Tips and traps

  • Same box, same content. A box that catches an edge or a moving hand in one input and not another measures the edge, not the texture.
  • Inputs that aren't 16:9 are centre-cropped to 16:9 before the box is cut, so set the box in that fitted frame.
  • Pinning both first and last frames keeps small detail from degrading across a shot. Measure the pinned stills before animating, so a smoothed edit is caught before it costs a render.

Check it

Run it with the source as both inputs. Both read the same value and vs_first is 1.0. A box under a few pixels across is refused.

FAQs

Measure how much fine detail (film grain, pores, hair, small print) is left in a box of a 1080p frame: the spread of a high-pass filter, compared across the source and its edits or renders. Use to catch an edit or render that smoothed a face into plastic skin or lost the grain, and to pick a grain strength from a ladder against the source.

Install Hypernatural Desktop, a free Mac app, and connect it to Claude Code, Codex or Claude Desktop. Then describe the video you want and your agent finds the skill itself, or paste this page's link (https://hypernatural.ai/skill/hn/python-measure-detail) and it installs hn/python-measure-detail and follows it.

Nothing. The skill is free and runs with tools on your own Mac, like python and ffmpeg.

Yes. Ask your agent to adjust it for your job, or to save its own version. You can publish your version under your own handle so anyone can install it.

Go make something cool.

Install the app, open your agent, describe the video. That's the whole onboarding.

Sticker HypernaturalSticker BannerSticker TVBoy