Author Topic: New Script: LocalFuzzyHistogramHyperbolization  (Read 4979 times)

Offline Alejandro Tombolini

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1245
    • View Profile
    • Próxima Sur
Re: New Script: LocalFuzzyHistogramHyperbolization
« Reply #15 on: 2017 November 15 01:05:41 »
Hello Frank, excellent job, thank you for sharing the script  :)

Saludos, Alejandro.

Offline mar504

  • Newcomer
  • Posts: 16
    • View Profile
Re: New Script: LocalFuzzyHistogramHyperbolization
« Reply #16 on: 2017 November 15 19:13:01 »
Very useful! Thank you Frank for sharing this with all of us!

Offline Alejandro Tombolini

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1245
    • View Profile
    • Próxima Sur
Re: New Script: LocalFuzzyHistogramHyperbolization
« Reply #17 on: 2017 November 16 03:47:59 »
Hi Frank, the script is excellent, easy to use and gives very good results.

To be honest I did not have the time to read the documentation but when trying it on an image with default parameters I noticed an extrange result (on the right of the image) It was when I applied the script to a linear not stretched image or to a linear stretched image.

After a non linear stretching of the image the script gives the expected result.

Does it means it is not allowed for linear images or could be something else?

Saludos, Alejandro.

Offline FrankW

  • Newcomer
  • Posts: 16
    • View Profile
Re: New Script: LocalFuzzyHistogramHyperbolization
« Reply #18 on: 2017 November 16 09:01:35 »
Hi Alejandro,

Actually the target image should be non linear (I mentioned it in the documentation  ;)). To apply LFHH also on linear images is one topic on my to-do-list. The other one is the possibility to use color images. If you like, please send me your linear image. This may help me to solve the problem with linear images.

Cheers,
Frank

Offline Tertsi

  • Newcomer
  • Posts: 5
    • View Profile
Re: New Script: LocalFuzzyHistogramHyperbolization
« Reply #19 on: 2017 November 16 19:07:54 »
Hi,

Can this script be used for the color images as well, i.e. if one extracts luminance from non-linear color image and then run script for it and then combine it back to color image with PixelMath? Or am I talking nonsense? :P

Tertsi

Offline FrankW

  • Newcomer
  • Posts: 16
    • View Profile
Re: New Script: LocalFuzzyHistogramHyperbolization
« Reply #20 on: 2017 November 16 20:43:02 »
Hi,

This will work in general. This is one of the ideas I have tested to apply LFHH to a color image, but I am still searching for the best method. The results are extremely dependent on the color distribution of the target image - so just try it!  :D

Frank

Offline Alejandro Tombolini

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1245
    • View Profile
    • Próxima Sur
Re: New Script: LocalFuzzyHistogramHyperbolization
« Reply #21 on: 2017 November 17 00:48:11 »
Thank you Frank,

If you like, please send me your linear image. This may help me to solve the problem with linear images.

Of course, let me know if this link works

Saludos, Alejandro

Offline FrankW

  • Newcomer
  • Posts: 16
    • View Profile
Re: New Script: LocalFuzzyHistogramHyperbolization
« Reply #22 on: 2017 November 17 08:16:36 »
Of course, let me know if this link works

Hi Alejandro,

Thank you, it works.  :)

Offline FrankW

  • Newcomer
  • Posts: 16
    • View Profile
Re: New Script: LocalFuzzyHistogramHyperbolization
« Reply #23 on: 2017 November 17 21:04:56 »
Hi Alejandro,

Thanks again for sending me that image. The analysis of it was a really helpful exercise!

First, coming to these troubles at the right side of your image. That has nothing to do whether the image is linear or nonlinear. I had the same troubles with some more powerful parameter settings for the nonlinear image. The fact is that there are stacking artifacts on your image, at the bottom but especially an edge of two pixels at the right side! These artifacts lead to that strange results for the the LFHH algorithm and the impact of them is higher for a linear image than for a nonlinear one. This is the reason why you only recognized them for the linear image. But the main massage is:

Remove all stacking artifacts before applying LFHH!

After cropping the image, I got fine results - even at the borders of the image!



The other finding from this analysis was a deeper understanding why the script doesn’t work for linear images. Predominantly, the image improvement you achieved for the linear images doesn’t depend on LFHH. In fact it is effect of the automatic HistogramTransformation included in the script. After unchecking this option you will see the real effect of the LFHH algorithm on a linear image. The underling problem is that the implemented membership functions are not aggressive enough to stretch a linear image. This is an important issue for the further improvement of the script! Thus your comments were really helpful.   :) Thank you for that!

Cheers,
Frank

Offline Alejandro Tombolini

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1245
    • View Profile
    • Próxima Sur
Re: New Script: LocalFuzzyHistogramHyperbolization
« Reply #24 on: 2017 November 17 23:18:20 »
Thank you very much Frank!

The fact is that there are stacking artifacts on your image, at the bottom but especially an edge of two pixels at the right side! These artifacts lead to that strange results for the the LFHH algorithm and the impact of them is higher for a linear image than for a nonlinear one. This is the reason why you only recognized them for the linear image. But the main massage is:
Remove all stacking artifacts before applying LFHH!
After cropping the image, I got fine results - even at the borders of the image!
Perfectly clear now, I didn't realize the two pixels column at the right side. By the way, it is a single uncalibrated image of a friend that I used only for testing.

I will continue testing

Saludos, Alejandro.

Offline grztus

  • Newcomer
  • Posts: 2
    • View Profile
Re: New Script: LocalFuzzyHistogramHyperbolization
« Reply #25 on: 2017 November 18 21:20:45 »
Hi friends,
I have a problem installing the auto-update with this script.
I have installed it, but it is not visible in the "script" --> "utilities" menu (and any other "script" menu).
I'm able to execute it only via "Script" --> "Execute script file".
What can I do, to make it visible in the "script" --> "utilities" menu??

Offline FrankW

  • Newcomer
  • Posts: 16
    • View Profile
Re: New Script: LocalFuzzyHistogramHyperbolization
« Reply #26 on: 2017 November 19 12:11:15 »
I have installed it, but it is not visible in the "script" --> "utilities" menu (and any other "script" menu).
I'm able to execute it only via "Script" --> "Execute script file".
What can I do, to make it visible in the "script" --> "utilities" menu??

That sounds strange! Have you already tried  "Script" --> "Feature Scripts..." --> "Regenerate"?

Offline chris.bailey

  • PixInsight Addict
  • ***
  • Posts: 188
    • View Profile
Re: New Script: LocalFuzzyHistogramHyperbolization
« Reply #27 on: 2017 November 20 09:57:19 »
Thanks Frank for a great script. Like everything in PI it took a while to tune the settings but it works really well after Masked Stretch, TGVDenoise and with a good star mask. I have been doing some wide field Ha images of some of the big Sharpless objects and it works very well on these as hopefully this sample of Sharpless 131 shows

Chris

Offline grztus

  • Newcomer
  • Posts: 2
    • View Profile
Re: New Script: LocalFuzzyHistogramHyperbolization
« Reply #28 on: 2017 November 20 20:53:53 »
That sounds strange! Have you already tried  "Script" --> "Feature Scripts..." --> "Regenerate"?
It wasn't listed there (I have another computer with PI and LFHH installed, so I had a comparison).

I solved the problem in other way:
After I've checked "Script" --> "Feature Scripts..." --> "Regenerate" and saw, that there is no LFHH, I have started the PI 1.8.5 installer, chosen "Repair" and execute it.
After repair, I've started the PI and got notification, that I have 16 new updates (there was also LFHH) - I've chosen all of them, made an update and closed PI.
After closing PI there was a new notifiaction with information about installing new updates, I have chosen "restart PI" and now everything is OK, the LFHH is in the script "utilities" menu.

During the first installation of the LFHH update, I did't chose "restart PI" and I've shutted down the system after closing PI. Probably that was the point where I've made a mistake.

Offline FrankW

  • Newcomer
  • Posts: 16
    • View Profile
Re: New Script: LocalFuzzyHistogramHyperbolization
« Reply #29 on: 2017 November 23 15:03:53 »
it took a while to tune the settings but it works really well after Masked Stretch, TGVDenoise and with a good star mask

Hi Chris ,

It’s really a great image! Yes, tuning the settings is always a cumbersome job. :-[ When I wrote the script, I faced the choice that the script works more “automatically”. But the characteristics of astronomical images can vary in a wide range and I belief that finally only the user can decide what is the best result from an image process. And your image shows that the effort will be worthwhile. :smiley:

Frank