Author Topic: linear vs. non-linear state  (Read 5018 times)

Offline dsnay

  • PixInsight Addict
  • ***
  • Posts: 100
linear vs. non-linear state
« on: 2011 February 14 10:56:24 »
As one coming from the land of photoshop I'm trying to make sure I understand when the data transitions from linear to non linear.
In PixInsight it seems pretty clear that takes place during the HistogramTransfer function.
Is it safe to say it takes place when you start applying curves to the data in Photoshop?
I say that because that's where the heavy lifting takes place in PS.

As I type this it occurs to me that the HistogramTransfer function feels like a Photoshop Levels Adjustment, which might explain a couple of my struggles to me since I've always found that Curves adjustments work better than Levels for revealing details. hmmmmm.......Not sure what that means to my work flow.

Dave

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: linear vs. non-linear state
« Reply #1 on: 2011 February 14 11:40:01 »
Dave,

it's hard to comment on tools I don't have and processes I've never used. The best I can do is to explain what it means to go from linear to non-linear. Once you understand that you can apply this knowledge to any tool and process, provided you understand those.

In a linear image pixels with value X received half the photon flux as pixels with value 2X. It is for lack of a better word a 'real' representation of the photon flux that fell on the sensor. Only a calibrated and flattened image can be linear.

Any process that breaks this relationship turns your image into a non-linear image. A curved line in a histogram or curves transform fits here.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: linear vs. non-linear state
« Reply #2 on: 2011 February 14 13:27:27 »
Hi,

I second Sander's words, but I want to make a small correction: an uncalibrated image is linear, although only a calibrated image preserves the original light flux of the detected objects.

On the other hand, when you importa FITS image in Photoshop, linearity is broken at the moment of loading the image.


Regards,
Vicent.

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: linear vs. non-linear state
« Reply #3 on: 2011 February 14 13:40:04 »

Hi,

you are right of course. It's just that with dark and vignetting in the image the linear relationship between pixels is more complicated with offsets and a vignetting factor added. That would have made the explanation more difficult :)
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: linear vs. non-linear state
« Reply #4 on: 2011 February 14 15:05:16 »

Hi,

you are right of course. It's just that with dark and vignetting in the image the linear relationship between pixels is more complicated with offsets and a vignetting factor added. That would have made the explanation more difficult :)

Yes. :) But here we have an interesting idea: why we can calibrate the image? We can calibrate it because it is linear. :) If it isn't, then the known formula [ ((light - bias) - (dark - bias)*k) / (flat - bias) ] could not be applied to all the pixels in the image in the same manner.


Regards,
Vicent.

Offline dsnay

  • PixInsight Addict
  • ***
  • Posts: 100
Re: linear vs. non-linear state
« Reply #5 on: 2011 February 14 15:29:59 »
Hi,

I second Sander's words, but I want to make a small correction: an uncalibrated image is linear, although only a calibrated image preserves the original light flux of the detected objects.

On the other hand, when you importa FITS image in Photoshop, linearity is broken at the moment of loading the image.


Regards,
Vicent.

I'm pretty sure I don't agree with the last sentence here. If I use Fits Liberator, I can specifically choose linear as an stretch option for the conversion from fits to something photoshop understands.

Dave

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: linear vs. non-linear state
« Reply #6 on: 2011 February 14 16:47:19 »


Yes. :) But here we have an interesting idea: why we can calibrate the image? We can calibrate it because it is linear. :) If it isn't, then the known formula [ ((light - bias) - (dark - bias)*k) / (flat - bias) ] could not be applied to all the pixels in the image in the same manner.


Regards,
Vicent.

Like I said, you are right :)
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: linear vs. non-linear state
« Reply #7 on: 2011 February 15 00:27:01 »
Quote
I can specifically choose linear as an stretch option for the conversion from fits to something photoshop understands.

A linear stretch is a no-op. When we speak about stretching an image, we always refer to a nonlinear transformation implicitly. Indeed the software you are referring to is unable to work with linear data. It allows you to open a linear image, but then you have to stretch it nonlinearly if you want to do anything useful.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: linear vs. non-linear state
« Reply #8 on: 2011 February 15 01:20:35 »
Yes. If I'm not mistaken, in that software you don't have tools that work with linear images (other than the ones that don't understand what's a linear image, as geometric transformations, or intensity transformations like histograms or curves).

V.