这是来自流行的EmguCV包的类签名。这是Image
课程 - 并非所有课程都很重要:
/// <summary>
/// An Image is a wrapper to IplImage of OpenCV.
/// </summary>
/// <typeparam name="TColor">Color type of this image (either Gray, Bgr, Bgra, Hsv, Hls, Lab, Luv, Xyz, Ycc, Rgb or Rbga)</typeparam>
/// <typeparam name="TDepth">Depth of this image (either Byte, SByte, Single, double, UInt16, Int16 or Int32)</typeparam>
public partial class Image<TColor, TDepth>
: CvArray<TDepth>, IImage, IEquatable<Image<TColor, TDepth>>
where TColor : struct, IColor
where TDepth : new()
具体来说,请注意
...
where TDepth : new() // <-- either Byte, SByte, Single, double, UInt16, Int16 or Int32
new()
如何将类型参数TDepth
约束为.NET整数类型?