Beispiel #1
0
        /// <summary>
        /// Estimates the apparent gamma of the tone curve using a least square fit to a
        /// pure exponent expression in the ƒ(x)=x^𝛾.
        /// </summary>
        /// <param name="precision">The maximum standard deviation allowed on the residuals.</param>
        /// <returns>The estimated gamma at the given precision, or -1 if the fitting has less precision.</returns>
        /// <exception cref="ObjectDisposedException">
        /// The ToneCurve has already been disposed.
        /// </exception>
        /// <remarks>
        /// <para>
        /// A value of 0.01 is a fair value for <paramref name="precision"/>. Set to a large number to fit any
        /// curve no matter good the fit.
        /// </para>
        /// <para>
        /// The 𝛾 is estimated at the given precision.
        /// </para>
        /// </remarks>
        public double EstimateGamma(double precision)
        {
            EnsureNotClosed();

            return(Interop.EstimateGamma(handle, precision));
        }