Sign in to follow this  
Drazick

Unsharp Mask Filter

Recommended Posts

Hello.

Has anyone succeeded to replicate Photoshop's Unsharp Mask and willing to share.

I'm trying to write an algorithm which uses it and I want to replicate it.

I encountered several Method, yet I'm not sure they are the same.

Thanks.

Edited by Drazick

Share this post


Link to post
Share on other sites

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.

Share this post


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.

Edited by Drazick

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this