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 -
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.