public void ProcessImage(CameraImage cameraImage)
        {
            var bitmap = converter.ToBitmap(cameraImage);
            var greyImage = new Image<Gray, byte>(bitmap);

            var cornerPoints = cornersDetector.Detect(greyImage, configuration.InnerCornersPerChessboardCols,
                configuration.InnerCornersPerChessboardRows);

            if (cornerPoints.Size > 1)
            {
                Vectors = vectorsCalculator.Calculate(cornerPoints, greyImage.Size);
                var colorImage = MarkChessboard(bitmap, cornerPoints);
                Image = converter.Convert(colorImage.ToBitmap());
            }
            else
            {
                Image = converter.Convert(bitmap);
            }
        }
Beispiel #2
0
 private void OnWrite(Vectors vectors)
 {
     DataProvider.Vectors = vectors;
 }