Results 1 to 6 of 6

Thread: Qtpfsgui Notes: The Front End - HDR Maps

  1. #1
    David's Avatar
    Join Date
    Apr 2008
    Location
    Cheshire and Dumfries & Galloway
    Posts
    732
    Real Name
    David

    Qtpfsgui Notes: The Front End - HDR Maps

    Hi All -

    Qtpfsgui Notes - High Dynamic Range Radiance Maps

    These notes look at the methods that Qtpfsgui uses to generate what should be referred to as High Dynamic Range Maps, the files that can subsequently be tone-mapped.

    Basics:

    On powering up, Qtpfsgui presents the user with the options of creating a New Hdr or Opening and existing Hdr.

    Choosing the New Hdr option releases a wizard which allows the loading of images. Loading is achieved, as in similar situations, by activating the Load Images option and choosing the images from a folder. The images are listed along with an exposure value. You can load 1 or more images as JPG, TIFF or RAW files. If the JPG or TIFF files (with EXIF data attached) are 8-bit files then each image should be displayed in a small panel, and the option to alter the exposure value (in EV units) is given. However, altering this value does not alter the display. If the TIFF files are 16-bit then the images are not displayed. These points are not noted in the Qtpfsgui Manual as far as I can see.

    Note that your camera manufacturer's software should allow you to create 8-bit TIFF files or 16-bit TIFF files. TIFF files are easier to process than RAW files as the RAW file has to be converted using a built-in version of DCRaw. If this version is not up-to-date, or if you are not familiar with its parameters, untoward results may occur.

    If you click Next at this point, and if you are working with 8-bit images, you will be taken to an alignment screen, the workings of which are fairly straightforward. Generally, you should check that the alignment of images is correct. There are two algorithms for alignment, but I normally use the first, “hugin's_align_image_stack”. It is based upon part of the powerful open source software for photo stitching (http://hugin.sourceforge.net/ ). If you are using 16-bit files then the alignment tool appears to work automatically, although it does take some time to finish. (My test files took 2 minutes 10 seconds for aligning 3 images each 3888x2566 pixels on my quad core machine. Note also that although there is an option for designating a quad processor Qtpfsgui under Preference, only one of the cores does any work in my hands.) Note again that there is no mention let alone discussion of any of this in the Qtpfsgui Manual or Web site.

    Having clicked Next, the wizard proceeds to a second screen “Choose Settings for Hdr Creation”. The user is presented with a drop down menu offering 6 profiles. The wizard states, “The first one in the list usually leads to best results, change it only if the resulting Hdr is not good enough.” I expect most users take this at face value, but the statement is misleading and probably wrong for most work. There is no explanation of what the options are, let alone what Profile1to Profile6 are all about. Three other boxes are presented: Weighting function, Response Curve, and Hdr creation model. These three parameters turn out to be one of the most important features of Qtpfsgui as a platform for working with Hdr maps and images. Yet their importance is not even mentioned. I shall return to this in a moment, but let me run the wizard to its end. Choosing, for now, Profile1, click Finish. The software now calculates the Hdr map from the data (3 aligned images in this case) and presents the result as an image in a new screen. At this point, the wise user would wish to save the map by activating “Save Hdr as...”. The usual type of save screen opens and you can send the Hdr to whatever folder you choose after giving it a file name. Note that there are five save formats. For these notes, I choose the “.hdr” or Radiance option.

    Before moving on to tone mapping, the user should note that the image that is presented is the result of a simple tone mapping option instigated by Qtpfsgui. Thus, unlike some commercial software in which the Hdr map is highly distorted, Qtpfsgui gives you something to work with. There is also a histogram, green on a blue background at the top of the image. You can move either or both ends of the blue shading by picking them up with the mouse (left click to engage and move). The image changes accordingly. You can also change a mapping function from Gamma2.2 (presumably the best for most monitors) to linear, logarithmic and other settings. Note, however, that none of these alterations makes any difference whatsoever to the Hdr map that you are about to tone map. They are visualisation tools.

    Tone mapping options have been discussed in other posts.

    Custom Settings

    Returning to the “Choose Settings for Hdr Creation” window of the wizard, the user can explore various options. First, I list the six profiles that are on offer:

    Profile No. - Weighting Function, Response Curve, Hdr creation model.

    Profile1 – triangular, linear, Debevec;

    Profile2 – triangular, gamma, Debevec;

    Profile3 – plateau, linear, Debevec;

    Profile4 – plateau, gamma, Debevec;

    Profile5 – Gaussian, linear, Debevec;

    Profile6 – Gaussian, gamma, Debevec.

    Matters now become a bit technical, but there is at least one hidden gem (actually a very rough diamond) to be found. The “Debevec” bit is easy. This is the name of the creator of one of the first successful algorithms to model HDR maps – Paul Debevec. He is associated with the commercial software – HDR Soft. (See also Technical Notes below).

    The Weighting Function refers to the way in which the values of individual pixels at the different exposure settings of the set of images are averaged in the final HDR map. A triangular weighting function gives most weight in averaging to the central exposure for any given pixel, and lesser weight to the flanking exposures. The Gaussian function is similar except the weighting ratios are different, while the plateau function appears to a straight forward average.

    The Response Curve refers to the way the software is to treat the camera response to light. It is here that an immediate point arises. Cameras do not have linear responses to different levels of light. Thus, a linear response curve seems inappropriate. Thus, Profile1 may not be the best option as Qtpfsgui suggests. Of the six profiles on offer, Profile6, followed by Profiles 2 and 4, seem, in my hands, to give better results.

    If you click the “Use custom function” box on the wizard screen, followed by Next, a new window appears. This windows offers you the choice of Weighting Function, viz. triangular, plateau or Gaussian; a choice of Response Curve, viz. gamma, linear or log (this is new); and at the bottom a choice of creation model, Debevec or Robertson. The latter model is similar to the Debevec model, but, if I understand the original papers correctly, the Robertson method gives higher weighting to those exposures that have higher times, i.e. to longer exposure values. Overall, at this point the user has 18 different options!!.

    The question arises, “Does this matter?” The answer is, “It depends.” Different options lead to different Hdr maps which, in turn, give rise to different results with the Tone mapping operators. Having run several tests with different initial files, my view is that Profile6 with its Gaussian Weighting function and gamma response curve gives richer Hdr maps, see below. However, if you really want to push the boat out, check out the two further button choices in this window of the wizard. Under Response Curve there is the option of using a predefined response curve or a “Load response function from file” button. Underneath, there is a radio button inviting “use calibration to find response curve (robertson02 algorithm)”. Click on this button and a “Save response” option appears. Click on “Save as...” and a typical save window appears for you to choose a place to save the file. (I put these files in with the Hdr map files.) Give it a name and it will be saved with a ”.m” extension. “So what's it all about, Alfie.” You are just about to create a camera response curve for your camera, lens etc. Strictly, this response curve pertains to the images that you used to create this file. But in practical terms you can use this file to create an Hdr map from any set of images. As usual, none of this is hinted at let alone explained and developed by Qtpfsgui. Click “Finish” to start the process. Processing times for custom settings are very variable, normally between 1 and 6 minutes. However, one Response Curve calculation took 18 minutes on this quad core machine. The reason for these long processing times is that the calculations involve iterative fitting of the data to get the best fit via a least squares algorithm. If you use a pre-set such as gamma, then the curve is already defined, so processing is quick.

    The “.m” files for the Response Curves are text files that can be open by any reasonable editor, although be warned that such a file from a 16-bit TIFF set of images contains 3 x 2^16 numbers. You can then transfer these three sets of values (one for each colour channel) to a spreadsheet and plot out your camera response curve.

    Here are two screen shots of the histograms of images created via different Hdr creation models. The first is using Profile1 and the second using Profile6. The Hdr maps were tone-mapped with the Reinhard '02 operator at default values. The second histogram encompasses a greater range and shows greater differentiation. Similar results occurred with other TMO's.

    HassProfile1.jpg

    Qtpfsgui Notes: The Front End - HDR Maps

    and HassProfile6.jpg.

    Qtpfsgui Notes: The Front End - HDR Maps


    Cheers

    David

  2. #2
    Davey's Avatar
    Join Date
    Sep 2008
    Location
    UK
    Posts
    530

    Re: Qtpfsgui Notes: The Front End - HDR Maps

    thanks again for these. Have you put these tutorials anywhere else like on a dedicated qtpfsgui blog or wiki? Might be worth looking into as it will help many people and secondly encourage others to contribute and do the same. Such community driven support is essential imo, usually one of the strongest points for both FOSS and proprietary software is it's community support.

    Community driven support often broadens the user base too and often affects development side improvements and features in future versions. Technically excellent applications are all very well but if there is no real documentation or support on using it without prior knowledge then it's unlikely to become popular which is always bad thing (for proprietary software because it makes less money and for foss software because it has less users contributing from bug testing and making UI more slick to improving code and adding features etc).

  3. #3
    David's Avatar
    Join Date
    Apr 2008
    Location
    Cheshire and Dumfries & Galloway
    Posts
    732
    Real Name
    David

    Re: Qtpfsgui Notes: The Front End - HDR Maps

    Davey - Thanks for the comments. I have thought about posting these notes elsewhere, but I'm not sure how to go about posting on Wiki. There's a Qtpfsgui blog on Flickr, but it seems almost moribund to me. I'll look further into other Qtpfsgui sites.

    Thanks again

    David

  4. #4
    New Member
    Join Date
    Jul 2010
    Posts
    8
    Real Name
    Lucan

    Re: Qtpfsgui Notes: The Front End - HDR Maps

    I also think it would be great to see all these writeups in one convenient place. I joined this site just because of them - everything else I found about the various tone mappers has been of little to no use at all, whereas the stuff you've written here has helped me massively!

  5. #5
    Klickit's Avatar
    Join Date
    May 2010
    Location
    In a bus somewhere in New Zealand
    Posts
    796
    Real Name
    Kit, aka Slimtla

    Re: Qtpfsgui Notes: The Front End - HDR Maps

    I've seen more than a few references to Qtpfsgui around the interwebs and many users seem less than satisfied, probably because the interface is not really understood. I have avoided this particular app because of such remarks, but maybe it needs revisiting. David, you have gone to a lot of trouble over this and I will certainly point people here who have questions and difficulties. Many thanks.

  6. #6
    New Member
    Join Date
    Sep 2011
    Location
    New York City
    Posts
    1
    Real Name
    Paul

    Re: Qtpfsgui Notes: The Front End - HDR Maps

    I seem to be having some trouble with this program. It allows me to load a single image, I get as far as the choosing profiles dialog, click finish and than nothing happens after that. I'm using Ubuntu 11 and installed this program from the Software Center. What could be the cause?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •