This keeps track of everything to do with images. It has 3 sections: -the form (to display the image) -an IMAQdxSession (the class which controls the camera) -a VisionImage (the class that deals with image data) You can now build this into a hardware controller and it knows how to use a camera! The hardware controller doesn't really need to know anything about IMAQ anymore.
コード例 #1
0
ファイル: Controller.cs プロジェクト: ColdMatter/EDMSuite
        public void StartCameraControl()
        {
            try
            {
                ImageController = new CameraController("cam1");
                ImageController.Initialize();
                ImageController.PrintCameraAttributesToConsole();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, "Camera Initialization Error",
                    MessageBoxButtons.OK, MessageBoxIcon.Error);
                Application.Exit();

            }
        }
コード例 #2
0
ファイル: Controller.cs プロジェクト: ColdMatter/EDMSuite
        public void StartCameraControl()
        {
            try
            {
                ImageController = new CameraController("cam1");
                //This is used to analyse each image during a live stream
                ImageController.analyse = true;
                ImageController.Initialize();
                ImageController.SetCameraAttributes(cameraAttributesPath);
                ImageController.PrintCameraAttributesToConsole();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, "Camera Initialization Error",
                MessageBoxButtons.OK, MessageBoxIcon.Error);
                Application.Exit();

            }
        }