Support my work on Patreon

If you like my work, please consider to help my growing family with a little financial support through my Patreon creator page.


Alternatively, you can leave a one-time donation via PayPal using the Donate button below.

Total Pageviews

Thursday, May 28, 2015

Version 0.1.1 released

Version 0.1.1 of PhotoFlow is out!

Here is the complete changelog:

  • Added file name widget to RAW loader dialog. This allows to edit multiple RAW files simultaneously in the same image.
  • Added digital watermarking tool based on G'MIC "watermark_fourier" filter (thanks +Morgan Hardwood for suggesting this). A tutorial about this new tool will soon be posted on this blog.
  • Modified Hue/saturation and brightess/contrast tools to work correctly also in Lab colorspace.
  • Fixed computation of saturation adjustment. Now the saturation slider produces exactly the same output as the equivalent tool in GIMP (except that computations are in 32-bits floating point precision and are applied non-destructively). Internally, the hue/saturation tool now works in the HSL colorspace like GIMP (instead of the HSV colorspace used before).
  • Moved "RAW developer" tool into "Load" tab and removed "raw" tab.
  • Moved "Color profle conversion" tool into "Color" tab and removed "conv" tab.
  • Quality of Jpeg output set to "100".

Updated Windows and OSX installers are available from the usual downloads page.

Sunday, May 3, 2015

First screencasts showing the basic usage of PhotoFlow layers and batch processing

I have started to record screencasts to show the basic usage of photoflow as well as specific editing techniques. The first three videos are available from youtube.


Basic usage of layers and layer masks

http://youtu.be/TiBN3wXa6fs

This first video basically shows:
- how to open a RAW file and process the RAW data to produce an initial RGB image
- how to increase the global and local contrast in the mid-tones using luminosity masks
- how to crop the image with a fixed aspect ratio
- how to edit a radial gradient to add some vignetting effect

That was probably not my best edit ever, but it should give a reasonable idea of how to perform the basic editing steps and what kind of real-time speed one can expect from the current version of photoflow. Concerning speed, you will notice that the loading and initial processing of the RAW image takes quite long. That is because full-resolution data is being cached during this time, to speed-up the rest of the processing. I hope to make the whole thing a lot faster in future, but I'm presently concentrating on usability and stability more than speed optimizations.


 Pseudo-HDR with PhotoFlow and Enfuse

https://www.youtube.com/watch?v=Geh0mr4Vlww
https://www.youtube.com/watch?v=stMKHZ6b6Dg

The first video shows:
- how to save the RAW processing parameters as a preset and than use the preset to batch-convert a group of RAW files to TIFF.
- how to align and exposure-blend a group of bracketed images using align_image_stack+enfuse.

The second video describes as simple de-ghosting technique, which required less than 5 minutes of editing. Along the editing, you will see how to draw with the freehand painting tool directly on a layer mask.

The batch-processing is for the moment only fully supported under linux.

Friday, April 3, 2015

The clone-stamp tool

The "clone stamp" tool has been recently redesigned and completed, and now it is fully functional.
The tool can be found in the "misc" tab of the layer chooser dialog:


The usage of the tool is pretty easy: one has first to define a source region by left-clicking on the preview area while holding down the Ctrl-Alt keys. A circle shows the size of the area being cloned.


Once the source area is selected, there will be two circles shown in the preview: one corresponds to the current mouse position, the other to the area being cloned:


The pixels are cloned by dragging the mouse while holding down the left mouse button:



The clone/stamp tool is controlled by three parameters: the size of the brush, the opacity with which the cloned pixels are overlaid with the original ones, and the smoothness of the brush edges. The image below shows the same area cloned wih a brush smoothness of 100%, 50% and 0%:



The new  clone/stamp tool is available from the develop branch of the github repository or from the updated Windows and OSX installers.

Friday, March 27, 2015

Multi-scale decomposition with G'MIC and PhotoFlow



Mairi by Patrick David (cc by-sa)
Multi-scale editing of the forehead (mouse over to see original)

I've been silent for quite some time recently, for quite good reasons: I've been busy working on a new multi-scale decomposition tool, based on G'MIC "split_details" filter. Actually, porting the "split_details" filter was quite easy. The hard part has been to modify the processing engine so that it can handle multiple output images from one operation... but this is quite off-topic.

The multi-scale decomposition filter works in a similar way to the "Wavelet decompose" gimp filter: it creates a blurred base image and several separate layers containing the image details at increasing spatial frequencies. Each level has to be blended with the base image in "grain merge" mode in order to recreate the original. The various scales are obtained with classical gaussian blurs instead of wavelets, but apart from that they are equivalent to their wavelet counterparts.The filter is controlled by two parameters: the blur sizes of the smallest and largest detail scales, expressed in percent of the image dimensions. One needs to hit the "Update" button whenever one or both of the parameters is changed; this will trigger the re-computation of the various scales and will refresh the preview.


Image decomposition is typically used for skin retouching, and this post will be mostly devoted to this topic. However, I do not claim at all to be an expert of this technique.
Very briefly, the basic idea of skin retouching through multi-scale decomposition is to "erase" the unwanted elements in the layer where they are most prominent, leaving other details in higher or lower scales intact. For example, you might want to remove some visible skin defect without destroying the natural texture of the skin pores.
A very comprehensive introduction on the subject can be found on Patrick David's blog, here and here. From my side, I will limit myself at explaining how you can apply in PhotoFlow the techniques described by Patrick David.




The multi-scale decomposition filter is available in the "Details" tab of the layer chooser dialog. However, using this filter for skin retouching requires a bit of tedious "preparation work"... The good news is that I have already done all the work for you, and bundled into an handy preset that I strongly suggest to download and use as a starting point (you can get it from here).

Once loaded, the preset will create several group layers (one for each scale), with blend mode set to "grain merge". In this blend mode, the pixel values are added or subtracted depending wether they are above or below 50%; therefore, a value of exactly 50% does not modify anything.

Each group contains initially two layers, one with the details at the given scale and one filled uniformly with a 50% gray. The uniform 50% layer is associated with an opacity mask that is initially black, so that all image details are preserved by default in the final result.
In this configuration, unwanted details can be "erased" by simply drawing with a white pencil on the layer mask. The strength of the "detail suppression" can be controlled via the opacity of the 50% gray layer.

Of course, several other edits can be applied to the detail layers. Some examples are local gaussian blurs, or the healing brush to clone details from one place to another.






A practical example

Here is an example of the image decomposition in action. I've used a detail of the Mairi image, originally used in Patrick David's tutorial, for lack of a better idea and also for an easier comparison  with Patrick's own result... For this example I've used a "base scale" value of 0.2% and a "detail scale" value of 0.02%, and I've worked on the scales #5, #4 and #3.
First, I've enabled the "gray" layer in the "Scale 5" group, and then I've opened the layer mask  by double-clicking on the gradient icon.



Then I've double-clicked on the "gray mask" layer and I've started painting with a white brush of 20px, to progressively replace the large-scale details by an uniform 50% gray color.


The results of this step are shown below (click on the caption to see the original image, the original "scale #5" details, the final mask, the final "scale #5" details, and the resulting image).


Editing of the forehead on the details scale #5
Click type to see: Freehand mask - Details (scale #5) - Edited details - Image after scale #5 edit - Original


Next I have repeated the same operation on the 4th scale, this time on a smaller area in the center of the forehead (see below).


Editing of the forehead on the details scale #4
Click type to see: Freehand mask - Details (scale #4) - Image after scale #4 edit - Previous step

Finally, with two more strokes on the 3rd scale I have retouched just a bit more the two lines above the nose. The opacity of the gray layer was set at 50%, to show how one can produce very subtle changes through this method.


Editing of the forehead on the details scale #3
Click type to see: Freehand mask - Details (scale #3) - Image after scale #3 edit - Previous step


Conclusion

Of course this example if far from being a complete skin retouching tutorial, but it should be enough to give an idea of the potential of multi-scale decomposition and of how to use this technique in photoflow.

The nice thing is that the whole set of steps is non-destructive: the parameters of the scale decomposition as well as the edits of the individual scales can be tweaked at any moment with no limitations. When changing the decomposition parameters, it is necessary to click on the "Update" button in order to refresh the preview image. This will take a bit of time to complete, as the program needs to re-compute the different scales and cache the data again. Once the computation finished, all layers will be automatically updated to reflect the new settings.

Last but not least, this tool is fully integrated with the rest of the processing pipeline, and it is therefore possible to perform the skin retouching directly on a RAW image, without the need of an intermediate RAW converter.

Tuesday, February 17, 2015

Edge sharpening with G'MIC "Gradient norm" and "Richardson-Lucy de-convolution" filters

Recently I've added two more G'MIC filters into PhotoFlow:

  1. The "Gradient norm" filter, which allows to identify the edges in an image and to create a convenient grayscale edge mask
  2. The "Richardson-Lucy de-convolution" filter for image sharpening, which generally yields better results than the standard Unsharp Mask technique
Combining both of them, it is possible to create a filter that selectively sharpens the image portions that are already "quite sharp", and leave untouched other smooth regions (like an out-of-focus background). The main interest of doing that is to avoid sharpening the noise in smooth areas. One can usually also increase the sharpening strength, because the effect is restricted by the edges mask. Moreover, the technique is not limited to the RL de-convolution filter, since the edge mask can be applied to any kind of sharpening tool. In PhotoFlow, you can currently choose between UnSharp Mask (USM) and RL de-convolution.

Below you can see the result of the edge masking filter, compared with the original image and a classic sharpening. For comparison, I've also added the output of edge-masked USM from PhotoFlow and RawTherapee, so that you can better compare the quality of the result with other existing open-source alternatives (it seems that there is no edge-masked sharpening available in Darktable for the moment).


Click type to see: Original - RL deconvolution sharpening - RL deconvolution edges sharpening - USM edges sharpening - USM edges sharpening (RawTherapee) - Edges mask

In this post I will not go into all details of how to create an edge-masked sharpening filter in PhotoFlow. Instead, I am providing a preset that automates the whole procedure, and I will only describe the few adjustment layers that have an impact on the output result (most of the layers in the preset are just buffers and copy operations). The screenshot below shows the preset in action, with some annotations that point to the relevant layers. The preset can be directly downloaded from here.


As you can see, the preset allows to directly visualize the edge mask being applied: for that, one has to select the "gradient norm" layer and activate the "show active layer" radio button below the preview area. Two parameters in the "Gradient norm" tool mainly control the generated mask: the "Threshold" value determines how much sharpening is applied in smooth areas, while the "Multiplier" value controls the amount of mask pixels that are purely white.

The "sharpening" layer lets you define the sharpening method (currently the standard Unsharp Maks and G'MIC "Richardson-Lucy de-convolution" are implemented) and its strength.

Finally, The "Halo control" group allows to optionally adjust the strength of the dark and light sharpening halos separately. I personally find that reducing the opacity of the light halos to 50% gives slightly better results.

The advantage of this approach is that the edge mask can be directly applied to any additional sharpening method that might be added in the future, and vice-versa new edge detection methods could be used to mask any of the existing sharpening filters.

Saturday, February 14, 2015

"Autumn at the National Rhododendron Gardens" edit - Part 2: more sky editing

In this second part of the step-by-step description of my final edit of the image in this google+ post of the "Open Source Edit my RAW" discussion group, I want to introduce another simple yet powerful technique for enhancing the sky in landscape pictures.

The technique consists in blending the "b" Lab channel with the original image in "Overlay" mode. Below you can see a comparison between the original image, the result of the previous step, the result of the "b" channel blend and the "b" channel itself.



Click type to see: Original - Step 1 result - "b" channel Overlay result - "b" channel

In the "b" channel, anything that contains some blue is below 50% and gets darkened in the overlay blend, while "yellowish" areas (including leaves and grass) are above 50% and result in lighter tones after blending. In order to keep the lightness of the tree and grass close to the original, I've added a slightly darkening tone curve to the Overlay blending input. The tone curve, as well as the settings for the "b" channel blend, can be seen in the screenshot below.



The nice thing with this technique and the one described in the previous post, is that the result is achieved using only the image data itself, without any masking. The effect is therefore very "natural", without any presence of disturbing halos in the transition areas.

In order to simplify the application of this steps, I've prepared a preset that automatically adds a group layer containing both the red channel blend and the "b" channel overlay. The preset can be downloaded from here
The technique turns out to be also quite powerful for haze removal. Below I have applied the preset to the RAW image shared in this google+ post (mouse over to see original image):


Saturday, February 7, 2015

"Autumn at the National Rhododendron Gardens" edit - Part 1: the sky

This post describes step-by-step how I've obtained the final edit of the image in this google+ post of the "Open Source Edit my RAW" discussion group. You can see the final result here.

When editing this picture I had few guiding ideas in mind:

  • the sky was too bright, and I wanted to obtain a more saturated blu tint as well as more contrast and "texture" in the clouds
  • the tree in the foreground is the main element of the composition, so I wanted to give it some "pop"
  • the scene gave me a "late afternoon" feeling, so I wanted to add some overall warm tone

The starting point is the original RAW image, processed using the in-camera settings and the standard Adobe color matrices (for a detailed tutorial on how to open and process a RAW image, see here).

Let's see my editing step-by-step, starting from the sky and clouds. Actually, the techniques described in this and the next posts are not really peculiar to PhotoFlow, and most likely can be applied with minor modifications in other image editors.

Part 1: sky editing

In oder to darken the sky and clouds, I will use a rather common but very powerfull technique, which consists in replacing the luminosity channel of the original image with its own RED channel, and then blend the result back with the original image in "Darken" mode.

The screenshots below shows how this can be achieved in PhotoFlow.





Here are the detailed steps that I've followed:
  1. Add a group layer (I've called it "Sky edit") above the developed RAW image (new groups can be created by clicking on the "G+" button).
  2. Add a "clone" layer inside the group: for that, you have to select the empty row below the group name, than click on the "+" button to open the tool chooser dialog, and then select the "Clone layer" row in the "Misc" tab before clicking the "OK" button to close the dialog.
  3. In the "clone layer" configuration dialog that will pop up, you have to choose the layer corresponding to the initial image (in my vcase "RAW developer") for the layer name, and the "R" channel for the source. The image is graysacle at this point, since we only cloned one channel. To "restore" the colors, set the  blend mode to "Luminosity".
  4. You will notice at this point that the sky got quite darker, but the reddish leaves in the trees became very bright. What we would like is to keep what is darker in this R channel blend, and preserve everything else from the original image... to achieve this, you have to change the blend mode of the "Sky edit" group from "Normal" to "Darken"


There it is! The sky has now a deeper blue and more contrast in the clouds, all that without any masking and unwanted halos around the transition regions. Click on the caption elements to see the original image, the red channel, and the luminosity blend before the final "Darken" blend.



Click type to see: Original - Red channel - R channel Luminosity blend - Final result
  
The next part will show how the contrast in the foreground tree has been improved through a mid-tones liminosity mask associated to a curves adjustment.