Author Topic: Question about the MTF function  (Read 3307 times)

Offline desertsky

  • Newcomer
  • Posts: 6
Question about the MTF function
« on: 2017 March 20 14:34:11 »
The documentation for Histogram transformation gives this formula

MTF(m,x) = (m-1) x
           -----------
           (2m-1)x - m

I have an image whose median is .5333333
If I use this formula with x = .53333 and
m = .25 (TargetBackground)
I get .774, however, if I do STF on the image it says
the midpoint is .275 (The clip is zero)
When I try this formula with a star image the
calculations work out but not for this image which is a gray gradient.
So what is STF using to get its result?

Offline sharkmelley

  • PTeam Member
  • PixInsight Addict
  • ***
  • Posts: 241
    • Mark Shelley Astrophotography
Re: Question about the MTF function
« Reply #1 on: 2017 March 20 23:28:24 »
Run the STF process and hit the "nuclear radiation" button, for instance.

Drag the bottom left triangle of the STF process onto the desktop as a process icon.

Right click the process icon and choose "Edit Instance Source Code" and you will see the parameters it used (which will differ from image to image).

Mark
Takahashi Epsilon 180ED
H-alpha modified Sony A7S
http://www.markshelley.co.uk/Astronomy/

Offline desertsky

  • Newcomer
  • Posts: 6
Re: Question about the MTF function
« Reply #2 on: 2017 March 21 07:28:45 »
Interesting, however, I get the same result by clicking on the wrench icon. This still does not answer my question about where this parameter came from. There is a documented MTF formula (in original post) which does not seem to apply in this case.

Offline sharkmelley

  • PTeam Member
  • PixInsight Addict
  • ***
  • Posts: 241
    • Mark Shelley Astrophotography
Re: Question about the MTF function
« Reply #3 on: 2017 March 21 17:01:08 »
You're right, you can see the same numbers by hitting the wrench.  The left hand column is where STF has put the blackpoint slider.  The middle column is the position of the midtone slider relative to the blackpoint slider which is the value "m" in the MTF formula ("m" isn't the TargetBackground).  The right hand column is the position of the whitepoint. In the formula the value x ranges from 0 at the blackpoint to 1 at the whitepoint and this defines the shape of the transfer curve.

It might help clarify things if you drag the STF blue triangle to the bottom bar of the HistogramTransformation process.  You'll then see the STF transfer curve graphed in the lower area of the window.  Select your image as the view in the HT window and your image histogram will then be superimposed on the curve with the resultant histogram in the top area of the window.

What we don't know is exactly how STF automatically determines "m", i.e. the midtone value which is the relative position of the midtone slider.  Maybe that is what your question really was?  Or are you moving the sliders manually and wondering exactly how that affects your image?

Mark
« Last Edit: 2017 March 21 23:40:27 by sharkmelley »
Takahashi Epsilon 180ED
H-alpha modified Sony A7S
http://www.markshelley.co.uk/Astronomy/

Offline desertsky

  • Newcomer
  • Posts: 6
Re: Question about the MTF function
« Reply #4 on: 2017 March 22 10:46:13 »
Yes, the question is how is m calculated?

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Question about the MTF function
« Reply #5 on: 2017 March 22 11:26:18 »
Hi,

The STF and the STF AutoStretch algorithms are fully described in the XISF specification. See Sections 8.5.6 Display Function and 8.5.7 Adaptive Display Function Algorithm of the latest XISF specification document.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline desertsky

  • Newcomer
  • Posts: 6
Re: Question about the MTF function
« Reply #6 on: 2017 March 22 12:47:18 »
Thanks, Juan - great reference. I had figured out the inflection point at median = .5 but the high clip is new information.

Offline desertsky

  • Newcomer
  • Posts: 6
Re: Question about the MTF function
« Reply #7 on: 2017 March 26 08:16:40 »
Juan, another question please.
I have an image of R & G & B stripes on a white background. The median is 1 and MAD is 0. Using the referenced formulas the MTF should be 1, however, Pixinsight gives the MTF as .308668
How does Pixinsight arrive at this value? Is there some additional min/max or limits checking not reflected in the formulas?
Thanks