Example #1
1
 public void TestSimpleBlobDetector()
 {
    Mat box = EmguAssert.LoadMat("box.png");
    SimpleBlobDetectorParams p = new SimpleBlobDetectorParams();
    SimpleBlobDetector detector = new SimpleBlobDetector(p);
    MKeyPoint[] keypoints = detector.Detect(box);
 }
 public void TestCirclesGrid()
 {
    Size patternSize = new Size(4, 3);
    Image<Gray, Byte> circlesGridImage = EmguAssert.LoadImage<Gray, byte>("circlesGrid.bmp");
    using (SimpleBlobDetector detector = new SimpleBlobDetector())
    using (Util.VectorOfPointF centers = new Util.VectorOfPointF())
    {
       bool found = CvInvoke.FindCirclesGrid(circlesGridImage, patternSize, centers, CvEnum.CalibCgType.SymmetricGrid | CvEnum.CalibCgType.Clustering, detector);
       CvInvoke.DrawChessboardCorners(circlesGridImage, patternSize, centers, found);
       //UI.ImageViewer.Show(circlesGridImage);
    }
 }