Thank you, Mike, for noticing this!Hi Boris - me again! One small point if I may, you still have DEBUG set to "true" in this version, so users will get loads of debug information output to their process console.
CS, Mike
Mike,Inspired by Boris's excellent work on this script it occurred to me that it would be really cool if we could select the hue for the mask by clicking on the target image. So I hope Rick and Boris will not object if I offer the attached further modification which allows this. The target image can be zoomed by click and drag and pixel hue values can be obtained and reflected in the hue wheel by clicking on the image.
CS, Mike
Thank you for your kind feedback Boris.Mike,
I have try it and I think this is very useful feature for mask fine tuning. Previously you would need to switch probe readout mode to HSV and (probably with the help of napkin) try to to memorize those hue readout values. Great job!
If I might suggest - i think it would be useful to add autostretch button to preview, because sometimes you need to work with linear images
CS,
Boris
Mike,Thank you for your kind feedback Boris.
I think an STF facility is a great idea. I have updated the zip file in my previous post (to avoid a proliferation of versions!) to include this suggestion. What I have done is to add an "Enable STF" checkbox. This will then apply the STF of your target image to the preview - that way you can reflect a custom STF not just the PixInsight auto STF.
CS, Mike
Hi BorisMike,
I've tested your new release and it works like a charm.
Also added probe size choosing to average hue readings - useful in case of noisy image (backround readings in particular).
CS,
Boris
P.S. May be it's a time for asking @Juan Conejero to include it in PI?
View attachment 18014
Hello Mike,Hi Boris
I initially had a probe size option in my code but I removed it. You get some spurious answers, especially in the Red regions, if you average over Hue values. For example a Hue of 359 (definitely red) and one of 1 (also definitely red) will average to a Hue of 180, ie Cyan! As another example Hues of 0 (red) and 240 (blue) will average to 120 (green - nothing to do with either!). I concluded better to leave this option out as it really wasn't helpful, in fact worse than that - confusing, and better to allow the user to drag the colour reticle around to area pixel by pixel and examine the hue ranges for themselves.
What do you think?
CS, Mike
Hi Boris
I initially had a probe size option in my code but I removed it. You get some spurious answers, especially in the Red regions, if you average over Hue values. For example a Hue of 359 (definitely red) and one of 1 (also definitely red) will average to a Hue of 180, ie Cyan! As another example Hues of 0 (red) and 240 (blue) will average to 120 (green - nothing to do with either!). I concluded better to leave this option out as it really wasn't helpful, in fact worse than that - confusing, and better to allow the user to drag the colour reticle around to area pixel by pixel and examine the hue ranges for themselves.
What do you think?
CS, Mike
Good point, guys!Hello Mike,
Just in case you wish to revisit the problem of averaging angle-like quantities, have a look at the
Circular mean - Wikipedia
en.wikipedia.org
Your's is now downloading fine and works well - Good work!Good point, guys!
UPD. Thank you for pointing out that bug. The math was changed. Now hue values of 355, 5 and 15 degrees are correctly averaged into 5 degrees.
UPD2. Mike is right this is not so usefull option in case of noisy images. So this is feature more from "just in case" category.