ICEINSPACE
Moon Phase
CURRENT MOON
Waning Crescent 2.1%
|
|

26-03-2014, 11:09 AM
|
 |
Registered User
|
|
Join Date: Feb 2006
Location: Perth, Western Australia
Posts: 4,563
|
|
PixInsight Auto Histogram
Asside from a few wins now and then, this damn program still throws brick walls up at every turn. Today: Auto Histogram.
So, I:
1) open a .FIT
2) open AutoHistogram
3) drag the triangle on to the picture
4) nothing happens.
I've fiddled with seemingly every feature, but nothing changes on the image. How do I apply an auto histogram to an image?
What I am wanting to do is batch-process images with what would be the result of the STF saved to JPG. I know STF is not saved, so am trying AutoHistogram instead, but really I just want the result of STF, and batch running this against a few thousand files. I'd like to include a DBE in the script too but that's the next topic  (DBE I have no problem with BTW).
Help!  Argh.
Thanks,
Roger.
|

26-03-2014, 11:39 AM
|
 |
IIS Member #671
|
|
Join Date: Dec 2005
Location: Canberra
Posts: 11,159
|
|
You can drag the STF across to the HistogramTransformation and that will apply what you see in the STF.
H
|

26-03-2014, 11:53 AM
|
 |
Registered User
|
|
Join Date: Feb 2006
Location: Perth, Western Australia
Posts: 4,563
|
|
Thanks H. I'll see how I can do that in a script.
|

26-03-2014, 09:59 PM
|
 |
Registered User
|
|
Join Date: Feb 2006
Location: Perth, Western Australia
Posts: 4,563
|
|
Well, it took a bit of stuffing around to work out how/where to drag it, but got there. I was incorrectly trying to drag it onto the Auto Histogram tool at first, which seems not possible.
|

26-03-2014, 10:06 PM
|
 |
Mostly harmless...
|
|
Join Date: Jul 2008
Location: Brisbane, Australia
Posts: 5,735
|
|
Yes, Roger the STF is about helping temporarily visualise what's lurking in your data, but to make change the data you have to apply a HT or some other transformation.
Your don't really need to fiddle with STF since they put hotkeys on it - just Ctrl-A to see what's in there then toggle it on and off as you're processing.
|

26-03-2014, 10:07 PM
|
 |
PI cult recruiter
|
|
Join Date: Apr 2010
Location: Brisbane
Posts: 10,584
|
|
Do you want to apply a different HT stretch to each image, Roger, or take a representative STF and use that on all of them? If the latter then it's pretty easy: drag the example STF to the HT process to define the stretch (as described by H); create an ImageContainer with the images you want to process; drop the ImageContainer on the HT process and voila!
Using a dynamic process like DBE in batch mode is a more difficult problem and I don't have a simple solution for that. ABE might be a workable alternative.
BTW, I've never had a reason to use AutoHistogram before but it appears to work as advertised for me. It's one of those rare PI processes that actually has documentation
Cheers,
Rick.
|

26-03-2014, 10:22 PM
|
 |
Registered User
|
|
Join Date: Feb 2006
Location: Perth, Western Australia
Posts: 4,563
|
|
Quote:
Originally Posted by RobF
Yes, Roger the STF is about helping temporarily visualise what's lurking in your data, but to make change the data you have to apply a HT or some other transformation.
|
Yeap, understand the concept well but working out how to use the tools is a bit like black magic.
Quote:
Originally Posted by RobF
Your don't really need to fiddle with STF since they put hotkeys on it - just Ctrl-A to see what's in there then toggle it on and off as you're processing.
|
.... except that I don't see how I can then "drag it to the histogram transform" to actually save that ... as I understand it I need the STF window visible to do that?
|

26-03-2014, 10:24 PM
|
 |
Registered User
|
|
Join Date: Feb 2006
Location: Perth, Western Australia
Posts: 4,563
|
|
Quote:
Originally Posted by RickS
Do you want to apply a different HT stretch to each image, Roger, or take a representative STF and use that on all of them? If the latter then it's pretty easy: drag the example STF to the HT process to define the stretch (as described by H); create an ImageContainer with the images you want to process; drop the ImageContainer on the HT process and voila!
|
Auto stretch each image in it's own right ... so, not "the latter"
Quote:
Originally Posted by RickS
BTW, I've never had a reason to use AutoHistogram before but it appears to work as advertised for me. It's one of those rare PI processes that actually has documentation 
|
I have to admit I've struggled to follow the documentation for tools I have read it for, so didn't try docco in this case. I should have.
|

27-03-2014, 03:06 PM
|
 |
PI cult recruiter
|
|
Join Date: Apr 2010
Location: Brisbane
Posts: 10,584
|
|
Quote:
Originally Posted by rogerg
Auto stretch each image in it's own right ... so, not "the latter" 
|
That's more tricky, Roger. Probably doable in a script but I'm guessing that doesn't help you.
I reckon you could use MaskedStretch with an ImageContainer to stretch all your images to have the same target background level. Another thing to try would be LinearFit to normalise the images and then apply a constant stretch to all of them.
Cheers,
Rick.
|

27-03-2014, 04:39 PM
|
 |
Registered User
|
|
Join Date: Feb 2006
Location: Perth, Western Australia
Posts: 4,563
|
|
Quote:
Originally Posted by RickS
That's more tricky, Roger. Probably doable in a script but I'm guessing that doesn't help you.
I reckon you could use MaskedStretch with an ImageContainer to stretch all your images to have the same target background level. Another thing to try would be LinearFit to normalise the images and then apply a constant stretch to all of them.
Cheers,
Rick.
|
Thanks for taking the time to offer suggestion Rick. Sound like a challenge, perhaps a bit much of a challenge for my current level of PI knowledge but will see. Last night I couldn't work out how to create a new script, I expected it to be relatively straight forward like creating a PhotoShop Action, but I need to do some PI manual reading to work out how it's done in PI.
|

27-03-2014, 08:41 PM
|
 |
PI cult recruiter
|
|
Join Date: Apr 2010
Location: Brisbane
Posts: 10,584
|
|
Quote:
Originally Posted by rogerg
Thanks for taking the time to offer suggestion Rick. Sound like a challenge, perhaps a bit much of a challenge for my current level of PI knowledge but will see.
|
No probs, Roger.
Quote:
Originally Posted by rogerg
Last night I couldn't work out how to create a new script, I expected it to be relatively straight forward like creating a PhotoShop Action, but I need to do some PI manual reading to work out how it's done in PI.
|
No, it's more complex but also a lot more powerful. You need to be able to program in Javascript. There was some work happening on a Python interface but that's still not going to be terribly easy for a casual user to learn.
Cheers,
Rick.
|

27-03-2014, 09:15 PM
|
 |
Mostly harmless...
|
|
Join Date: Jul 2008
Location: Brisbane, Australia
Posts: 5,735
|
|
Perhaps post on the PI forums? I'd be surprised if a guru there couldn't suggest or write a fix pretty quick, and we'd all probably learn something
|

27-03-2014, 09:15 PM
|
 |
Registered User
|
|
Join Date: Feb 2006
Location: Perth, Western Australia
Posts: 4,563
|
|
Quote:
Originally Posted by RickS
No, it's more complex but also a lot more powerful. You need to be able to program in Javascript. There was some work happening on a Python interface but that's still not going to be terribly easy for a casual user to learn.
|
Ahh, interesting. I'm fluent at Javascript, so maybe I'll look in to it more soon.
|

11-05-2015, 03:37 PM
|
 |
Registered User
|
|
Join Date: Jan 2007
Location: Mount Glasgow (central Vic)
Posts: 1,091
|
|
hey Roger
Did you ever get anywhere with a script to apply the Auto STF settings to the Histogram Transformation as part of a batch process?
I'm trying to do exactly that at the moment.. alternatives that can be done as part of a batch routine all fail in one way or another.
cheers
Phil
|

11-05-2015, 03:48 PM
|
 |
Registered User
|
|
Join Date: Feb 2006
Location: Perth, Western Australia
Posts: 4,563
|
|
Hi Phil,
Sorry but it ended up falling in to the "requires too much time" bucket and the project got shelved, if I'm thinking of the right one project I was working on
Roger.
|

11-05-2015, 04:17 PM
|
 |
Registered User
|
|
Join Date: Jan 2007
Location: Mount Glasgow (central Vic)
Posts: 1,091
|
|
Quote:
Originally Posted by rogerg
Hi Phil,
Sorry but it ended up falling in to the "requires too much time" bucket and the project got shelved, if I'm thinking of the right one project I was working on
Roger.
|
Thanks for the update.. not surprising.. these things do consume a lot!
I've posted a thread on the PixInsight forums so will see what that turns up:
http://pixinsight.com/forum/index.php?topic=8503.0
Phil
|

12-05-2015, 08:39 PM
|
 |
PI cult recruiter
|
|
Join Date: Apr 2010
Location: Brisbane
Posts: 10,584
|
|
The problem is that STF autostretch isn't a normal PI process. It doesn't modify the data at all, only how it appears on screen.
I'm sure you could do something with PixelMath but it would be a beast of an expression. If the folks on the PI Forum don't come up with a clever idea I would be happy to have a quick play around with some sample data and see what I can do (ideally with a small collection of the images that failed to conform when processed by AutoHistogram.)
The scripting interface and PixelMath are incredibly powerful but not easy to pick up if you don't have a programming background.
Cheers,
Rick.
|

12-05-2015, 09:21 PM
|
 |
Registered User
|
|
Join Date: Jan 2007
Location: Mount Glasgow (central Vic)
Posts: 1,091
|
|
Quote:
Originally Posted by RickS
The problem is that STF autostretch isn't a normal PI process. It doesn't modify the data at all, only how it appears on screen.
I'm sure you could do something with PixelMath but it would be a beast of an expression. If the folks on the PI Forum don't come up with a clever idea I would be happy to have a quick play around with some sample data and see what I can do (ideally with a small collection of the images that failed to conform when processed by AutoHistogram.)
The scripting interface and PixelMath are incredibly powerful but not easy to pick up if you don't have a programming background.
Cheers,
Rick.
|
Thanks for the reply Rick.
I found the parameters that Auto STF is working to (which you can see by CTRL clicking on the Auto STF button):
Shadows Clipping -2.8
Target Background 0.25
Boost Clipping factor 0.75
Boost background factor 2.00
I know that STF itself doesn't affect the data, but it's easy to take that automatically computed result and copy it to the Histogram Transformation. There are some automatic clipping options on the HT dialog but not the same as the Auto STF.
Auto Histogram which is easy to use in a batch routine on a large number of images does not have the same options as the Auto STF either, although it has some of them. I certainly cannot get quite the same result with Auto Histogram as I can with Auto STF (and Histogram Transformation).
If you can figure out a way in Pixel Math to replicate the above Auto STF parameters that would be pretty cool
Phil
|

12-05-2015, 09:31 PM
|
 |
Registered User
|
|
Join Date: Jan 2007
Location: Mount Glasgow (central Vic)
Posts: 1,091
|
|
I've uploaded a crop from the middle of one of the 32bit images I am working with:
https://www.hightail.com/download/bX...Nkd6NEpESjlVag
If you click Auto STF (with channels UN-linked) and copy that to Histogram Transformation you get a very nice result. And the Auto STF deals nicely with any variation from frame to frame left after calibration so that I get a consistent set of images which renders to video nicely.
Trying to set target parameters in Auto Histogram to achieve the same result has proved beyond my capabilities!
Phil
|

13-05-2015, 09:04 AM
|
 |
Registered User
|
|
Join Date: Jan 2007
Location: Mount Glasgow (central Vic)
Posts: 1,091
|
|
http://pixinsight.com/forum/index.ph...;topicseen#new
Juan has replied with exactly the kind of info I was hoping for. Now I just have to learn how to use scripting in PI.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +10. The time is now 10:40 PM.
|
|