Author Topic: CIE L*a*b* extraction and recombo question  (Read 2273 times)

Offline aworonow

  • PixInsight Addict
  • ***
  • Posts: 258
    • Faint Light Photography
CIE L*a*b* extraction and recombo question
« on: 2016 November 16 08:47:28 »
I have a pair of linear RGB images that I want that I want to swap L (lightness) channels from the first to the second. As a test, I simply extracted the CIE L*a*b* from one of the images then tried to recombine them. I did not get the original image back: Red cast (due in part to nebula) became teal, for example. Why? How do I get a proper RGB image back? (see attached screen shot)

Thanks, Alex

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: CIE L*a*b* extraction and recombo question
« Reply #1 on: 2016 November 16 09:16:21 »
Alex

Are you applying STF to both images. Use unlinked AutoSTF and see if you have the same image.

Be careful about swapping L channels while linear. You will probably need to do a linear fit to the L image.


Mike

Offline aworonow

  • PixInsight Addict
  • ***
  • Posts: 258
    • Faint Light Photography
Re: CIE L*a*b* extraction and recombo question
« Reply #2 on: 2016 November 16 10:22:34 »
Tried your suggestion, with same (wrong) outcome. Basically, there is zero red in the background, and most of the image. The reason for this is that both the a* and b* channels are flat gray (both with the uniform value of 0.54286). Why would that be? The L* shows star brightnesses. There is no mask in over any image, and the input image is linear. (I retested it on another image that I composed from indivdual RGB stacks.)

I tried extracting CIE L*c*h* and recombining them, that worked perfectly. Maybe my version CIE L*a*b* extraction or combination is corrupt? Is there a way to reinstall those two modules without reinstalling all of PI?

thanks again, Alex

Offline aworonow

  • PixInsight Addict
  • ***
  • Posts: 258
    • Faint Light Photography
Re: CIE L*a*b* extraction and recombo question--the solution?
« Reply #3 on: 2016 November 16 11:54:33 »
I found that doing the extraction with the Sample Format set to less than 32-bit integer fails in the manner I described above. Is  this a bug? If not, when would the 8-bit and 16-bit options be appropriate?

Alex