Browse Source

Documentation updates.

pull/84/merge
Canming Huang 7 years ago
parent
commit
4cf8939ada
  1. 3
      Emgu.CV.Contrib/XFeatures2D/BoostDesc.cs
  2. 1
      Emgu.CV.Cuda/Legacy/CudaBackgroundSubtractorFGD.cs
  3. 22
      Emgu.CV.Test/AutoTestCuda.cs
  4. 10
      Emgu.CV/Dnn/Layer.cs
  5. 26
      Emgu.CV/Dnn/Net.cs
  6. 7
      Emgu.CV/Flann/Index3D.cs
  7. 16
      Emgu.CV/Objdetect/QRCodeDetector.cs
  8. 3
      Emgu.CV/PInvoke/CvInvokeImgproc.cs
  9. 3
      Emgu.CV/Shape/HistogramCostExtractor.cs

3
Emgu.CV.Contrib/XFeatures2D/BoostDesc.cs

@ -88,6 +88,9 @@ namespace Emgu.CV.XFeatures2D
}
}
/// <summary>
/// This class wraps the functional calls to the OpenCV XFeatures2D modules
/// </summary>
public static partial class XFeatures2DInvoke
{
static XFeatures2DInvoke()

1
Emgu.CV.Cuda/Legacy/CudaBackgroundSubtractorFGD.cs

@ -74,6 +74,7 @@ namespace Emgu.CV.Cuda
/// </summary>
/// <param name="frame">Next video frame.</param>
/// <param name="learningRate">The learning rate, use -1.0f for default value.</param>
/// <param name="forgroundMask">Output the current forground mask</param>
public void Apply(IInputArray frame, IOutputArray forgroundMask, double learningRate = -1.0)
{
using (InputArray iaFrame = frame.GetInputArray())

22
Emgu.CV.Test/AutoTestCuda.cs

@ -524,6 +524,7 @@ namespace Emgu.CV.Test
}
#if NONFREE
[Test]
public void TestCudaSURFKeypointDetection()
{
@ -541,6 +542,7 @@ namespace Emgu.CV.Test
cudaSurf.DownloadKeypoints(cudaKpts, kpts);
}
}
#endif
[Test]
public void TestCudaFASTDetector()
@ -647,7 +649,7 @@ namespace Emgu.CV.Test
if (!CudaInvoke.HasCuda)
return;
#region prepare synthetic image for testing
#region prepare synthetic image for testing
int templWidth = 50;
int templHeight = 50;
Point templCenter = new Point(120, 100);
@ -662,7 +664,7 @@ namespace Emgu.CV.Test
img.ROI = objectLocation;
randomObj.Copy(img, null);
img.ROI = Rectangle.Empty;
#endregion
#endregion
Image<Gray, Single> match = img.MatchTemplate(randomObj, Emgu.CV.CvEnum.TemplateMatchingType.Sqdiff);
double[] minVal, maxVal;
@ -760,7 +762,7 @@ namespace Emgu.CV.Test
Mat m = new Mat(new Size(480, 320), DepthType.Cv8U, 3);
CvInvoke.Randu(m, new MCvScalar(), new MCvScalar(255, 255, 255));
#region test for async download & upload
#region test for async download & upload
Stream stream = new Stream();
GpuMat gm1 = new GpuMat();
gm1.Upload(m, stream);
@ -770,15 +772,15 @@ namespace Emgu.CV.Test
stream.WaitForCompletion();
EmguAssert.IsTrue(m.Equals(m2));
#endregion
#endregion
#region test for blocking download & upload
#region test for blocking download & upload
GpuMat gm2 = new GpuMat();
gm2.Upload(m);
Mat m3 = new Mat();
gm2.Download(m3);
EmguAssert.IsTrue(m.Equals(m3));
#endregion
#endregion
}
@ -952,7 +954,7 @@ namespace Emgu.CV.Test
FastFeatureDetector fast = new FastFeatureDetector(100, true);
BriefDescriptorExtractor brief = new BriefDescriptorExtractor(32);
#region extract features from the object image
#region extract features from the object image
Stopwatch stopwatch = Stopwatch.StartNew();
VectorOfKeyPoint modelKeypoints = new VectorOfKeyPoint();
fast.DetectRaw(box, modelKeypoints);
@ -960,11 +962,11 @@ namespace Emgu.CV.Test
brief.Compute(box, modelKeypoints, modelDescriptors);
stopwatch.Stop();
Trace.WriteLine(String.Format("Time to extract feature from model: {0} milli-sec", stopwatch.ElapsedMilliseconds));
#endregion
#endregion
Image<Gray, Byte> observedImage = new Image<Gray, byte>("box_in_scene.png");
#region extract features from the observed image
#region extract features from the observed image
stopwatch.Reset(); stopwatch.Start();
VectorOfKeyPoint observedKeypoints = new VectorOfKeyPoint();
fast.DetectRaw(observedImage, observedKeypoints);
@ -972,7 +974,7 @@ namespace Emgu.CV.Test
brief.Compute(observedImage, observedKeypoints, observedDescriptors);
stopwatch.Stop();
Trace.WriteLine(String.Format("Time to extract feature from image: {0} milli-sec", stopwatch.ElapsedMilliseconds));
#endregion
#endregion
Mat homography = null;
using (GpuMat<Byte> gpuModelDescriptors = new GpuMat<byte>(modelDescriptors)) //initialization of GPU code might took longer time.

10
Emgu.CV/Dnn/Layer.cs

@ -13,7 +13,9 @@ using System.Diagnostics;
namespace Emgu.CV.Dnn
{
/// <summary>
/// This interface class allows to build new Layers - are building blocks of networks.
/// </summary>
public partial class Layer : SharedPtrObject
{
internal Layer(IntPtr sharedPtr, IntPtr ptr)
@ -22,6 +24,9 @@ namespace Emgu.CV.Dnn
_ptr = ptr;
}
/// <summary>
/// List of learned parameters must be stored here to allow read them by using Net::getParam().
/// </summary>
public VectorOfMat Blobs
{
get
@ -30,6 +35,9 @@ namespace Emgu.CV.Dnn
}
}
/// <summary>
/// Release the unmanaged memory associated with this Layer.
/// </summary>
protected override void DisposeObject()
{
if (!IntPtr.Zero.Equals(_sharedPtr))

26
Emgu.CV/Dnn/Net.cs

@ -160,6 +160,11 @@ namespace Emgu.CV.Dnn
}
}
/// <summary>
/// Converts string name of the layer to the integer identifier.
/// </summary>
/// <param name="layerName">The name of the layer</param>
/// <returns>The id of the layer</returns>
public int GetLayerId(String layerName)
{
using (CvString csLayerName = new CvString(layerName))
@ -168,6 +173,11 @@ namespace Emgu.CV.Dnn
}
}
/// <summary>
/// Returns layer with specified name which the network use.
/// </summary>
/// <param name="layerName">The name of the layer</param>
/// <returns>Layer with specified name which the network use.</returns>
public Layer GetLayer(String layerName)
{
IntPtr sharedPtr = IntPtr.Zero;
@ -177,6 +187,11 @@ namespace Emgu.CV.Dnn
return new Layer(sharedPtr, ptr);
}
/// <summary>
/// Returns layer with specified id which the network use.
/// </summary>
/// <param name="layerId">The id of the layer</param>
/// <returns>Layer with specified id which the network use.</returns>
public Layer GetLayer(int layerId)
{
IntPtr sharedPtr = IntPtr.Zero;
@ -184,6 +199,9 @@ namespace Emgu.CV.Dnn
return new Layer(sharedPtr, ptr);
}
/// <summary>
/// Returns indexes of layers with unconnected outputs.
/// </summary>
public int[] UnconnectedOutLayers
{
get
@ -196,6 +214,9 @@ namespace Emgu.CV.Dnn
}
}
/// <summary>
/// Returns names of layers with unconnected outputs.
/// </summary>
public String[] UnconnectedOutLayersNames
{
get
@ -208,6 +229,11 @@ namespace Emgu.CV.Dnn
}
}
/// <summary>
/// Returns overall time for inference and timings (in ticks) for layers. Indexes in returned vector correspond to layers ids. Some layers can be fused with others, in this case zero ticks count will be return for that skipped layers.
/// </summary>
/// <param name="timings">Vector for tick timings for all layers.</param>
/// <returns>Overall ticks for model inference.</returns>
public Int64 GetPerfProfile(VectorOfDouble timings = null)
{
if (timings != null)

7
Emgu.CV/Flann/Index3D.cs

@ -81,6 +81,13 @@ namespace Emgu.CV.Flann
return n;
}
/// <summary>
/// Perform a search within the given radius
/// </summary>
/// <param name="position">The center of the search area</param>
/// <param name="radius">The radius of the search</param>
/// <param name="maxResults">The maximum number of results to return</param>
/// <returns>The neighbors found</returns>
public Neighbor[] RadiusSearch(MCvPoint3D32f position, double radius, int maxResults)
{
_query.Data[0, 0] = position.X;

16
Emgu.CV/Objdetect/QRCodeDetector.cs

@ -63,6 +63,14 @@ namespace Emgu.CV
[return:MarshalAs(CvInvoke.BoolMarshalType)]
internal extern static bool cveQRCodeDetectorDetect(IntPtr detector, IntPtr input, IntPtr points);
/// <summary>
/// Detect QR code in image and return minimum area of quadrangle that describes QR code.
/// </summary>
/// <param name="input">Matrix of the type CV_8U containing an image where QR code are detected.</param>
/// <param name="points">Output vector of vertices of a quadrangle of minimal area that describes QR code.</param>
/// <param name="epsX">Epsilon neighborhood, which allows you to determine the horizontal pattern of the scheme 1:1:3:1:1 according to QR code standard.</param>
/// <param name="epsY">Epsilon neighborhood, which allows you to determine the vertical pattern of the scheme 1:1:3:1:1 according to QR code standard.</param>
/// <returns>True if QR code is found</returns>
public static bool DetectQRCode(IInputArray input, VectorOfPoint points, double epsX, double epsY)
{
using (InputArray iaInput = input.GetInputArray())
@ -73,6 +81,14 @@ namespace Emgu.CV
[return: MarshalAs(CvInvoke.BoolMarshalType)]
internal extern static bool cveDetectQRCode(IntPtr input, IntPtr points, double epsX, double epsY);
/// <summary>
/// Decode QR code in image and return text that is encrypted in QR code.
/// </summary>
/// <param name="input">Matrix of the type CV_8UC1 containing an image where QR code are detected.</param>
/// <param name="points">Input vector of vertices of a quadrangle of minimal area that describes QR code.</param>
/// <param name="decodeInfo">String information that is encrypted in QR code.</param>
/// <param name="straightQRCode">Matrix of the type CV_8UC1 containing an binary straight QR code.</param>
/// <returns>True if the QR code is found.</returns>
public static bool DecodeQRCode(IInputArray input, IInputArray points, CvString decodeInfo, IOutputArray straightQRCode = null)
{
using (InputArray iaInput = input.GetInputArray())

3
Emgu.CV/PInvoke/CvInvokeImgproc.cs

@ -1336,7 +1336,8 @@ namespace Emgu.CV
#endregion
/// <summary>
/// Applies fixed-level thresholding to single-channel array. The function is typically used to get bi-level (binary) image out of grayscale image (cvCmpS could be also used for this purpose) or for removing a noise, i.e. filtering out pixels with too small or too large values. There are several types of thresholding the function supports that are determined by threshold_type
/// Applies a fixed-level threshold to each array element.
/// The function applies fixed-level thresholding to a multiple-channel array. The function is typically used to get a bi-level (binary) image out of a grayscale image ( compare could be also used for this purpose) or for removing a noise, that is, filtering out pixels with too small or too large values. There are several types of thresholding supported by the function. They are determined by type parameter.
/// </summary>
/// <param name="src">Input array (multiple-channel, 8-bit or 32-bit floating point).</param>
/// <param name="dst">Output array of the same size and type and the same number of channels as src.</param>

3
Emgu.CV/Shape/HistogramCostExtractor.cs

@ -20,6 +20,9 @@ namespace Emgu.CV.Shape
/// </summary>
public abstract class HistogramCostExtractor : UnmanagedObject
{
/// <summary>
/// Pointer native cv::Ptr object.
/// </summary>
protected IntPtr _sharedPtr;
/// <summary>

Loading…
Cancel
Save