Exemplo n.º 1
0
    static void Main()
    {
        try
        {
            var zivid = new Zivid.NET.Application();

            Console.WriteLine("Connecting to camera");
            var camera = zivid.ConnectCamera();
            var inputs = ReadInputs(camera);

            Console.WriteLine("Performing hand-eye calibration");
            var calibrationResult = Calibrator.CalibrateEyeToHand(inputs);

            if (calibrationResult)
            {
                Console.WriteLine("{0}\n{1}\n{2}", "Hand-eye calibration OK", "Result:", calibrationResult);
            }
            else
            {
                Console.WriteLine("Hand-eye calibration FAILED");
                Environment.ExitCode = 1;
            }
        }
        catch (Exception ex)
        {
            Console.WriteLine("Error: {0}", ex.Message);
            Environment.ExitCode = 1;
        }
    }