
ImageMagick: How to Sharpen an Image
Updated
Learn how to sharpen a soft image using ImageMagick

Before we start, make sure you have ImageMagick installed on your computer and your image ready in a folder. If you don't have it yet, run this command:
brew install imagemagick
First, open your terminal and navigate to the folder that has your image. To sharpen it, run this command:
magick input.jpg -sharpen 0x2 output.jpg
Just remember to replace input.jpg with your actual filename. The -sharpen option takes a radius and a strength, written like 0x2. The 0 lets ImageMagick pick the radius for you, and the second number is the strength. A value around 1 to 2 is subtle, and 3 starts to look harsh.
For more control, use -unsharp instead:
magick input.jpg -unsharp 0x2+1.5+0.02 output.jpg
It takes a radius, a sigma, an amount and a threshold. A small threshold like 0.02 keeps smooth areas with noise from getting sharpened. Don't worry if you don't see a success message, the command finishes quietly.
To make sure everything worked, run open output.jpg and compare it with your original.
One more tip: for portraits or noisy photos, try -adaptive-sharpen 0x1.5. It only sharpens the edges, so skin and backgrounds stay smooth.
