PixInsight Forum (historical)

Software Development => New Scripts and Modules => Topic started by: zvrastil on 2011 February 26 12:15:33

Title: LocalHistogramEqualization module
Post by: zvrastil on 2011 February 26 12:15:33
Hi all,

I'd like to announce my new module here. It implements local histogram equalization. The process is based on method CLAHE (Contrast-Limited Adaptive Histogram Equalization). It basically does local contrast enhancement and improves visibility of structures in low contrast regions.
You should get the module soon through Automatic Updates from the main repository.

In the meantime, you can read something about the module at my webpage:
   http://astrofoto.euweb.cz/pixinsight/modules.html (http://astrofoto.euweb.cz/pixinsight/modules.html).

In particular, there is a reference documentation with more details on method and its parameters (will be part of installed module):
   http://astrofoto.euweb.cz/pixinsight/LocalHistogramEqualization/LocalHistogramEqualization.html (http://astrofoto.euweb.cz/pixinsight/LocalHistogramEqualization/LocalHistogramEqualization.html)

and an example showing effect of two main parameters of the method on testing image:
   http://astrofoto.euweb.cz/pixinsight/LocalHistogramEqualization/comparison.html (http://astrofoto.euweb.cz/pixinsight/LocalHistogramEqualization/comparison.html).

I would like to thank Vicent, who kindly gave me this excellent image of M42 for testing.

Please understand that despite I implemented the method, I did not invented it and I am by no means expert in using it. If you find good use for this module, please share it.

best regards, Zbynek
Title: Re: LocalHistogramEqualization module
Post by: Carlos Milovic on 2011 February 26 13:50:08
Excellent work! I always wanted to write something like this :) The results are pretty good. Congratulations. I'll try it ASAP.
Title: Re: LocalHistogramEqualization module
Post by: Nigel Ball on 2011 February 27 15:22:42
Zbynek

Excellent work!

I've just updated PI and tried the LHE module on a couple of images I'm working on. It should help me enormously  8)

Nigel

PS I couldn't get the mouseover functions to work at all on the examples of M42 on your website though
Title: Re: LocalHistogramEqualization module
Post by: Enzo De Bernardini on 2011 February 27 17:05:22
Excellent Zbynek! Thanks for your work! It looks really useful.  :D

Enzo.
Title: Re: LocalHistogramEqualization module
Post by: Alejandro Tombolini on 2011 February 27 18:23:44
Thanks Zbynek, it will help a lot. Excellent script.

Alejandro
Title: Re: LocalHistogramEqualization module
Post by: zvrastil on 2011 February 27 23:40:40
Thanks all. I hope you'll find the module useful.

PS I couldn't get the mouseover functions to work at all on the examples of M42 on your website though

Yes, it seems it does not work in IE (it works in Firefox for me). IE reports some error on the page. I'll check in the evening, now I'm in the office.

regards, Zbynek
Title: Re: LocalHistogramEqualization module
Post by: Redshift on 2011 February 28 00:42:29
Hi Zbynek,

Thanks for this, I'm certain I'll find this useful. I use to use Photoshop for this.
I've downloaded it in PI 32 and 64 bit for the Mac, but the documentation 'window' is blank in both cases. Have you any suggestions as to why.

regards
Dave
Title: Re: LocalHistogramEqualization module
Post by: zvrastil on 2011 February 28 01:09:38
Hi Zbynek,

Thanks for this, I'm certain I'll find this useful. I use to use Photoshop for this.
I've downloaded it in PI 32 and 64 bit for the Mac, but the documentation 'window' is blank in both cases. Have you any suggestions as to why.

regards
Dave

Hi Dave,

I also removed my local module and updated it from main repository to have same situation as everyone. And I see the documentation without problem (on Win32bit). Did PixInsight reported 2 updates? There should be two - one for module binary and one for documentation. You could also check your doc/tools folder (if I remember it correctly from the top of my head) - there should be LocalHistogramEqualization.html file.
Do you see documentation for my older modules Annotation and AssistedColorCalibration? They are distributed in the very same way.

In the meantime, you can check the documentation under the link http://astrofoto.euweb.cz/pixinsight/LocalHistogramEqualization/LocalHistogramEqualization.html (http://astrofoto.euweb.cz/pixinsight/LocalHistogramEqualization/LocalHistogramEqualization.html) - it is the same one.

regards, Zbynek
Title: Re: LocalHistogramEqualization module
Post by: zvrastil on 2011 February 28 11:45:52

PS I couldn't get the mouseover functions to work at all on the examples of M42 on your website though

Yes, it seems it does not work in IE (it works in Firefox for me). IE reports some error on the page. I'll check in the evening, now I'm in the office.


Should work now. I tested it in IE, Firefox and Chrome.
Title: Re: LocalHistogramEqualization module
Post by: Redshift on 2011 February 28 13:05:10
Hello Zbynek,

Thank you for your reply. Yes, PI did report 2 updates in both cases.

Dave



Hi Dave,

I also removed my local module and updated it from main repository to have same situation as everyone. And I see the documentation without problem (on Win32bit). Did PixInsight reported 2 updates? There should be two - one for module binary and one for documentation. You could also check your doc/tools folder (if I remember it correctly from the top of my head) - there should be LocalHistogramEqualization.html file.
Do you see documentation for my older modules Annotation and AssistedColorCalibration? They are distributed in the very same way.

In the meantime, you can check the documentation under the link http://astrofoto.euweb.cz/pixinsight/LocalHistogramEqualization/LocalHistogramEqualization.html (http://astrofoto.euweb.cz/pixinsight/LocalHistogramEqualization/LocalHistogramEqualization.html) - it is the same one.

regards, Zbynek
Title: Re: LocalHistogramEqualization module
Post by: zvrastil on 2011 February 28 13:30:04
Thank you for your reply. Yes, PI did report 2 updates in both cases.

I'm afraid I have to leave this problem to Juan. I do not think it's related to the module.

Zbynek
Title: Re: LocalHistogramEqualization module
Post by: georg.viehoever on 2011 February 28 13:42:24
I'm afraid I have to leave this problem to Juan. I do not think it's related to the module.

My guess is that it is related to all Internet Explorer versions (or old versions of their support libraries). IE initially did not support .PNG, and I don't know if this changed with later IE versions on Windows XP. Display of screenshots work fine with on Win7.

Georg
Title: Re: LocalHistogramEqualization module
Post by: JGMoreau on 2011 March 01 09:38:23
Hi Zbynek,

Thank you very much for the new LocalHistogramEqualization module,
it did a great job on the faint nebulosites in my latest image :

http://www3.cablevision.qc.ca/astro/IC444.jpg

Jean Guy Moreau
Quebec
Title: Re: LocalHistogramEqualization module
Post by: RobF2 on 2011 March 02 04:32:32
Impressive work, and thanks so much for the effort put into your documenting webpage (not to mention the online documentation).  What a pleasure too to be able to ask for an update and have this install itself. 

Thanks again Zbynek
Title: Re: LocalHistogramEqualization module
Post by: pfile on 2011 March 02 09:21:08
really strange - i downloaded this in mac x86-64 and it appeared in the process menu after a restart. then PI crashed, and when it came back, the process was gone. is there some kind of xml file or other pref file that points to these modules, or if the shared library is in the right directory does PI just go ahead and load it?

Title: Re: LocalHistogramEqualization module
Post by: zvrastil on 2011 March 02 13:25:48
really strange - i downloaded this in mac x86-64 and it appeared in the process menu after a restart. then PI crashed, and when it came back, the process was gone. is there some kind of xml file or other pref file that points to these modules, or if the shared library is in the right directory does PI just go ahead and load it?

Hi, PixInsight does not automatically load all modules from its bin directory. Each module has to be installed. This is normally done by automatic update system.
You can do it manually through menu Processes -> Modules -> Install Modules.... Dialog appears. Check Search Directory - it should point to your bin directory.
Then click Search button. It will report all currently uninstalled modules from the directory - in this case, it should report the LocalHistogramEqualization module.
Click Install button and the module(s) will be installed.

If it crashes again, then there is some problem with the module and PixInsight will again uninstall it automatically. If so, please let me know.

regards, Zbynek
Title: Re: LocalHistogramEqualization module
Post by: Harry page on 2011 March 02 13:46:34
Hi

Great this many thanks , works very well after HDR wavlets  ;D


Harry
Title: Re: LocalHistogramEqualization module
Post by: zvrastil on 2011 March 02 14:05:29
Thanks for all positive comments. I believed this module would be useful but still, it's nice to see it confirmed.

Zbynek
Title: Re: LocalHistogramEqualization module
Post by: pfile on 2011 March 02 17:00:20
Oh... local histogram did not crash, it was some more generic problem. The x86-64 Mac version is a little crashy.
Title: Re: LocalHistogramEqualization module
Post by: pfile on 2011 March 02 20:41:32
okay, i did the Install Modules... thing and it's back. thanks.

if pixinsight exits abnormally for any reason does that cause it to fall back to it's default set of modules?
Title: Re: LocalHistogramEqualization module
Post by: zvrastil on 2011 March 03 00:28:34
okay, i did the Install Modules... thing and it's back. thanks.

if pixinsight exits abnormally for any reason does that cause it to fall back to it's default set of modules?

I do not think so. At least that's not my experience. As far as I know, PixInsight removes module only if the crash is related to the start of this module. In your case, maybe module was not yet properly registered or written in configuration when the main application crashed.

regards, Zbynek
Title: Re: LocalHistogramEqualization module
Post by: harist on 2011 March 03 12:45:30
An excellent addition to PI modules. Works fine!

Best
Tasos