Highpass Sharpen
Posted: 2007-12-16T14:20:09-07:00
Hi,
I use GIMP and I have found a script from Martin Egger to sharpen an image using a highpass algorithm. The script is simple so I wanted to write it using Image Magick. I have written all the steps except the last one which is a composite overlay with an opacity of 50%.
The first steps, to generate the image to merge, are:
convert 05_0019.jpg -blur 0x10 etape1.png
convert etape1.png -negate etape2.png
composite -blend 50 etape2.png 05_0019.jpg etape3.png
convert etape3.png -level 25600,37800 etape4.png
Then the final steps: Overlay this generated image with the original image with an Opacity of 50%.
My first try was:
composite 05_0019.jpg etape4.png -compose Overlay etape5.png
The result is fine except that as there is no opacity defined the image is way too sharpened.
So I tried others methods:
Adding an alpha channel to etape4.png doesn't seems to work:
convert etape4.png -channel A -evaluate set 30% -format PNG32 etape4a.png
and then
composite 05_0019.jpg etape4a.png -compose Overlay etape5.png
I have also tried the following commands but with no result:
composite -blend 50 05_0019.jpg etape4.png -matte etape5.png
composite 05_0019.jpg -matte etape4.png -matte -dissolve 100x50 etape5.png
Does someone know how to reproduce the Opacity with 50% (or another percentage) function that I can find in GIMP.
Thanks in advance, and I hope you have understood my poor english.
Ithier
I use GIMP and I have found a script from Martin Egger to sharpen an image using a highpass algorithm. The script is simple so I wanted to write it using Image Magick. I have written all the steps except the last one which is a composite overlay with an opacity of 50%.
The first steps, to generate the image to merge, are:
convert 05_0019.jpg -blur 0x10 etape1.png
convert etape1.png -negate etape2.png
composite -blend 50 etape2.png 05_0019.jpg etape3.png
convert etape3.png -level 25600,37800 etape4.png
Then the final steps: Overlay this generated image with the original image with an Opacity of 50%.
My first try was:
composite 05_0019.jpg etape4.png -compose Overlay etape5.png
The result is fine except that as there is no opacity defined the image is way too sharpened.
So I tried others methods:
Adding an alpha channel to etape4.png doesn't seems to work:
convert etape4.png -channel A -evaluate set 30% -format PNG32 etape4a.png
and then
composite 05_0019.jpg etape4a.png -compose Overlay etape5.png
I have also tried the following commands but with no result:
composite -blend 50 05_0019.jpg etape4.png -matte etape5.png
composite 05_0019.jpg -matte etape4.png -matte -dissolve 100x50 etape5.png
Does someone know how to reproduce the Opacity with 50% (or another percentage) function that I can find in GIMP.
Thanks in advance, and I hope you have understood my poor english.
Ithier