Jump to content

Unsharp Mask Filter


Drazick

Recommended Posts

Actually I'm just prototyping something on Matlab.

If it works I could try write it for Paint.Net.

Hence I just need the basic Math behind it.

I saw many algorithms for USM, yet I need something similar to Phothsop / Gimp (With the Threshols Parameter).

If you remember, I asked you once in your blog if you could ever link between the two.

Thanks.

Link to post
Share on other sites

OK, I managed to write something and it seems to work well.

If someone knows better to get results like Photoshop, Please let me know.

Here it is:

Input and Parameters (Just Like in Photoshop): A - Original Image, Amout, Radius, Threshold.

B - Blur image A using Gaussian Blur with Radius.

C - abs(A - B)

Mask = 1 Where Pixels of C > Threshold, 0 otherwise.

Output = A + Mask * (Amount * C)

That's it.

I hope it would work for you.

For anything that would make it more Photoshop / Gimp comparable, let me know.

Thanks.

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...