Browse Source

Updated documentation for Mat and UMat.

pull/768/merge
Canming Huang 2 months ago
parent
commit
ad6dc93f92
  1. 13
      Emgu.CV/Core/Mat.cs
  2. 24
      Emgu.CV/Core/UMat.cs

13
Emgu.CV/Core/Mat.cs

@ -22,8 +22,19 @@ namespace Emgu.CV
{
/// <summary>
/// The equivalent of cv::Mat
/// Represents a matrix object in the Emgu CV library, which is used for image processing and computer vision tasks.
/// </summary>
/// <remarks>
/// This class provides a managed wrapper for the OpenCV matrix (cv::Mat) and includes functionality for creating, manipulating, and accessing matrix data.
/// It supports various constructors for initializing matrices with specific dimensions, data types, and data sources.
/// Additionally, it implements interfaces for serialization, equality comparison, and input/output array operations.
/// </remarks>
/// <example>
/// <code>
/// // Example of creating a Mat object
/// Mat mat = new Mat(100, 100, CvEnum.DepthType.Cv8U, 3);
/// </code>
/// </example>
[Serializable]
[DebuggerTypeProxy(typeof(Mat.DebuggerProxy))]
#if !(UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL || UNITY_STANDALONE || UNITY_WSA || UNITY_EDITOR)

24
Emgu.CV/Core/UMat.cs

@ -20,9 +20,29 @@ using System.Text.Json.Serialization;
namespace Emgu.CV
{
/// <summary>
/// The equivalent of cv::Mat, should only be used if you know what you are doing.
/// In most case you should use the Matrix class instead
/// Represents a managed wrapper for the OpenCV UMat (Universal Matrix) structure, which provides
/// a flexible and efficient way to handle multi-dimensional dense arrays in OpenCV.
/// This class supports operations such as element-wise arithmetic, data manipulation,
/// and interoperability with other OpenCV structures.
/// </summary>
/// <remarks>
/// The <see cref="UMat"/> class is designed to work with OpenCV's GPU-accelerated operations,
/// enabling efficient computation on supported hardware. It provides constructors and methods
/// for creating, manipulating, and accessing data in various formats, including submatrices,
/// reshaped matrices, and matrices loaded from files.
/// </remarks>
/// <example>
/// Example usage:
/// <code>
/// UMat umat = new UMat(100, 100, CvEnum.DepthType.Cv8U, 3);
/// umat.SetTo(new MCvScalar(255, 0, 0)); // Set all pixels to blue
/// umat.Save("output.png");
/// </code>
/// </example>
/// <seealso cref="Mat"/>
/// <seealso cref="IInputOutputArray"/>
/// <seealso cref="IEquatable{T}"/>
/// <seealso cref="ISerializable"/>
[Serializable]
[DebuggerTypeProxy(typeof(UMat.DebuggerProxy))]
#if !(UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL || UNITY_STANDALONE || UNITY_WSA || UNITY_EDITOR)

Loading…
Cancel
Save