Beispiel #1
0
    // Taking a picture
    public BlobDetection TakePicture(byte[] bytes)
    {
        // Go through the skincolor segmentation
        SkinColorSegmentation scs            = new SkinColorSegmentation(bytes);
        Image <Gray, byte>    segmentedImage = scs.GetSkinRegion();

        segmentedImage = segmentedImage.ThresholdBinaryInv(new Gray(150), new Gray(255));

        // Go through the edge detection
        EdgeDetection ed = new EdgeDetection(segmentedImage);

        ed.DetectEdges();

        // Go through the BLOB detection
        BlobDetection blobDetector = new BlobDetection(ed.detectedEdges);

        blobDetector.DetectBlobs();

        return(blobDetector);
    }