Author Topic: Linear/Non Linear  (Read 4351 times)

Offline budguinn

  • PixInsight Addict
  • ***
  • Posts: 106
Linear/Non Linear
« on: 2010 April 30 08:06:35 »
From watching some of the tutorials it seems that it is best to keep the image linear as long as possible ..... for such things as deconvolution, hdr wavelets..etc.
Is this correct?

Now, this is how I am understanding some of the program functions from the tutorials...

When I do a histogram transformation....on the live preview......then drag the new instance icon to the ScreenTransfer it gives the same visual look.
Now I understand that this method will keep the image linear...is this correct?
Also, the histogram transformation ..... by itself....is a linear transformation....is this correct?

Also, is there an information page that lets me know the attributes of the image....specifically if it is now linear/non-linear.  I've checked the history and it doesn't seem to show this

best regards,

bud

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: Linear/Non Linear
« Reply #1 on: 2010 April 30 08:14:07 »
Hi bud,

as soon as you do a non-linear histogram transform it's no longer linear :)

The important thing is that depending on the operation the 32b float representation of the image retains all the non-clipped detail. So if you stretch your image but leave the white point alone then the detail in the bright areas is preserved and can be retrieved with HDR Wavelets for example.

The only operations I do on linear images are:

- DBE
- background neutralization
- color calibration

Then I do a stretch and that's the end of linear data.
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 Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: Linear/Non Linear
« Reply #2 on: 2010 April 30 09:34:46 »
Hi Bud,

Quote
When I do a histogram transformation....on the live preview......then drag the new instance icon to the ScreenTransfer it gives the same visual look.
Now I understand that this method will keep the image linear...is this correct?
Also, the histogram transformation ..... by itself....is a linear transformation....is this correct?

Whilst you are using LivePreview to make the adjustments to the Histogram sliders, you have still NOT yet changed any data in the image. You then drag the NewInstance icon (the little blue triangle) to the bottom bar of the ScreenTransfer window, and you have still NOT changed any data in the image.

Things will get a little bit confused though at this time, because the STF is an action that is always applied 'between' the image and the image display - and that means that your LivePreview may well now get 'double transformed', once by the actions of the Histo sliders, and once by the actions of the STF. Just something to keep in mind!!

In fact, I now usually come up with a 'first trial' using the STF only - in other words I don't use the LivePreview and the Histo sliders at all. Then I 'apply' the STF instance over to the Histo window (via the bottom bar again) and have a quick 'tweak' as needed, paying attention to the 'amount' of pixels that may be getting clipped at the Balck and White ends (in fact, I would normally not accept ANY clipping, but you hopefully see where I am coming from).

At that stage I would possibly even drop a 'copy' of the STF instance on the workspce desktop, as a 'safety net', and then perhaps 'apply' the Histo transform to the image, clearing the STF as I go. If I don't like what I have done, at least I can backtrack to the saved instance.

As far as 'linear transforms' are concerned, I am sure that you would understand that ALL Histogram transforms remain 'linear', providing the 'MTF' (Mid-tone Transfer Function) slider remains at 0.50000. In my mind, once you have applied any Histo or Curve transform that affects the image 'linearity', then you have  made some operations, such as Deconvolution, all but impossible to apply. This is where the STF scores so heavily, because it allows you to 'view' the image AS IF the non-linear transform had been applied, whilst the underlying image data remains capable of being processed by algorithms such as Deconvolution, etc.

As far as the likes of HDRW is concerned, whilst this 'can' be used with data that is still 'linear', there is no advantage in doing so - and in fact the likes of HDRW is actually 'easier' to apply once the image has had a non-linear stretch applied, simply because this gives the algorithm 'more headroom' to work with.

As Sander describes, there are only a very few operations that do NOT affect the linearity of the data - and those which he listed are the same as I apply, almost automatically, at the start of every image workflow. Onto his list are the other obvious stages, such as all the Calibration and Alignment steps, as well as all the Integration steps, and would also include an initial Dynamic Crop as well (essential for the likes of me, where I just do NOT get perfect behaviour from my mount during imaging sessions, and so I will ALWAYS have to 'trim off' the edges where only partial data has been obtained.

Whilst on the subject of DynamicCrop, remember that it is also very easy to rotate your crop outline as well - handy if you are trying to either maximise the number of useable pixels in your final image, or if you are after a specific 'framing' requirement (and this is also where an initial 'hard' STF can let you see all the data you need to see).

Nice to see you 'on-board', and looking forward to seeing what you can make PI do!

Cheers,
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline Harry page

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1458
    • http://www.harrysastroshed.com
Re: Linear/Non Linear
« Reply #3 on: 2010 April 30 11:07:22 »
Hi Bud

In practice the HDR tool is only used on stretched images  :D

Also have you noticed if you have used the STF on your image and are happy with the settings you can drag the new instance icon to the histogram tran ( this sets the tool ) and apply the hisogram tran  to your image to make the alterations permanent  ;)

Harry
Harry Page

Offline sleshin

  • PixInsight Old Hand
  • ****
  • Posts: 431
Re: Linear/Non Linear
« Reply #4 on: 2010 April 30 11:15:04 »
Hi Bud,

I don't think there is an info page that specifically states that the image is linear/nonlinear. The image will remain linear until it is stretched with the Histogram transformation tool and the stretch includes moving the Mid tone transfer function(the middle triangle or "gamma" slider), and the changes are applied directly to the image with the new instance icon. If instead you drag the new instance icon to the Screen Transfer function you get the same stretch result but the image remains linear.

Generally when you start processing the initial steps are done with the image still linear. The common steps that require a linear image are as mentioned, DBE, Background Neutralization, Color Calibration, and Deconvolution. I will do my initial stretch either with the STF(try the "A" icon on the left border of the STF dialog for an auto stretch) or to get finer control of the stretch, use the Histo Transfer Function applying the result to the image via the STF so it remains linear.

Steve

Steve Leshin

Stargazer Observatory
Sedona, Arizona

Offline budguinn

  • PixInsight Addict
  • ***
  • Posts: 106
Re: Linear/Non Linear
« Reply #5 on: 2010 April 30 16:46:23 »
thanks guys for all the good replies.....I'll take all this info and play with it.....the HDR tool looks very useful.

I was especially impressed at the way the HDR tool pulled out a very strong M42 core that was almost completely hidden by the bright surroundings.

With all of the clouds I should have enough time to give it a good try out.

bud