Author Topic: Problem with Linear Fit: `Incompatible Image Geometry' error message  (Read 3898 times)

Offline marekc

  • PixInsight Addict
  • ***
  • Posts: 177
I'm trying to use the Linear Fit tool, but I'm having trouble with it. It's giving me a strange error message.

I have a linear RGB image, and I'm trying to use Linear Fit on a corresponding Luminance image. (Next, I hope to take them non-linear, and do an LRGB combination.)

When I set the RGB image as the reference image, and then try to apply an instance of the Linear Fit tool to the Lum image, I get an error that says `Incompatible Image Geometry'. But I've checked, and both images have the exact same pixel dimensions.

Has anyone else had this error occur? Does anyone know if there's something I'm missing?

Thanks,

- Marek

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
well, in the sense that a lum image has one plane and an RGB image has 3 planes, the geometries are incompatible. the "Z" dimension differs between the two images.

perhaps you have to split the RGB into 3 mono images, do the linear fit and recombine.

Offline marekc

  • PixInsight Addict
  • ***
  • Posts: 177
Ah, you make a good point. I hadn't thought of that. I'll bet you're right - the LinearFit tool is probably not happy with the fact that one image has a single plane, while the other image has three planes.

Perhaps I should start a separate thread about this, but I guess my question raises a larger issue that I've never been very clear about... how best to match the histograms between an RGB and an L image, prior to doing the LRGB combination?

The PI instructional videos by Vicent show this being done with STF. I haven't had any luck with this, though. If I use the STF tool to do an AutoSTF on one image, I don't get a good result when I apply those same AutoSTF settings to the other image. (For example, the L image is always much brighter and more contrasty than the RGB image.) Same problem if I compute AutoSTF settings for each image individually.

Overall, I'm fairly confused regarding how to `match the histograms' between my linear RGB and L images, as I take them into the nonlinear realm for LRGB combination. I'm going to go search the forum and see if I can come up with anything; input from anybody would be appreciated, and I'm happy to take this to another thread if necessary.

- Marek

Offline chris.bailey

  • PixInsight Addict
  • ***
  • Posts: 235
I find the same thing with the STF method but that does not make it wrong. Subsequent boost in Saturation using curves redresses the balance.

Chris

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
ah - the idea is not to use the same STF on both images, but to do auto-STF to both images independently. STF is going to aim for the same final histogram characteristics and will compute different HTs for each image. after you apply those HTs, the images will have similar statistics.