Browse Source

Reset _algorithm pointer upon dispose.

pull/703/head
Canming Huang 4 years ago
parent
commit
921d055723
  1. 2
      Emgu.CV.Contrib/XImgproc/DisparityWLSFilter.cs
  2. 1
      Emgu.CV.Contrib/XImgproc/EdgeBoxes.cs
  3. 1
      Emgu.CV.Contrib/XImgproc/EdgeDrawing.cs
  4. 1
      Emgu.CV.Contrib/XImgproc/RidgeDetectionFilter.cs
  5. 10
      Emgu.CV.Contrib/XImgproc/ScanSegment.cs

2
Emgu.CV.Contrib/XImgproc/DisparityWLSFilter.cs

@ -73,6 +73,8 @@ namespace Emgu.CV.XImgproc
{
XImgprocInvoke.cveDisparityWLSFilterRelease(ref _sharedPtr);
_ptr = IntPtr.Zero;
_algorithm = IntPtr.Zero;
_disparityFilterPtr = IntPtr.Zero;
}
}
}

1
Emgu.CV.Contrib/XImgproc/EdgeBoxes.cs

@ -99,6 +99,7 @@ namespace Emgu.CV.XImgproc
{
XImgprocInvoke.cveEdgeBoxesRelease(ref _sharedPtr);
_ptr = IntPtr.Zero;
_algorithm = IntPtr.Zero;
}
}
}

1
Emgu.CV.Contrib/XImgproc/EdgeDrawing.cs

@ -45,6 +45,7 @@ namespace Emgu.CV.XImgproc
{
XImgprocInvoke.cveEdgeDrawingRelease(ref _sharedPtr);
_ptr = IntPtr.Zero;
_algorithm = IntPtr.Zero;
}
}

1
Emgu.CV.Contrib/XImgproc/RidgeDetectionFilter.cs

@ -88,6 +88,7 @@ namespace Emgu.CV.XImgproc
{
XImgprocInvoke.cveRidgeDetectionFilterRelease(ref _sharedPtr);
_ptr = IntPtr.Zero;
_algorithm = IntPtr.Zero;
}
}
}

10
Emgu.CV.Contrib/XImgproc/ScanSegment.cs

@ -29,7 +29,14 @@ namespace Emgu.CV.XImgproc
get { return _algorithm; }
}
/// <summary>
/// Initializes a ScanSegment object.
/// </summary>
/// <param name="imageWidth">Image width.</param>
/// <param name="imageHeight">Image height.</param>
/// <param name="numSuperpixels">Desired number of superpixels. Note that the actual number may be smaller due to restrictions (depending on the image size). Use NumberOfSuperpixels to get the actual number.</param>
/// <param name="slices">Number of processing threads for parallelisation. Setting -1 uses the maximum number of threads. In practice, four threads is enough for smaller images and eight threads for larger ones.</param>
/// <param name="mergeSmall">Merge small segments to give the desired number of superpixels. Processing is much faster without merging, but many small segments will be left in the image.</param>
public ScanSegment(
int imageWidth,
int imageHeight,
@ -85,6 +92,7 @@ namespace Emgu.CV.XImgproc
if (_sharedPtr != IntPtr.Zero)
{
XImgprocInvoke.cveScanSegmentRelease(ref _sharedPtr);
_algorithm = IntPtr.Zero;
_ptr = IntPtr.Zero;
}
}

Loading…
Cancel
Save