Author Topic: getting L* back into RGB- failing  (Read 4898 times)

Offline HadesZ

  • Newcomer
  • Posts: 29
Re: getting L* back into RGB- failing
« Reply #15 on: 2018 March 18 09:34:02 »
Ok, this is the issue/ result I am getting.

I combine RGB with LRGBcombine
I background nuet, and color calibrate the RGB
I mask stretch the RGB and the Lum
I RGBworking space the RGB image with 1:1:1 values (btw i get the same nasty result if I do not do this)
Then I channel extract the L* of the RGB with LAB
I then use L* as the reference in LinearFit and apply it to the mask stretched Lum
then finally I LRGBcombine the Lum onto the RGB.

just to see quick result of it I hit STF auto-stretch and what I see is in this attached image. and the histogram looks how you see in HistoTransformation window.

so what am I doing wrong?

thanks for the help/feedback you all are giving me, its much appreciated!

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: getting L* back into RGB- failing
« Reply #16 on: 2018 March 18 10:06:35 »
I just wanted to ask a question no pointed at any one person but why would someone use LRGBCombination tool to combine linear channels? Wouldn't the use the ChannelCombination tool or PixelMath for linear images be the correct tools?



Mike

Offline ChoJin

  • PixInsight Addict
  • ***
  • Posts: 106
Re: getting L* back into RGB- failing
« Reply #17 on: 2018 March 18 12:35:16 »
Juan said you shouldn't use LRGBCombination on linear data in general.

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: getting L* back into RGB- failing
« Reply #18 on: 2018 March 18 13:46:15 »
That was the posting I pointed to earlier https://pixinsight.com/forum/index.php?topic=12271.msg75133#msg75133 but I see in HadesZ original post
Quote
"Calibrate/integrate subs to get master L, R, G, B
LRGBCombination just the RGB channels
BackgroundNeut and ColorCalibration the RGB image
Stretch the L and RGB images (masked stretch or use the STF function)
and I did not see anyone pointing this out. So I was just wondering why would you used it on linear channels?


Mike

Offline RickS

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1298
Re: getting L* back into RGB- failing
« Reply #19 on: 2018 March 18 14:35:21 »
so what am I doing wrong?

Still looks to me like one or more of the files you are combining is linear or maybe only stretched weakly (or the Lum is being linear fitted to a linear reference.)  As Rob suggested, posting the files would be helpful.  Alternatively, show us the stats for the files (Statistics process.)

I just wanted to ask a question no pointed at any one person but why would someone use LRGBCombination tool to combine linear channels? Wouldn't the use the ChannelCombination tool or PixelMath for linear images be the correct tools?

Hi Mike, I'm assuming that the object of the exercise is to combine stretched Lum and RGB data.  If I'm wrong about that it might explain the results!

Offline HadesZ

  • Newcomer
  • Posts: 29
Re: getting L* back into RGB- failing
« Reply #20 on: 2018 March 18 14:39:10 »
I can post the files once I get back home.

Since I used masked stretch on the RGB , wouldn't that make it non linear? I'm not seeing where I would have linear data in these files at this point.

I'll post them soon.

Offline RickS

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1298
Re: getting L* back into RGB- failing
« Reply #21 on: 2018 March 18 14:48:52 »
I can post the files once I get back home.

Since I used masked stretch on the RGB , wouldn't that make it non linear? I'm not seeing where I would have linear data in these files at this point.

I'll post them soon.

Thanks.  Hopefully we can nut out what is happening.  I think it would be good to see the original stretched Lum and RGB and the linear fitted Lum.

Maybe it's not linear data but just too weak a stretch.

Cheers,
Rick.

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: getting L* back into RGB- failing
« Reply #22 on: 2018 March 18 14:51:00 »
The very first step shows
Quote
I combine RGB with LRGBcombine
then the second step is
Quote
I background nuet, and color calibrate the RGB
. That is why I'm asking the question. BN and CC are done while the image is linear normally. The the 3rd step says
Quote
I mask stretch the RGB and the Lum
. Was the RGB and Lum already stretched or are they linear at this point. If they are linear then the first step could be a problem.


Mike

Offline HadesZ

  • Newcomer
  • Posts: 29
Re: getting L* back into RGB- failing
« Reply #23 on: 2018 March 18 15:10:55 »
ok , here is a link to a folder on dropbox with the files. I have the LRGB stacked images, the Lum that has been maskedstretched, and the RGB that has been maskstretched, Background nut, and CCalibed.

https://www.dropbox.com/sh/ujqptwx7dqcosgu/AACkTY_Topl1MGAfYKgJKCyxa?dl=0

and msmythers, so you are saying I should background nut, and color calib the individual RGB prior to LRGB combination? or are you simply saying I should be using Channel combination instead of LRGBcombination for the first step? (sorry if im not answering your question correctly or getting you the information your requesting of me. )

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: getting L* back into RGB- failing
« Reply #24 on: 2018 March 18 15:35:44 »
What I'm saying is normally combining the 3 channels, R, G and B are done while linear if you plan on color calibrating with the normal color calibration tools in PI. That combination is done with tools other than LRGBCombination as per Juan https://pixinsight.com/forum/index.php?topic=2485.msg16700#. I tend to go with Juan's recommendation first especially when troubleshooting a problem. If there has been a change in the LRGBCombination tool since that posting that would make it usable for a linear image I don't know.



Mike

Offline RickS

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1298
Re: getting L* back into RGB- failing
« Reply #25 on: 2018 March 18 16:40:59 »
ok , here is a link to a folder on dropbox with the files. I have the LRGB stacked images, the Lum that has been maskedstretched, and the RGB that has been maskstretched, Background nut, and CCalibed.

https://www.dropbox.com/sh/ujqptwx7dqcosgu/AACkTY_Topl1MGAfYKgJKCyxa?dl=0

I think the problem is just that you're not stretching the data enough.  Compare your maskstretched images to what you'll get with a Ctrl-a autostretch and you'll see they are quite dim (median value of the maskstretched data is about half what you get with a default autostretch.)

I did a very quick & dirty process using autostretch on both Lum and RGB and it looks fine, albeit noisy.  See attached crop of the central portion.

What I'm saying is normally combining the 3 channels, R, G and B are done while linear if you plan on color calibrating with the normal color calibration tools in PI. That combination is done with tools other than LRGBCombination as per Juan https://pixinsight.com/forum/index.php?topic=2485.msg16700#. I tend to go with Juan's recommendation first especially when troubleshooting a problem. If there has been a change in the LRGBCombination tool since that posting that would make it usable for a linear image I don't know.

I've always used LRGBCombination to combine my linear R/G/B, Mike.  Not sure where I got the idea from but I don't think I invented it myself :)  I suspect it doesn't matter much how you do this because you're always going to follow it with some form of colour calibration which will adjust the relative values of the channels.  I also use LRGBCombination to incorporate the Lum but that is always done later with non-linear data.

Cheers,
Rick.

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: getting L* back into RGB- failing
« Reply #26 on: 2018 March 18 16:53:40 »
Very good Rick 8) I've never used it linear and I wonder what happens with the transfer functions. My guess is 0.500 is no change at all but if someone did bump the settings how would that work? Might have to experiment with that. Could be very interesting or a disaster on a linear image.

Hope I haven't muddy the water, not my intention. Always trying to learn a little more about this wonderful piece of software.


Mike

Oh yeah  NGC1333  :)

Offline HadesZ

  • Newcomer
  • Posts: 29
Re: getting L* back into RGB- failing
« Reply #27 on: 2018 March 18 17:16:06 »
ok , here is a link to a folder on dropbox with the files. I have the LRGB stacked images, the Lum that has been maskedstretched, and the RGB that has been maskstretched, Background nut, and CCalibed.

https://www.dropbox.com/sh/ujqptwx7dqcosgu/AACkTY_Topl1MGAfYKgJKCyxa?dl=0

I think the problem is just that you're not stretching the data enough.  Compare your maskstretched images to what you'll get with a Ctrl-a autostretch and you'll see they are quite dim (median value of the maskstretched data is about half what you get with a default autostretch.)

I did a very quick & dirty process using autostretch on both Lum and RGB and it looks fine, albeit noisy.  See attached crop of the central portion.

Cheers,
Rick.

Rick, thank you for taking the data for a spin,  so just to clarify, you used STF autostretch on the LRGB, then combined them together right after the STF stretches?

I must be missing something, is STF from the menu different then the icons on the quick bar for STF? I only have every used the STF icons on quick bar to get a look at data and I always thought STF didn't actually do anything permanent to the data (was just a quick fake stretch to get a quick look)

Thanks again! Your quick stab at the data has me excited to get this image finished

Offline RickS

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1298
Re: getting L* back into RGB- failing
« Reply #28 on: 2018 March 18 17:16:15 »
Very good Rick 8) I've never used it linear and I wonder what happens with the transfer functions. My guess is 0.500 is no change at all but if someone did bump the settings how would that work? Might have to experiment with that. Could be very interesting or a disaster on a linear image.

Hope I haven't muddy the water, not my intention. Always trying to learn a little more about this wonderful piece of software.

Hi Mike.  I think it's good to challenge the things we've done forever!  I just compared the results of ChannelCombination and LRGBCombination (default settings) and they are pixel for pixel exactly the same, at least for one set of RGB data.  As you suggest, twiddling some of the LRGBCombination parameters could produce rather different results.  I think the comments by Juan apply to the use of a linear image for Lightness.  The reading I've done on the mathematics of colour spaces just makes my head hurt  ;)

Oh yeah  NGC1333  :)

Thanks!

Offline RickS

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1298
Re: getting L* back into RGB- failing
« Reply #29 on: 2018 March 18 17:28:22 »
Rick, thank you for taking the data for a spin,  so just to clarify, you used STF autostretch on the LRGB, then combined them together right after the STF stretches?

I must be missing something, is STF from the menu different then the icons on the quick bar for STF? I only have every used the STF icons on quick bar to get a look at data and I always thought STF didn't actually do anything permanent to the data (was just a quick fake stretch to get a quick look)

Thanks again! Your quick stab at the data has me excited to get this image finished

Perhaps I should have explained better.  I stretched both Lum and RGB by doing an autostretch and then applying that to the data, via HistogramTransformation, as a permanent stretch.  This is a common technique.  Here's a good explanation of how to do it: http://pixinsight.com.ar/en/docs/91/pixinsight-transfer-stf.html

Cheers,
Rick.