Hi,
here is the third installment of the Gradient Domain Module. The new feature this time is the Gradient Domain Mosaic Composition process, something I played with a while ago (
http://pixinsight.com/forum/index.php?topic=2124.0). The general idea is that you use gradient domain operations to smoothly connect a number of pictures, with no small scale gradients.
The effect is best explained be looking at the attached screenshot:
- left: Some portrait embedded into a black background
- center: Juan's portrait is smoothly embedded into to gray background, as merged by the Gradient Domain Mosaic Composition process.
-- the differences are adjusted by generally brightening the backgorund
-- remaining differences are smoothed over a large area, very much in the same fashion a thin elastic membrane would respond to external forces.
-- There are no longer any hard gradients between the two regions - if they can be avoided at all.
- right: the GUI.
-- The top is a list of files, very much like the list of files in ImageIntegration. Below this is the parameter section
-- You can select how two images are merged: Overlay means that images are stacked on top of each other, with the large image "winning". "Average" computes the average brightness in regions where some images overlap.
-- Black Point allows to specify the brightness level that is considered Background/transparent. 0 (black) is the default - just what ImageRegistration will produce.
-- Finally, "Generate Mask" causes the process to generate an additional picture showing the different image regions.
Other features of this release:
- Gradient Domain HDR compression is the second process in this module. No major changes here.
- By default, the module will now use the solver developed by Carlos (used with permission
)
-- That means that no FFTW library is needed any longer (FFTW would prevent inclusion into the PI product - FFTW charges for commercial use.).
-- For most images, this solver is fast enough.
-- However, it occasionally shows some artifacts. I will have to work with Carlos to find the bug.
- If you like, FFTW can be used as an alternative by using the suitable #define in GradientsBase.h and linking with libfftw3.so. It is faster, consumes less memory, and does not show the problems.
- Again, the whole module has been tested on Fedora14-x64. I don't see any reason why it should not compile and work on other PI platforms.
Attached are the sources. An application example will follow later.
Georg