RAW development with Vulkan darktable

Getting Acquainted

Your best bet is to start the program in a terminal window by typing the vkdt command, followed by the definition of the path on which the image files and/or camera raw data reside (e.g., vkdt ~/pictures/). This opens a window with the management module, in which vkdt builds thumbnails of the photos. They take up the major part of the window.

On the right, you will see a sidebar from which you can access various administrative functions (Figure 1). There are the settings, collect, and tags groups. The settings section does not offer too many functions as of yet; you will only see the hotkeys button. If you click on it, a dialog appears to let you define keyboard shortcuts, but this does not work smoothly at this time.

Figure 1: The vkdt user interface is reminiscent of darktable.

To get started, the collect module is more important. Press the open directory button at the bottom to add more directories with photos to the software database. A dialog now appears; it is basically a very simple file manager. However, it does not display files, only directory names. One of the folders is always marked with a [d]. Clicking [d] ? takes you to the parent directory. Then change to a directory by single-clicking on its name to navigate to a folder containing photos. Then press OK bottom right to add the folder's contents to the database. The file manager closes and the new thumbnails start to appear in the window.

If you click on one of the thumbnails, vkdt displays additional function groups in the sidebar. For example, you can tag the photo using the assign tag button in the tags group. Double-clicking a thumbnail opens the photo in the Edit module and displays a large preview (Figure 2). You can zoom into the photo in the usual way with the mouse wheel or single-click with the center mouse button to scale the view to 100 percent. You can click and drag to move the view. Then press the center mouse button several times to return to the full-screen view. Press Esc to switch back to the administration module.

Figure 2: The editing module consists of a large preview window, a waveform histogram, and the tool panel.

Color Management

Before you start editing photos, you need to set up color management. You do this with a small Python script named read-icc.py in the vkdt/bin/ folder. To run the script, Python must be in place on the system. For Debian and Ubuntu, the required packages go by the names of python3-minimal and python3-numpy. The script is missing from the DEB and RPM vkdt packages; you need to download from GitHub in this case.

Change to the /vkdt/bin directory and run read-icc.py when you get there, using the profile for your monitor including the directory path as a command-line argument (Listing 5, lines 1 and 2). The tool reads the data from the monitor profile and creates a small text file named display.profile in vkdt/bin/. In the next step, you may need to customize the filename and copy the file to the correct directory. The display.profile filename must contain the xrandr monitor name so that vkdt can work with it. This is the name that vkdt will show you at startup time.

Listing 5

Color profiles

01 $ cd vkdt/bin/
02 $ ./read-icc.py /<path>/<profile>.icc
03 [...]
04 $ ./vkdt ~/images/
05 [...]
06 [gui] monitor [0] HDMI-0 at 0 0
07 [...]
08 [gui] no display profile file display.HDMI-0, using sRGB!

Then call vkdt in the terminal (line 4), minimize the program window and go back to the terminal where you started vkdt. You will see various messages there (lines 6 and 8). The screen name is HDMI-0 on my lab system. I changed the second part of the name to HDMI-0 to reflect this in the file we just created, display.profile. The full filename is now display.HDMI-0. Vkdt can handle up to two monitors with profiles.

If you installed vkdt on Debian with Apt, you need to copy the renamed file to the /lib/vkdt/ directory; you need root privileges for this. If you compiled the application from source code yourself, leave the profile file where it is. The next time you launch the program, the message regarding the missing monitor profile should have disappeared.

There are many different types of monitor profiles. read-icc.py will occasionally be unable to use a profile because it turns out to be too complex. I recommend that you use DisplayCAL [15] to create a profile for your monitor and select the simplest profile type, single gamma + matrix, in the profile settings there.

Developing RAWs

The editing module provides access to the editing tools via the wide sidebar to the right of the preview window. You will find the favourites, tweak all, pipline config, and esoteric tabs here.

The favourites tab gives you rapid access to important settings such as image brightness or clarity. The Tweak all tab lets you adjust the settings of all active nodes with more granularity (Figure 3), and you can configure the vkdt node graph in pipeline config. This is where you can enable or disable individual nodes, or move them to the back or front. The esoteric tab gives users access to the more unusual features such as presets or playing animations.

Figure 3: The main modules for adjusting contrast, brightness, and color are colour, filmcurv, and llap.

Under the tweak all tab, the most important node here is colour 01, where you adjust the image brightness (i.e., the exposure and white balance). Click on it to expand the node and display the adjustment options. The first slider, named exposure, is responsible for brightness. Slide it to the right to lighten the photo or to the left to darken it. The three sliders lower down, white red, white green, and white blue, adjust the white balance.

By default, vkdt takes care of the camera's white balance, which is often slightly yellowish. If this is the case, you need to move the white blue slider to the right to enhance the blue component and counteract the yellow cast. In most cases, this will first create a different color cast, such as a red cast. Then move the white red slider a little to the left. Another possibility would be to lower the red and green components. You can correct a green cast either by reducing the amount of green or by increasing the amount of red or blue. You can correct a cyan cast by increasing the red value.

The filmcurv 01 and llap 01 modules are responsible for contrast enhancement and partly also for color intensification. Disable them and you will see the unprocessed, low-contrast, and colorless RAW image. In the case of filmcurv 01, this is a tone curve that vkdt applies to the image. By default, the S-shaped curve brightens the light tonal values and darkens the dark ones, resulting in an overall contrast improvement. Because the module works in the RGB color space, the colors are intensified at the same time.

The values x0 through x3 and y0 to y3 represent four points on this curve. x0 and x1 and y0 and y1 are in the dark area; x2 and x3 and y2 and y3 are in the light zones. The x values move the points to the left or right, and the y values move them up or down. If you move the points to the right or up, this lightens the tonal value areas in question. Dragging them down or left makes them darker. Using the black slider, you can also adjust the brightness by applying a logarithmic curve. If you change this, the image is brightened or darkened, with the darker pixels being affected more by the change in brightness.

The local Laplacian filter llap 01 changes the local contrast of the image, which is also known as the clarity (Figure 4). Drag the clarity slider to the right to increase the local contrast. However, this mainly changes the clarity for pixels of medium brightness. You can use the sigma value to determine how bright or dark they can become. If you drag the slider to the right, the algorithm evaluates more pixels as midtones. You can use the shadows and hilights sliders to adjust the local contrast in the brightest and darkest areas of the image.

Figure 4: The llap module uses image pyramid technology to change the local contrast.

Using the crop 01 module not only lets you crop the photo but also straighten it and correct the perspective (Figure 5). Drag the rotate slider a little to the right to rotate the image to the left. If you want to tilt the image to the right, first move the slider all the way to the right and then a little to the left. To crop the photo, first enter the length-to-width ratio in the aspect ratio input box. A value of 1 creates a square cropping frame, while 1.5 creates a landscape frame with a ratio of 3:2, and 0.75 a portrait frame with a ratio of 4:3.

Figure 5: Using the Rotate and Crop tool takes some getting used to.

Then click the crop:crop start button. Move the mouse pointer to a position near the right or bottom edge of the crop frame, press the left mouse button, and drag the mouse left, right, up, or down to resize the frame. If you want to change the vertical position of the frame, move the mouse cursor to the frame's upper edge, press the left mouse button, and move the mouse up or down. To position the rectangle horizontally, position the mouse cursor on the left edge of the rectangle, press the left mouse button, and drag the mouse to the left or right. Once you are satisfied with how you have set the size and position of the frame, click crop:crop done.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Darktable 1.2

    Darktable shines as the most powerful free RAW converter, with impressive new features in the current version 1.2.

  • Perfect Balance

    The current RawTherapee version finally adds selective image editing, among other long-desired features, to help it compete with king of the hill, darktable.

  • ART – Another RawTherapee

    RAW converters are the first tool to use in editing photos, and new solutions and programs have the potential to make users' lives easier. How does ART stack up?

  • Darktable 1.6

    Hardly anything affects the quality of photos more than play of light and shadow, or the brilliance of colors. Darktable fixes incorrect exposure, conceals unfavorable lighting conditions, and ensures harmonious colors.

  • Tutorial – Krita

    Not many people are aware that Krita, the popular open source painting program, is also great for editing photos.

comments powered by Disqus