Gmic Affinity Photo



There are many methods of sharpening; those included in Adobe Photoshop or Affinity Photo include ‘Unsharp Mask’, ‘Smart Sharpen’ and ‘High Pass Sharpening’. I would class these as ‘Actuance’ sharpening methods. A further, distinct method is called ‘Wavelet Sharpening whilst a third, and the main topic of this article, is called ‘Deconvolution Sharpening’. Though this might be pedantic, the former do not actually sharpen an image, they merely make it appear sharper. However, the latter does actually attempt to extract more detail out of the taken image and so is a true sharpening method. Ironically, the image resulting from its use, though showing more detail, may well not look sharper and so perhaps a little Actuance sharpening might be applied to give the best overall result. Pleasingly, there are now available three free software programs that can carry out Deconvolution Sharpening.

I think that it is worth briefly discussing the two former methodsas, later in the article, I will try to show some comparisons.

Serif established an R&D team for Affinity Photo in 2009, headed by lead designer Andy Somerfield. A free beta test version of the Affinity Photo app was released to the public on 9 February 2015. The initial stable release of Affinity Photo, version 1.3.1, launched on the Mac App Store 9. G'MIC is an open-source product developped at the research lab.G'MIC Online is an online service hosted by this lab. Install the Plug-in from the G’MIC Website. You’ll of course need to start by downloading the actual. $ cd /mingw64/bin/ && cp libgccsseh-1.dll libwinpthread-1.dll libgomp-1.dll libstdc-6.dll libcurl-4.dll libbrotlidec.dll libbrotlicommon.dll libcrypto-11-x64.dll libidn2-0.dll libiconv-2.dll libintl-8.dll libunistring-2.dll libnghttp2-14.dll libpsl-5.dll libssh2-1.dll zlib1.dll libssl-11-x64.dll libzstd.dll libfftw3-3.dll libpng16-16.dll Qt5Core.dll libdouble-conversion.dll libicuin67.

ActuanceSharpening

Gmic Affinity Photo

Though ‘Smart Sharpen’ may be a little more sophisticated than Unsharp Mask Sharpening (and, it is said, applies one iteration of deconvolution sharpening) these effectively add ‘acutance’ to an image by increasing the ‘microcontrast’ at changes in brightness in the image; if at an edge in an image the brightness went from a dark grey to a light grey, at the dark grey side it would be made darker and at the light grey side it would be made lighter so accentuating the difference. The image below shows precisely this; shown at ~400%, Smart Sharpen was applied to the brightness change in the top image to give the result below. [Pleasingly this worked exactly as I had expected.]

High Passsharpening

This is rather similar process to the above but takes a little more effort. The image is duplicated and the ‘High Pass’ filter applied to the duplicate layer with a radius of a few pixels. This layer becomes mid grey except at the edges within the image. The pixel radius used can be adjusted and, with the blending mode is set to ‘Overlay’, the sharpening amount can be controlled with the opacity slider. A nice ‘sharpening’ tool.

There is an excellent video tutorial about the use of Smart Sharpen and High Pass Sharpening with the title ‘Image Sharpening Techniques in Photoshop’. Well worth searching for.

Waveletsharpening

This is a very interesting method of sharpening and is availablein Registax 6, for example. The image is dissected into 6 layers eachcontaining the information in differing ‘spatial frequency’ bands – from largescale features to very fine detail. Thebrightness of each of these layers can be individually adjusted and if, inparticular, the brightness of the three finest layers (1 – 3 in Registax) isincreased, the sharpness of the image will be enhanced. This is very probably a better method thanthe ‘acutance’ methods above, but again I am not sure that this is truesharpening.

DeconvolutionSharpening

Deconvolution Sharpening was developed to improve the images from the Hubble Space telescope before corrective optics were added to compensate for its improperly shaped mirror. It is also said to be used to enhance the images from spy satellites! In my professional career as a radio astronomer, I have used it to greatly improve the images produced by a ‘sparse’ array of radio telescopes.

Let me try to explain how it works in relation to an astronomical image of the Moon, Let’s assume that one is using a 127mm aperture telescope to image and there is no atmospheric turbulence (we wish). The image that would be captured would be the actual image ‘convolved’ with the diffraction effect of the limited aperture – an Airy disk with a diameter of ~1.2 arc seconds surrounded by lower brightness rings. The central disk would have an approximate Gaussian shape. If the deconvolution sharpening software ‘knows’ what this shape of is – called the ‘point spread function’ (as this is what would be seen if a point source were imaged) – then the software attempts to deduce what the original would be like. Usually a Gaussian point spread function is used – which works pretty well when a telescope is used. It is an iterative process and, having spent a little time setting the appropriate parameters, will actually take quite a while to produce the final image; using an i7 processor, sharpening a 24 megapixel image took over a minute with three of the programs that I have used. But, having said this, RawTherapee, one of the three free programs that can carry out deconvolution sharpening, is exceedingly quick even when it is said to be carrying out 100 iterations.

Softwareto implement Deconvolution Sharpening

For some years I have been using the excellent program Astra Image to sharpen my images and, for $42, it includes several additional image enhancement tools. A very nice feature of Astra Image is that a small area of the image can be selected and, fairly quickly, adjustments, such as the number of iterations to be employed, can be made whilst observing the result. Having found the best combination, the process is then applied to the whole image.

There are now three programs that can implement deconvolution sharpening available for free download.

The first is found in the astroimaging package ImagesPlus. Having opened up the ‘Smooth Sharpen’ menu, the tool ‘Adaptive Richardson – Lucy Restoration’ is selected. This brings up a control window. The initial default settings work well but one can alter both the ‘Point Spread Function’ size and the number of iterations applied. I do select the ‘Reduce Artifacts’ box. Again trial applications are needed to give the best result. (But these are applied to the full image, so take some time.)

A second deconvolution sharpening tool is found in the program RawTherapee. Having loaded the image, the detail tab at the top right set of 7 tabs is selected and the small circle to the left of ‘Sharpening’ clicked upon to activate this specific tool. The ‘RL convolution’ method is selected and, with the image scale set to 1:1, the effects of adjusting the three sliders can be seen. The screen shot shows the required controls to be used and the image exporting tab when one is satisfied with the result.

There is a further alternative available within the free program, GIMP, (which can now handle 16 bit-depth files) once a set of filters has been downloaded from gmic.eu/download.shtml. This collection of filters is free but a contribution would be appreciated. It has an excellent control window which, like Astra Image allows one to immediately see the effect on a small region of the image as the sharpening parameters are changed before committing to the overall result.

Having installed the GMIC filters, at the bottom of the GIMP included filter set should be seen ‘G’MIC-Qt..’. Clicking on this brings up a image window with a list of the filters at its right. The magnification should be adjusted so that an interesting region of the image is seen well. The ‘Details’ sub menu should be opened up and the ‘Sharpen [Richardson-Lucy]’ filter should be selected at which point the appropriate control sliders appear to the right.

Gmic For Affinity Photo

The GMIC window can be made full screen.

ADeconvolution Sharpening Test

I took a test shot to compare the results of the differing sharpening methods. To this end I produced a slightly blurred (2 pixel radius Gaussian Blur) version of the image, as seen below, to see what the sharpening tools could do. I would then have an essentially perfect image (the original) with which to compare them.

To this I applied Smart Sharpen, High Pass sharpening, Wavelet sharpening and Deconvolution Sharpening and compared the results to the original and blurred images. The test images below are a very tight crop of the cropped image above. I tried to get the best results as I could using the different methods. In the case of Smart Sharpen and High Pass Sharpening, I used a radius of 2.5 pixels and adjusted the amount to give the best image (Opacity is used in the case of High Pass Sharpening) and for Wavelet Sharpening, I set the top three sliders to 20.

Devolution sharpening using GIMP

Deconvolution sharpening is a little more complex. ‘Gaussian’ was used as the point spread function. Observing the result when applied to the small area of the image, the value of Sigma and the number of iterations to be applied can be adjusted and the sharpened result can be immediately seen. There has to be a balance between them. Either increasing the value of Sigma or the number of iterations too much, the image will ‘blow up’ and become very noisy. It appears that using a smaller value of Sigma with a larger number of iterations gives a better result than a larger Sigma and few iterations. Having tried out many combinations, I chose 0.7 for the value of Sigma and 40 for the number of iterations. When satisfied with the result of sharpening the small area of the image, the OK button is clicked upon and the devolution iterations are applied to the whole image, taking some considerable time. When finished, the sharpened image appears in the main GIMP screen and is saved (actually ‘exported’ in GIMP).

I also chose a suitable combinations of the control parameters with RawTherapee which can be seen in the screen shot above.

Gmic

The results of the differing sharpening tools are shown with the original image to the bottom right.

I do think that Deconvolution Sharpening gave the best results whilst, at this resolution, that produced by Wavelet Sharpening was nearly as good ‒ which I found very interesting. These two were certainly better than the results of applying Smart Sharpen or High Pass Sharpening. However, as seen at very high resolution, The result of the wavelet sharpening was a lot noisier than the deconvolution result.

I also used RawTherapee and GIMP to sharpen the original image (which was taken with a very sharp lens) and was very impressed with their virtually identical results. Though, within the window, the noise level in the original image would be expected to be relatively high, the devolution sharpening does not appear to have increased it. Something that I do not quite understand is that Rawtherapee is exceedingly fast in execution compared to the other programs – even when carrying out 100 iterations.

There is a very comprehensive article about deconvolution sharpening by Roger N. Clark who, as I had, first took an image and reduced its resolution before applying the various sharpening methods. This is well worth reading.

https://www.clarkvision.com/articles/image-restoration2/

Applied to Lunar Imaging

My own use of Devolution Sharpening has been when I have applied it to sharpen Lunar images, one of which is shown below.

In the Lunar Section of my ‘Night Sky’ page on the Jodrell Bank Observatory Website (Search for Night Sky Jodrell) is an image with a resolution of ~0.7 arc seconds having used this technique. There is a detailed description as to how that image was achieved in this ‘Astronomy Digest’ article ‒ ‘High Resolution Lunar Imaging with the Vixen VC200L‘.

G'MIC
Original author(s)GREYC Lab Groupe de recherche en informatique, image, automatique et instrumentation de Caen
Developer(s)GREYC Lab
Initial releaseJuly 18, 2016; 4 years ago
Stable release
Repository
Written inC++
Operating systemCross-platform
TypeImage manipulation
LicenseCeCILL
Websitegmic.eu

G'MIC (GREYC's Magic for Image Computing) is a free and open-source framework for image processing. It defines a script language that allows the creation of complex macros. Originally only usable through a command line interface, it is now currently mostly popular as a GIMP plugin,[2] and is also included in Krita.[3] G'MIC is licensed under the CeCILL license.

Features[edit]

G'MIC's graphical interface is notable for its noise removal filters, which came from an earlier project called GREYCstoration by the same authors.[4] G'MIC offers many built-in commands for image processing, including basic mathematical manipulations, look up tables, and filtering operations. More complex macros and pipelines built out of those commands are defined in its library files.[5]

Interpreters[edit]

Command line[edit]

Gmic for affinity photo
Combined screenshots into a video file. Smooth transitions between images are made with the command: gmic -w -fade_files

G'MIC is primarily a script language callable from a shell. For example, to display an image:

This command displays the image contained in the file image.jpg and allows zooming in to examine values.

Several filters can be applied in succession. For example, to crop and resize an image:

Graphical interface[edit]

Gmic Affinity Photo

G'MIC comes with a Qt-based graphical interface, which may be integrated as a Gimp or Krita plugin.[6] It contains several hundred filters written in the G'MIC language, dynamically updated through an internet feed. The interface provides a preview and setting sliders for each filter.[7]

G'MIC is one of the most popular Gimp plugins.[8]

G'MIC Online[edit]

Most of the filters available for the graphical interface are also available online.[9]

ZArt[edit]

ZArt is a graphical interface for real-time manipulation of webcam images.

libgmic[edit]

Gmic Affinity Photo

Libgmic is a C++ library that can be linked to third-party applications. It sees integration in Flowblade and Veejay.[6]

Gmic Affinity Photo

References[edit]

Wikimedia Commons has media related to G'MIC.
  1. ^https://github.com/dtschump/gmic/releases/tag/v.2.9.0.
  2. ^Williams, Mike. 'G'MIC: the world's most flexible image processor?'. Betanews.
  3. ^'G'Mic Settings'. Krita Manual. Retrieved 24 March 2019. Krita has had G’Mic integration for a long time, but this is its most stable incarnation.CS1 maint: discouraged parameter (link)
  4. ^'GREYCstoration: Open source algorithms for image denoising and interpolation'. CImg. Retrieved 24 March 2019.CS1 maint: discouraged parameter (link)
  5. ^'gmic_stdlib.gmic (Standard library)'. gmic.eu. Retrieved 24 March 2019.CS1 maint: discouraged parameter (link)
  6. ^ ab'G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing'. G'MIC. Retrieved 24 March 2019.CS1 maint: discouraged parameter (link)
  7. ^'Gimp-G'MIC Tutorial Filters'. G'MIC. Retrieved 24 March 2019. The installation of Gimp-G'MIC filters is semi-automatic. The primary filters are distributed from the gmic.eu server and all filters from that source can be downloaded and installed by using the refresh button (circular arrow) at the bottom of the Gimp-G'MIC plugin filter main dialog boxCS1 maint: discouraged parameter (link)
  8. ^Wallen, Jack. 'G'MIC: An incredibly powerful filtering system for GIMP'. TechRepublic. Retrieved 20 November 2014.CS1 maint: discouraged parameter (link)
  9. ^G'MIC Online
Retrieved from 'https://en.wikipedia.org/w/index.php?title=G%27MIC&oldid=1014905669'