Browse Source

Bug Fixes.

EMGUCV_3_1
Canming Huang 9 years ago
parent
commit
d05079d248
  1. 6
      Emgu.CV.Cuda/CudaImage.cs
  2. 4
      Emgu.CV.Cuda/GpuMat.cs
  3. 2
      Emgu.CV.Test/AutoTestCuda.cs

6
Emgu.CV.Cuda/CudaImage.cs

@ -90,7 +90,7 @@ namespace Emgu.CV.Cuda
/// <param name="image">The CudaImage where the region is extracted from</param>
/// <param name="colRange">The column range. Use MCvSlice.WholeSeq for all columns.</param>
/// <param name="rowRange">The row range. Use MCvSlice.WholeSeq for all rows.</param>
public CudaImage(CudaImage<TColor, TDepth> image, MCvSlice rowRange, MCvSlice colRange)
public CudaImage(CudaImage<TColor, TDepth> image, Range rowRange, Range colRange)
:this(CudaInvoke.GetRegion(image, ref rowRange, ref colRange), true)
{
}
@ -281,7 +281,7 @@ namespace Emgu.CV.Cuda
/// <remarks>The parent CudaImage should never be released before the returned CudaImage that represent the subregion</remarks>
public new CudaImage<TColor, TDepth> RowRange(int start, int end)
{
return new CudaImage<TColor, TDepth>(this, new MCvSlice(start, end), MCvSlice.WholeSeq);
return new CudaImage<TColor, TDepth>(this, new Range(start, end), Range.All);
}
/// <summary>
@ -304,7 +304,7 @@ namespace Emgu.CV.Cuda
/// <remarks>The parent CudaImage should never be released before the returned CudaImage that represent the subregion</remarks>
public new CudaImage<TColor, TDepth> ColRange(int start, int end)
{
return new CudaImage<TColor, TDepth>(this, MCvSlice.WholeSeq, new MCvSlice(start, end));
return new CudaImage<TColor, TDepth>(this, Range.All, new Range(start, end));
}
#region IImage Members

4
Emgu.CV.Cuda/GpuMat.cs

@ -274,7 +274,7 @@ namespace Emgu.CV.Cuda
/// <remarks>The parent GpuMat should never be released before the returned GpuMat that represent the subregion</remarks>
public GpuMat RowRange(int start, int end)
{
return new GpuMat(this, new MCvSlice(start, end), MCvSlice.WholeSeq);
return new GpuMat(this, new Range(start, end), Range.All);
}
/// <summary>
@ -297,7 +297,7 @@ namespace Emgu.CV.Cuda
/// <remarks>The parent GpuMat should never be released before the returned GpuMat that represent the subregion</remarks>
public GpuMat ColRange(int start, int end)
{
return new GpuMat(this, MCvSlice.WholeSeq, new MCvSlice(start, end));
return new GpuMat(this, Range.All, new Range(start, end));
}
/// <summary>

2
Emgu.CV.Test/AutoTestCuda.cs

@ -103,7 +103,7 @@ namespace Emgu.CV.Test
Image<Gray, Byte> img1 = new Image<Gray, byte>(1200, 640);
img1.SetRandUniform(new MCvScalar(0, 0, 0), new MCvScalar(255, 255, 255));
using (GpuMat gpuImg1 = new GpuMat(img1))
using (GpuMat mat = new GpuMat(gpuImg1, new MCvSlice(0, 1), MCvSlice.WholeSeq))
using (GpuMat mat = new GpuMat(gpuImg1, new Range(0, 1), Range.All))
{
Size s = mat.Size;
}

Loading…
Cancel
Save