本文整理汇总了C#中OutputArray.?.ThrowIfNotReady方法的典型用法代码示例。如果您正苦于以下问题:C# OutputArray.?.ThrowIfNotReady方法的具体用法?C# OutputArray.?.ThrowIfNotReady怎么用?C# OutputArray.?.ThrowIfNotReady使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OutputArray
的用法示例。
在下文中一共展示了OutputArray.?.ThrowIfNotReady方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Detect
/// <summary>
/// Finds lines in the input image.
/// This is the output of the default parameters of the algorithm on the above shown image.
/// </summary>
/// <param name="image">A grayscale (CV_8UC1) input image. </param>
/// <param name="lines">A vector of Vec4i or Vec4f elements specifying the beginning and ending point of a line.
/// Where Vec4i/Vec4f is (x1, y1, x2, y2), point 1 is the start, point 2 - end. Returned lines are strictly oriented depending on the gradient.</param>
/// <param name="width">Vector of widths of the regions, where the lines are found. E.g. Width of line.</param>
/// <param name="prec">Vector of precisions with which the lines are found.</param>
/// <param name="nfa">Vector containing number of false alarms in the line region,
/// with precision of 10%. The bigger the value, logarithmically better the detection.</param>
public virtual void Detect(InputArray image, OutputArray lines,
OutputArray width = null, OutputArray prec = null, OutputArray nfa = null)
{
if (image == null)
throw new ArgumentNullException(nameof(image));
if (lines == null)
throw new ArgumentNullException(nameof(lines));
image.ThrowIfDisposed();
lines.ThrowIfNotReady();
width?.ThrowIfNotReady();
prec?.ThrowIfNotReady();
nfa?.ThrowIfNotReady();
NativeMethods.imgproc_LineSegmentDetector_detect_OutputArray(ptr, image.CvPtr, lines.CvPtr,
Cv2.ToPtr(width), Cv2.ToPtr(prec), Cv2.ToPtr(nfa));
GC.KeepAlive(image);
lines.Fix();
width?.Fix();
prec?.Fix();
nfa?.Fix();
}