Beispiel #1
0
        protected override bool Step(SharedRef <IRasterImageBase> imageIn)
        {
            if (!Running)
            {
                return(false);
            }
            SetupStep(imageIn);
            // keypoint detection
            Point2i[] keypoints;
            int       keypointNo = pointDetector.Detect(imageIn.Reference, imageOut.Reference, out keypoints);

            // keypoint labeling
            int[] labels;
            int   labelNo = pointLabeler.Label(keypoints, keypointNo, imageOut.Reference, out labels);
            // TODO: pose detection
            var position = poseEstimator.Estimate(keypoints, labels, labelNo);

            // spread results
            OnInputProcessed(new ImageProcessedEventArgs(imageOut));
            OnPositionDetected(new PositionDetectedEventArgs(position));
            return(true);
        }