Author Topic: LinearFit problem  (Read 3920 times)

Offline avastro

  • PixInsight Addict
  • ***
  • Posts: 181
    • http://astrosurf.com/avastro/
LinearFit problem
« on: 2015 January 22 01:28:24 »
I'm facing a problem when using linearFit. I take a RBG linear 32 bit .fit image, extract the luminance, select the luminance as reference in LinearFit apply to the RGB, then a get an error message "Incompatible image geometry: NGC2168_RGB".
I'm probably missing something. Thanks for your help.
Antoine
Antoine
Lentin Observatory
http://www.astrosurf.com/avastro/

Offline chris.bailey

  • PixInsight Addict
  • ***
  • Posts: 235
Re: LinearFit problem
« Reply #1 on: 2015 January 22 03:31:13 »
Antoine

The Luminance has a single channel, the RGB has three so the two have incompatible channel depth. You could apply the L to the extracted R, G or B, but not to the three together.

Chris

Offline avastro

  • PixInsight Addict
  • ***
  • Posts: 181
    • http://astrosurf.com/avastro/
Re: LinearFit problem
« Reply #2 on: 2015 January 22 07:03:15 »
Thank you Chris, I was trying to extract the luminance to do some process in it (linear state) then use LinearFit to get the same brightness as the RGB chrominance and apply the Luminance with LRGBCombination.
Apparently it's not the right approach to do that.
Antoine
Antoine
Lentin Observatory
http://www.astrosurf.com/avastro/

Offline jkmorse

  • PixInsight Padawan
  • ****
  • Posts: 931
  • Two questions, Mitch . .
    • Jim Morse Astronomy
Re: LinearFit problem
« Reply #3 on: 2015 January 22 10:02:26 »
Antoine,

Here is the process for doing what you were trying to do, and it is an important step to get the Lum and RGB fluxes the same before doing the LRGB Combination:

This is the basic procedure (from Juan himself):

- Apply the initial nonlinear histogram transformations to your RGB and L images. Adjust the L image first, to the desired brightness and contrast. Then try to match the overall illumination of L when you transform RGB. Do it roughly by eye using the CIE L* display mode (Shift+Ctrl+L, Shift+Cmd+L on the Mac). Don't try to do a particularly accurate job here; it will get much better in the next steps.

- Extract the CIE L* component of RGB with the ChannelExtraction tool (select the CIE L*a*b* space, uncheck a* and b*, and apply to RGB).

- Open the LinearFit tool (ColorCalibration category) and select the L image as the reference image. Apply to the L* component of RGB that you have extracted in the previous step.

- Reinsert the fitted L* in the RGB image with the ChannelCombination tool.

Now your RGB and L images have been matched very accurately. Use the LRGBCombination tool with them. You shouldn't change the luminance transfer function, nor the channel weights, as LinearFit has already done the matching job much better than anything you could do manually.

Hope that helps,

Jim
Really, are clear skies, low wind and no moon that much to ask for? 

New Mexico Skies Observatory
Apogee Aspen 16803
Planewave CDK17 - Paramount MEII
Planewave IFR90 - Astrodon LRGB & NB filters
SkyX - MaximDL - ACP

http://www.jimmorse-astronomy.com
http://www.astrobin.com/users/JimMorse

Offline avastro

  • PixInsight Addict
  • ***
  • Posts: 181
    • http://astrosurf.com/avastro/
Re: LinearFit problem
« Reply #4 on: 2015 January 22 12:24:31 »
Ah ah, good trick.
That help me a lot, I read time ago Juan's post about LRGB, but forget it, thank Jim to remember it to me, I should reread your excellent cribsheet, by the way is revision 32 the last update?
Best
Antoine
http://www.astrosurf.com/avastro/
Antoine
Lentin Observatory
http://www.astrosurf.com/avastro/

Offline jkmorse

  • PixInsight Padawan
  • ****
  • Posts: 931
  • Two questions, Mitch . .
    • Jim Morse Astronomy
Re: LinearFit problem
« Reply #5 on: 2015 January 23 10:39:40 »
Just sent out Rev33 which includes this update.

Best,

Jim
Really, are clear skies, low wind and no moon that much to ask for? 

New Mexico Skies Observatory
Apogee Aspen 16803
Planewave CDK17 - Paramount MEII
Planewave IFR90 - Astrodon LRGB & NB filters
SkyX - MaximDL - ACP

http://www.jimmorse-astronomy.com
http://www.astrobin.com/users/JimMorse

Offline patrickgilliland

  • Newcomer
  • Posts: 15
Re: LinearFit problem
« Reply #6 on: 2015 January 30 15:36:45 »
What crib sheet can I get a copy - terrible for forgetting things and all info for PI is good info.
Thanks in advance if possible.
Paddy