From 134b18ccb5331ab1529a4b18aeeab682da275c1b Mon Sep 17 00:00:00 2001 From: yzk Date: Wed, 20 Jan 2021 08:27:25 +0800 Subject: [PATCH] add an extra example of ResourcesTracker; change a misspelling of ResourcesTracker's comment --- README.md | 11 +++++++++++ src/OpenCvSharp/Fundamentals/ResourcesTracker.cs | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8f3f10e68..2f28dfea3 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,17 @@ using (ResourcesTracker t = new ResourcesTracker()) Mat mat4 = t.NewMat(); Cv2.Merge(new Mat[] { mats1[0], mats1[1], mats1[2] }, mat4); } + +using (ResourcesTracker t = new ResourcesTracker()) +{ + var src = t.T(new Mat(@"lenna.png", ImreadModes.Grayscale)); + var dst = t.NewMat(); + Cv2.Canny(src, dst, 50, 200); + var blurredDst = t.T(dst.Blur(new Size(3, 3))); + t.T(new Window("src image", src)); + t.T(new Window("dst image", blurredDst)); + Cv2.WaitKey(); +} ``` diff --git a/src/OpenCvSharp/Fundamentals/ResourcesTracker.cs b/src/OpenCvSharp/Fundamentals/ResourcesTracker.cs index 05622ece6..782b06411 100644 --- a/src/OpenCvSharp/Fundamentals/ResourcesTracker.cs +++ b/src/OpenCvSharp/Fundamentals/ResourcesTracker.cs @@ -4,7 +4,7 @@ namespace OpenCvSharp { /// - /// Used for manage the resources of OpenCVSharp, like Mat, MatExpr, etc. + /// Used for managing the resources of OpenCVSharp, like Mat, MatExpr, etc. /// public class ResourcesTracker : IDisposable {