Can somebody please help achieving the ImageJ unsharp mask in ImageMagick. Its available in IMageJ->Process->Filters->UnsharpMask. I need to be able to provide exact same parameters as in this filter i.e. Radius(Sigma) and and Mask Weight(0.1-0.9)
Thanks
ImageJ Unsharp mask in ImageMagick
-
- Posts: 21
- Joined: 2016-02-21T13:47:15-07:00
- Authentication code: 1151
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: ImageJ Unsharp mask in ImageMagick
for ImageJ sigma=1, mask weight=0.6, try
Code: Select all
-unsharp 0x1+1.6
-
- Posts: 21
- Joined: 2016-02-21T13:47:15-07:00
- Authentication code: 1151
Re: ImageJ Unsharp mask in ImageMagick
Thanks for help.
I ran this, however the result is completely different than what ImageJ gives. I tried sigma =100 and mask weight =0.9. I have uploaded in and out images at https://drive.google.com/open?id=0B9dG4 ... 25vX0pSeHM . This is the command i used
convert -unsharp 0x100+1.9 C:\Unsharp\US_IM.tiff C:\Unsharp\US_IM_After.tiff
How do i make it give the same result.
Thanks
Bhim
I ran this, however the result is completely different than what ImageJ gives. I tried sigma =100 and mask weight =0.9. I have uploaded in and out images at https://drive.google.com/open?id=0B9dG4 ... 25vX0pSeHM . This is the command i used
convert -unsharp 0x100+1.9 C:\Unsharp\US_IM.tiff C:\Unsharp\US_IM_After.tiff
How do i make it give the same result.
Thanks
Bhim
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: ImageJ Unsharp mask in ImageMagick
100 is way too large for a sigma value in IM when ImageJ uses a value of 1.
So try
Input:
I get pretty close results for:
ImageJ: sigma=1 and weight 0.6
And IM:
So only 1.45% different
Without knowing exactly what radius and threshold ImageJ is using, one would have to test quite a bit more to get closer. You can try adjusting the values in IM. See http://legacy.imagemagick.org/script/co ... hp#unsharp
In IM, proper syntax is to read the input before doing any operations on it. See http://www.imagemagick.org/Usage/basics/#syntax and http://legacy.imagemagick.org/script/co ... essing.php.convert -unsharp 0x100+1.9 C:\Unsharp\US_IM.tiff C:\Unsharp\US_IM_After.tiff
So try
Code: Select all
convert C:\Unsharp\US_IM.tiff -unsharp 0x1+1.9+0 C:\Unsharp\US_IM_After.tiff
Input:
I get pretty close results for:
ImageJ: sigma=1 and weight 0.6
And IM:
Code: Select all
convert lena.jpg -unsharp 0x1+1.6+0 -depth 8 lena_IM_us_1x1p6x0.tif
Code: Select all
compare -metric rmse lena_IJ_us_1x0p6.tif lena_IM_us_1x1p6x0.tif null:
953.629 (0.0145514)
Without knowing exactly what radius and threshold ImageJ is using, one would have to test quite a bit more to get closer. You can try adjusting the values in IM. See http://legacy.imagemagick.org/script/co ... hp#unsharp