Initial Beta Release of FocusFusion

Just released the initial beta of FocusFusion to the Windows Store!

This is my first attempt at building an appx with Delphi and releasing it to the store 🙂

You can download it from the Microsoft Store.

FocusFusion is a utility for focus stacking photography. It can take a set of images captured with shallow depth-of-field and merge them together to create a single “all-in-focus” image. This allows otherwise impossible images to be made.

FocusFusion for focus stacking

FocusFusion automatically performs image alignment. Simply specify your images and click “Render”.

If you require more control, it offers two complementary algorithms.

The first algorithm, which is also the default, computes a depthmap, then fuses the source images accordingly. It works well in most cases, particularly when there are large regions without overlap. It requires all source images to be sorted front-to-back or back-to-front.

The second algorithm uses a wavelet strategy. It can handle complex cases, including images with very high overlap and translucency. However, it is vulnerable to increased noise in some situations, so it is not general purpose. But when it applies, it can be like magic!

FocusFusion also offers the option to fine-tune the rendered image using a retouch clone brush.

All of the above processes are performed at a minimum of 16 bits per channel, which is equivalent to 48 bits per pixel.

More details can be found in the FocusFusion page.

 

Delphi-native

The logic and algorithm for FocusFusion are implemented in Delphi. As a result, the program is relatively compact since it does not have any dependencies on OpenCV or other large libraries.

Several key routines have been implemented in assembly language, and some image processing kernels are dynamically compiled at runtime using DWScript. Image loading and saving functionality utilize the Windows Imaging Component, while the Direct2D canvas is leveraged for displaying images. Additionally, multithreading capabilities are achieved through the use of the experimental IOCP task scheduler recently added to DWScript.