本文整理汇总了C#中HTuple.TupleDeviation方法的典型用法代码示例。如果您正苦于以下问题:C# HTuple.TupleDeviation方法的具体用法?C# HTuple.TupleDeviation怎么用?C# HTuple.TupleDeviation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTuple
的用法示例。
在下文中一共展示了HTuple.TupleDeviation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ComputeStatistics
/// <summary>Adjusts statistics of measure projection (line profile).</summary>
public void ComputeStatistics(double[] grayVals)
{
HTuple tuple, val;
int max =0;
if (grayVals != null)
{
tuple = new HTuple(grayVals);
val = tuple.TupleMean();
labelMean.Text = val[0].D.ToString("f2");
val = tuple.TupleDeviation();
labelDeviation.Text = val[0].D.ToString("f2");
val = tuple.TupleSortIndex();
labelPeakX.Text = val[val.Length - 1].I + "";
max = (int)tuple[val[val.Length - 1].I].D;
labelPeak.Text = max + "";
labelRange.Text = (int)tuple[0].D + " ... " + (int)tuple[tuple.Length - 1].D;
labelRangeX.Text = "0 ... " + (tuple.Length - 1);
}
else
{
labelMean.Text = "0";
labelDeviation.Text = "0";
labelPeakX.Text = "0";
labelPeak.Text = "0";
labelRange.Text = "0 ... 0";
labelRangeX.Text = "0 ... 0";
}
}