Author Topic: Gradient HDR compression, take 2  (Read 24215 times)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Gradient HDR compression, take 2
« Reply #30 on: 2011 June 22 01:20:04 »
Georg,

Quote
In fact, I am using DCT/IDCT from the FFTW code, not a full FFT.

Oops  :-[ I obviously had a too superficial look at your code. Sorry!

Quote
I also had a look at quick look at Ooura's code: This might be an option, but you have to do much more padding (can handle power of 2 sizes only).

Well, I think it isn't as bad as it sounds. Also, if we implement the 2D DCT as a separable process (transform rows and columns separately), having to pad a 2^n vector for each row/column is a very small space penalty. I have to explore this further with Ooura's code.

Of course, an arbitrary size solution such as FFTW is ideal but as I've said we cannot publish a module that uses this library officially, unless you get direct blessings from the authors, which is unlikely to occur.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Gradient HDR compression, take 2
« Reply #31 on: 2011 June 22 07:20:53 »
Notice that the DCT and DST uses a high percentage of the FFT code. Perhaps you may follow his method, and work over the KISS FFT...
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Gradient HDR compression, take 2
« Reply #32 on: 2011 July 08 22:21:23 »
I'm going to continue the gradient compression discussion here, since the new thread is more aimed to the seamless mosaic...

Here is a test image with my new implementation. Basic changes are 3:
a) Multiscale power factor. The original algorithm uses a multiescale gradient evaluation, and creates a gradient map factor that uses the information of all included wavelet scales with the same "behaviour". Now there are "strength" sliders for each layer.
b) I added a new multiplication factor, that depends on the intensity on the original image. This means that contrast in the highlights are amplified more than in the shadows, preventing noise amplification. Also, for astronomical images it had the very pleasant effect of preserving star cores very well.
c) Now the strength value allows "negative" values. That means, small gradients are attenuated, and large gradients amplified.
a and c combined, allowed that we may create a variable compression, based on scale properties. For astronomical images, I found that small or negative small scale strengths, and aggressive large scale ones, with a "linear interpolation" performs quite well.

So, here is an example of this, with the same M42:
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Gradient HDR compression, take 2
« Reply #33 on: 2011 July 08 22:36:29 »
And here is an example with a daylight image, showing the results of this color correction algorithm (different from Georg's). Left original, center without, right with color correction).

This weekend I'm going to upload the new version, with a polished interface and those options enabled.

I don't believe that it is a "final" solution for the HDR problem with astronomical images (although, I insist, it does a pretty well job with daylight images), but right now it gives a pleasant result, with shrinked large and medium stars, and a more or less compressed dynamic range. It still enhances the noise and have some artifacts. But maybe a second pass with the propper set of parameters at a later stage (after noise reduction, and DBE, to correct artificial large scale gradients) will nail it.

Anyway, I'm going to follow another path with the gradient manipulation... wish me luck there ;) I'll comment that later, with some preliminary results.
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Gradient HDR compression, take 2
« Reply #34 on: 2011 July 09 04:03:27 »
Wow, this seems to work really well know. I am particularly impressed with the core of M42, and the color balance in the Begium House image. Really good work!.

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline RobF2

  • PixInsight Addict
  • ***
  • Posts: 189
  • Rob
    • Rob's Astropics
Re: Gradient HDR compression, take 2
« Reply #35 on: 2011 July 09 06:09:20 »
I'm not sure how to subscribe to a thread, so I'll just 2nd Harry's comment - looking forward to a Window's version to play with at some stage..... :P
FSQ106/8" Newt on NEQ6/HEQ5Pro via EQMOD | QHY9 | Guiding:  ZS80II/QHY5IIL | Canon 450D | DBK21 and other "stuff"
Rob's Astropics

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Gradient HDR compression, take 2
« Reply #36 on: 2011 July 09 09:51:46 »
Hi,

here for comparison the Belgium House image processed with my variant of Gradient Domain HDR compession. The goal of this process never has been to produce natural images, but to preserve as much faint detail as possible in both luminance and color. It therefore produces images that sometimes have a psychedelic quality.
- top center: to original image, combined using HDR Composition
- bottom center: same image, with modest application of the gradient compression.  Preserve color was activated. Clearly the contrasts are reduced, but the colors start to get intense (see plant at left).
- bottom left: extreme compression without Color Preservation. The interior of the building lost all its color
- bottom right: same with Preserve Color activated. If you wonder why the leaves of the plant are kind of blue: The relative R:G:B proportions are as they were in the original image.
- bottom left+right: detail of bottom images. You nicely see how the process enhances the faint structures of the leaves. Unfortunately, it also enhances the artefacts of the original JPG images, as you can see in the structure of the wall.

Georg
 
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Gradient HDR compression, take 2
« Reply #37 on: 2011 July 09 11:41:47 »
Georg, if you want the belgium house, I may upload a tiff file from the radiance map (not the online jpegs).
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Gradient HDR compression, take 2
« Reply #38 on: 2011 July 09 14:46:37 »
Georg, if you want the belgium house, I may upload a tiff file from the radiance map (not the online jpegs).
Yes, let me know where to download it  8). I wonder if this will reveal additional details...
Feorg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Gradient HDR compression, take 2
« Reply #39 on: 2011 July 09 14:57:39 »
I'm uploading 3 hdr images to http://pteam.pixinsight.com/carlos/hdr/
All made from 32bits radiance maps provided by the authors of the GDHDRC paper at their homepage (a bit buried between the examples).
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Gradient HDR compression, take 2
« Reply #40 on: 2011 July 09 20:16:15 »
New HDRC uploaded to the pteam server... see the link at the thread of my other modules (top).
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Gradient HDR compression, take 2
« Reply #41 on: 2011 July 10 08:27:46 »
Here is another example, this time on an astronomical image kindly provided by Harry:

- right: original (produced via GradientMergeMosaic, see other thread)+STF
- left: processed with GradientHdrCompression (unselected Preserve Color) plus ColorSaturation (to give it a color similar to the original)+STF.

I like the enhanced structure while at the same time reducing the bright stars.

I think the Pelican looks more like a Pterodactylus   >:D, doesn't it?

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Gradient HDR compression, take 2
« Reply #42 on: 2011 October 27 12:24:27 »
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)