Search found 1 match: photoshop
Searched query: photoshop
- 2016-05-21T22:12:16-07:00
- Forum: Digital Image Processing
- Topic: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
- Replies: 50
- Views: 105132
Re: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
I think clamping after the blur makes no difference. The important part is that (O-GB) may be negative, so that mustn't be clamped. "-compose Mathematics" works pixel-by-pixel, with each calculation in floating point, though each result here is then written to Q16 integer. My guess is that...
- 2016-05-21T20:43:09-07:00
- Forum: Digital Image Processing
- Topic: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
- Replies: 50
- Views: 105132
Re: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
Snibgo, in your -compose mathematics, you are processing O + (O - GB) as 2*O-GB with no clamping. Strange that works. But the claim was that PS is using O+(O-GB)-inv(O+inv(GB)). My guess is that the third term is getting parts missed by clamping O-GB. Nevertheless, when I computed O+(O-GB) in my scr...
- 2016-05-21T20:08:44-07:00
- Forum: Digital Image Processing
- Topic: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
- Replies: 50
- Views: 105132
Re: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
We can avoid the need for HDRI by using "-compose Mathematics":
Code: Select all
%IM%convert ^
%SRC% ^
( -clone 0 -gaussian-blur 0x3 ) ^
-compose Mathematics -define compose:args=0,-1,2,0 -composite ^
+depth ^
u2.tiff
- 2016-05-21T19:57:09-07:00
- Forum: Digital Image Processing
- Topic: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
- Replies: 50
- Views: 105132
Re: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
If we want the long-winded form of "-unsharp", then: set SRC=lena3.png %IM%convert %SRC% -unsharp 0x3+1+0 u0.png rem out = O + (O-GB) %IMDEV%convert ^ -define compose:clamp=off ^ %SRC% ^ ( -clone 0 -gaussian-blur 0x3 -clamp ) ^ ( -clone 0-1 -compose MinusSrc -composite ) ^ -delete 1 ^ -com...
- 2016-05-21T19:30:49-07:00
- Forum: Digital Image Processing
- Topic: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
- Replies: 50
- Views: 105132
Re: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
Yes, I have the order correct for subtraction. If you do multiple composites, each gets its own clamping. That is why I though of doing the 3 adds in one operation and not two. My guess is that there is different clamping in IM as separate operations than is what is done in the -unsharp command. Or ...
- 2016-05-21T18:57:22-07:00
- Forum: Digital Image Processing
- Topic: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
- Replies: 50
- Views: 105132
Re: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
Yes, I forgot about the default .05 threshold when I originally posted, but have changed the post to set the threshold to 0 exactly. See my previous post and http://www.imagemagick.org/script/command-line-options.php#unsharp. So my compare rmse value is now even smaller. Good stuff! That's great ne...
- 2016-05-21T18:44:09-07:00
- Forum: Digital Image Processing
- Topic: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
- Replies: 50
- Views: 105132
Re: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
Yes, I forgot about the default .05 threshold when I originally posted, but have changed the post to set the threshold to 0 exactly. See my previous post and http://www.imagemagick.org/script/comma ... hp#unsharp. So my compare rmse value is now even smaller.
- 2016-05-21T18:29:34-07:00
- Forum: Digital Image Processing
- Topic: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
- Replies: 50
- Views: 105132
Re: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
... noise is less in smooth areas. But I still don't understand why the fully manual version does not work with IM. I put a video here how I do it in Photoshop. I'm no video producer, so it will be a little slow and clunky..but you should get the idea: https://www.youtube.com/watch?v=8Yae5V39EhQ
- 2016-05-21T18:08:55-07:00
- Forum: Digital Image Processing
- Topic: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
- Replies: 50
- Views: 105132
Re: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
Here is another way to do O+(O-GB)-inv(O+inv(GB)) im6937hdri convert lena3.png \ \( -clone 0 -gaussian-blur 0x3 \) \ \( -clone 0 -clone 1 +swap -compose minus -composite \) \ \( -clone 1 -negate -clone 0 -compose plus -composite -negate \) \ -delete 1 \ -evaluate-sequence add \ lena3_im_us_script3_3...
- 2016-05-21T17:56:17-07:00
- Forum: Digital Image Processing
- Topic: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
- Replies: 50
- Views: 105132
Re: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
PS unsharp masking does allow amounts up to 500%.snibgo wrote:Does the PS "amount" allow values above 100, like (say) 500 or 1000?
If an effect is exaggerated, it is easier to find what causes the effect, and how to replicate it.
The PS apply image seems to be limited to 0 to 100%
- 2016-05-21T17:33:01-07:00
- Forum: Digital Image Processing
- Topic: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
- Replies: 50
- Views: 105132
Re: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
Does the PS "amount" allow values above 100, like (say) 500 or 1000?
If an effect is exaggerated, it is easier to find what causes the effect, and how to replicate it.
If an effect is exaggerated, it is easier to find what causes the effect, and how to replicate it.
- 2016-05-21T16:53:24-07:00
- Forum: Digital Image Processing
- Topic: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
- Replies: 50
- Views: 105132
Re: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
I didn't test it with Scale 2 yet. The only steps I did where the steps for "O+(O-GB)-inv(O+inv(GB))" this replicates PS USM 100, 3, 0, and closest match for IM was your "-unsharp 0x3" example in that case.
If you like I can make a video showing how I do it if that would help?
If you like I can make a video showing how I do it if that would help?
- 2016-05-21T16:38:38-07:00
- Forum: Digital Image Processing
- Topic: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
- Replies: 50
- Views: 105132
Re: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
When you have time, list for me the exact operations you used in PS with the argument values to reproduce what you found matched the IM results and which IM result that I made above.
- 2016-05-21T16:29:13-07:00
- Forum: Digital Image Processing
- Topic: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
- Replies: 50
- Views: 105132
Re: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
Where is this scale in the PS unsharp masking? I only see amount, radius and threshold. It's in the PS menu "Image/Apply Image...", then select Subtract or Add and you will see Scale and Offset as additional options. You use Apply Image to do the addition and subtraction operations of the...
- 2016-05-21T16:13:48-07:00
- Forum: Digital Image Processing
- Topic: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
- Replies: 50
- Views: 105132
Re: The Math Behind Photoshop's Unsharp Mask and Gaussian Blur
Where is this scale in the PS unsharp masking? I only see amount, radius and threshold.