Approve the Cookies
This website uses cookies to improve your user experience. By using this site, you agree to our use of cookies and our Privacy Policy.
OK
Forums  •   • New posts  •   • RTAT  •   • 'Best of'  •   • Gallery  •   • Gear
Guest
Forums  •   • New posts  •   • RTAT  •   • 'Best of'  •   • Gallery  •   • Gear
Register to forums    Log in

 
FORUMS Post Processing, Marketing & Presenting Photos HDR Creation 
Thread started 30 Jan 2013 (Wednesday) 22:08
Search threadPrev/next
sponsored links (only for non-logged)

PixInsight HDR mini-tutorial

 
kirkt
Cream of the Crop
6,602 posts
Gallery: 5 photos
Likes: 1556
Joined Feb 2008
Location: Philadelphia, PA USA
     
Jan 30, 2013 22:08 |  #1

Hi folks,

I have recently been trying a new approach to working with linear, 32bit data. Enter "PixInsight" a cross-platform application that appears to have its roots and user base in astrophotography and image processing. Well, because many image processing tasks are universal, it turns out that PixInsight is a full-fledged image processing delight when it comes to making HDR images.

In this mini-tutorial, I would like to demonstrate the approach one may use to merge a sequence of raw images into a single, 32bit image ready for further processing and finishing in Photoshop.

As some of you may be aware, I have been using an application called Zero Noise, developed by forum member Guillermo Luijk (aka "_GUI_"). Well, I know _GUI_ has been busy and that it appears as if Zero Noise has stalled, although it is still usable if you are persistent enough or use the Linux version. Coincidentally, PixInsight uses a very similar approach to making linear HDR data from multiple exposures, and it couldn't be simpler. Also recall, if you ever used Zero Noise, that the resulting image was scaled to the shortest (darkest) exposure of the sequence, necessitating some clever post-processing and knowledge to make the full glory of the data come alive in the realm most of us are used to editing images.

Well, I am happy to report that PixInsight merges images a lot like Zero Noise, creates output that resembles that of Zero Noise and also provides the tools necessary to reestablish the image into the realm of what most of us are comfortable editing. Here is a brief walkthrough.

1) Merging raw exposures

This is pretty straightforward. PixInsight will accept raw files and will process them so that it can compare two images at a time, thresholding between the two images and deciding which images to keep from the longer exposure, and which to take from the shorter exposure. If you would like, you can have PixInsight generate a binary map of the threshold - a black and white image that is black where the longer exposure pixels were used and white where the shorter exposure pixels were used.

Here is the merge interface:

IMAGE: http://kirkt.smugmug.com/Photography/Photo-of-the-Day/i-LvSX9qG/0/X3/HDRCompositionWindow-X3.jpg

Pretty straightforward. The "binarizing threshold" permits you the ability to adjust the threshold level at which the map separates dark from light exposure pixels. You press the little circle button in the bottom left corner of the window and a terminal window pops up to give you feedback on what is happening. Essentially, PixInsight is invoking draw like this:


dcraw -w -q 3 -t 0 -o 0 -4

This is nerd speak for "make me a high quality (-q 3), linear 16bit file (-4) with no color profile (-o 0), white balanced using the camera white balance setting, if possible (-w) - don't rotate it (-t 0)."

So, the raw files are decoded and compared to see which pixels get used in the final merge.

Here is a binarized map, in this case for the longest shadow exposure compared with the midtones exposure:

IMAGE: http://kirkt.smugmug.com/Photography/Photo-of-the-Day/i-HQMpzML/0/X3/map-X3.jpg

In this map, the shadow tones that are kept are shown in black, the mid tones that are used from the next image are shown in white. THe merger progressively compares the composite to the next image to merge all of the best pixels.

As we learned from using Zero Noise, this merging process does not require 7 exposures 1 EV apart to get the job done - you could use the first, middle and last to get the full dynamic range represented, with none of the artifacting that can happen with merging algorithms that average pixels in some weighted or non-weighted manner.

2) The Result

Here is what you get from the merge:

IMAGE: http://kirkt.smugmug.com/Photography/Photo-of-the-Day/i-HcNmc24/0/X3/HDRimage-Histo-MedianStats-X3.jpg

Pretty dark. To the right of the image is the "Histogram Transformation" window - right now just take a look at it to notice that the histogram reveals what we already see in the image - virtually nothing in the histogram until the very left edge. How about that?

Below the image is the Statistics window, telling you all about your pixels. This is important. To be able to transform this data into something more useable, we need to balance the histogram.

Kirk
---
images: http://kirkt.smugmug.c​om (external link)

  
  LOG IN TO REPLY
kirkt
THREAD ­ STARTER
Cream of the Crop
6,602 posts
Gallery: 5 photos
Likes: 1556
Joined Feb 2008
Location: Philadelphia, PA USA
     
Jan 30, 2013 22:09 |  #2

3) Balancing the Histogram - Histogram "Stretch"

Here is a video tutorial I found that is the basis for the technique I will describe - watch the video.

http://www.youtube.com​/watch?v=1C_YMhLDlEc (external link)

The idea is to balance the midtone value of each color channel based on the median value of the pixels in that channel over the entire image. Median? The median is the midpoint of the frequency of occurrence of the various pixel values in the distribution of pixels in the image. You want to line up the mid tone values in each channel by assigning the midtone value in that channel the median value of that channel. This will stretch the histogram into a more useful form. We will be performing a Histogram Transformation - hence the tool of choice, as shown in the screen shot above.

So, we notice in the Statistics window the median value for each channel - it is given in scientific notation because in this floating point world, all values in the image fall between 0 and 1. So, for example, the median value of the pixels in the red channel is 4.881701e-03 - In the Statistics window, the first column is Red channel, second column is Green, third is Blue.

We want to enter the Red Channel median value into the Histogram Transformation window's Red Channel Midtone field:

IMAGE: http://kirkt.smugmug.com/Photography/Photo-of-the-Day/i-kMjmXK5/0/X3/RedChannelMedian-X3.jpg

Above ^^^ is the result - we have stretched the red channel - notice the histogram? The lower histogram is the original, the upper histogram is what you will get if you apply the current transformation (it is currently being previewed in the window showing the bright red image). Now the red values are nice and spread over the histogram. We repeat this process for green and blue, entering their median values in their midtone fields. Note, to enter data for just one channel, you need to press the little channel selector button - notice how the Red channel button is pressed in the above screen shot.

Now, once we perform the individual channel stretches, here's what we get:

IMAGE: http://kirkt.smugmug.com/Photography/Photo-of-the-Day/i-ZRxZGcZ/0/X3/AllChannelsMedian-X3.jpg

Nice, but a little too bright. We need to remap the tones back to reasonable values - the video tutorial I linked to above suggests entering a midtone value of about 0.75 in the RGB/K or luminance channel mid tone. Here's what you get when you do that:

IMAGE: http://kirkt.smugmug.com/Photography/Photo-of-the-Day/i-T6bHmVw/0/X3/LumChannelReestablished-X3.jpg

Now things look better. Here is the resulting histogram showing how our remapped tones are represented after the histogram transformation:

IMAGE: http://kirkt.smugmug.com/Photography/Photo-of-the-Day/i-NXC3Zbt/0/X3/GoodHisto-X3.jpg

After this step, I convert to sRGB gamma 1.0 and save as 32bit floating point TIFF. Now I can perform edits in Photoshop or After Effects to get the final image.

Kirk
---
images: http://kirkt.smugmug.c​om (external link)

  
  LOG IN TO REPLY
kirkt
THREAD ­ STARTER
Cream of the Crop
6,602 posts
Gallery: 5 photos
Likes: 1556
Joined Feb 2008
Location: Philadelphia, PA USA
     
Jan 30, 2013 22:09 |  #3

This is not like merge and tone map that you typically use in HDR applications, but it provides all of the power to manipulate the light the way you want it. You could also skip the stretch step and export the linear 32bit TIFF for traditional tonemapping, too!

There you have it. Here is the result after some small adjustments in PSCS6:

IMAGE: http://kirkt.smugmug.com/Photography/Photo-of-the-Day/i-pxZqbM4/0/X3/HDR_clone_clone-sRGBg1-final-X3.jpg

and here is the three-image map - the shadows may look slightly different than the map in Step 1 because I tried to recreate the map shown in step 1 after making this one below:

IMAGE: http://kirkt.smugmug.com/Photography/Photo-of-the-Day/i-f2m95vJ/0/X3/imagemap-annotated-X3.jpg


PixInsight offers a 45-day trial, fully featured - you need to apply for a trial license:

https://pixinsight.com​/trial/index.html (external link)

Enjoy!

kirk

PS - no noise in the shadows. ;)

Kirk
---
images: http://kirkt.smugmug.c​om (external link)

  
  LOG IN TO REPLY
wolfden
Goldmember
Avatar
1,439 posts
Likes: 2
Joined May 2008
     
Jan 31, 2013 01:40 |  #4

ouch, kinda spendy for the $232 license


~KJS~
Photos by KJS (external link) | Flickr (external link) | Blog (external link) | 500px (external link) | Google+ (external link)
Canon 60D Shooter

  
  LOG IN TO REPLY
kirkt
THREAD ­ STARTER
Cream of the Crop
6,602 posts
Gallery: 5 photos
Likes: 1556
Joined Feb 2008
Location: Philadelphia, PA USA
     
Jan 31, 2013 08:37 |  #5

The trial is free, for 45 days, no watermarks, no limitations....

kirk


Kirk
---
images: http://kirkt.smugmug.c​om (external link)

  
  LOG IN TO REPLY
StickWare
Member
40 posts
Joined May 2007
     
Feb 09, 2013 11:14 |  #6

Looks interesting. I'll have to try this. Thanks for taking the time to post all your screen shots.


flickr: www.flickr.com/stickwa​re (external link)
New York City: www.stickware.com/newy​orkcity (external link)

  
  LOG IN TO REPLY
sponsored links (only for non-logged)

5,343 views & 0 likes for this thread, 3 members have posted to it.
PixInsight HDR mini-tutorial
FORUMS Post Processing, Marketing & Presenting Photos HDR Creation 
AAA
x 1600
y 1600

Jump to forum...   •  Rules   •  Forums   •  New posts   •  RTAT   •  'Best of'   •  Gallery   •  Gear   •  Reviews   •  Member list   •  Polls   •  Image rules   •  Search   •  Password reset   •  Home

Not a member yet?
Register to forums
Registered members may log in to forums and access all the features: full search, image upload, follow forums, own gear list and ratings, likes, more forums, private messaging, thread follow, notifications, own gallery, all settings, view hosted photos, own reviews, see more and do more... and all is free. Don't be a stranger - register now and start posting!


COOKIES DISCLAIMER: This website uses cookies to improve your user experience. By using this site, you agree to our use of cookies and to our privacy policy.
Privacy policy and cookie usage info.


POWERED BY AMASS forum software 2.58forum software
version 2.58 /
code and design
by Pekka Saarinen ©
for photography-on-the.net

Latest registered member is semonsters
1454 guests, 131 members online
Simultaneous users record so far is 15,144, that happened on Nov 22, 2018

Photography-on-the.net Digital Photography Forums is the website for photographers and all who love great photos, camera and post processing techniques, gear talk, discussion and sharing. Professionals, hobbyists, newbies and those who don't even own a camera -- all are welcome regardless of skill, favourite brand, gear, gender or age. Registering and usage is free.