Author Topic: Strange behaviour of GHDR Compression  (Read 2793 times)

Offline luigis

  • Newcomer
  • Posts: 29
Strange behaviour of GHDR Compression
« on: 2013 August 28 10:17:13 »
Hi,

I have a strange problem with GHDRc, what the preview shows doesn't match the result. In fact the preview looks fine and the result is totally black. I've played with the rescale to 0-1 setting and it doesn't change things.

I'm curious about what might be wrong...

I've created this small video to show the problem:
http://www.youtube.com/watch?v=-mBRfuMnol0&feature=youtu.be

Thanks for your help!
Luis

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Strange behaviour of GHDR Compression
« Reply #1 on: 2013 August 28 10:58:05 »
Try cropping the image a little bit. There might be some boundary problems.
Regards,

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

Offline luigis

  • Newcomer
  • Posts: 29
Re: Strange behaviour of GHDR Compression
« Reply #2 on: 2013 August 28 11:08:42 »
Carlos,

Thank you!
That worked, can you let me know why it worked?  :surprised:

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Strange behaviour of GHDR Compression
« Reply #3 on: 2013 August 28 16:31:58 »
Mysteries of life and coding... :)
Seriously speaking, I wrote the poisson solver that Georg uses to calculate the image after compression in the gradient domain. I known that it has some issues with the boundary conditions. Ideally, it had to met Von Neumman's conditions (zero gradient, or mirroed image and the boundaries), but there are still some artifacts left unless we "physically" impose a zero padding. Most of the artifacts arised if a strong gradient was found in the boundary, like a bright star half cutten. In some cases, the solution of the solver might go so wrong, that a flat image was generated.
So, since I suspected that the solver should be the most probable candidate, the easiest way to try to improve things was to impose different boundaries. :)

BTW, I wrote a gradient domain hdr compression tool (is in my repository, for linux only) that is more complex than Georg's, and it also uses a more robust algorithm to overcome boundary problems. I hope that Juan will dedicate me some time to pulish it this year, for inclusion in the 1.8 standard set.
Regards,

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