Skip to content

Commit

Permalink
Merge pull request #1181 from yangzhongke/main
Browse files Browse the repository at this point in the history
add an extra example of ResourcesTracker; change a misspelling of ResourcesTracker's comment
  • Loading branch information
shimat authored Jan 20, 2021
2 parents 5e135b9 + 134b18c commit faf5596
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
```


Expand Down
2 changes: 1 addition & 1 deletion src/OpenCvSharp/Fundamentals/ResourcesTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace OpenCvSharp
{
/// <summary>
/// Used for manage the resources of OpenCVSharp, like Mat, MatExpr, etc.
/// Used for managing the resources of OpenCVSharp, like Mat, MatExpr, etc.
/// </summary>
public class ResourcesTracker : IDisposable
{
Expand Down

0 comments on commit faf5596

Please sign in to comment.