コード例 #1
0
        /// <summary>
        /// constructor
        /// </summary>
        /// <param name="host">host name or IP address</param>
        /// <param name="port_number_left">port number for the left camera</param>
        /// <param name="port_number_right">port number for the right camera</param>
        /// <param name="broadcast_port">port number on which to broadcast stereo feature data to other applications</param>
        /// <param name="fps">ideal frames per second</param>
        public SurveyorVisionStereo(
            string host,
            int port_number_left,
            int port_number_right,
            int broadcast_port,
            float fps) : base(broadcast_port, fps)
        {
            usage.Update("Create, SurveyorVisionStereo, Constructor");

            device_name = "Surveyor stereo camera";
            this.host   = host;

            camera = new SurveyorVisionClient[2];
            for (int cam = 0; cam < 2; cam++)
            {
                camera[cam]           = new SurveyorVisionClient();
                camera[cam].usage     = usage;
                camera[cam].grab_mode = SurveyorVisionClient.GRAB_MULTI_CAMERA;
                camera[cam].cam_index = cam;
            }

            port_number    = new int[2];
            port_number[0] = port_number_left;
            port_number[1] = port_number_right;
        }
コード例 #2
0
        /// <summary>
        /// constructor
        /// </summary>
        /// <param name="host">host name or IP address</param>
        /// <param name="port_number_left">port number for the left camera</param>
        /// <param name="port_number_right">port number for the right camera</param>
        /// <param name="broadcast_port">port number on which to broadcast stereo feature data to other applications</param>
        /// <param name="fps">ideal frames per second</param>
        public SurveyorVisionStereo(
		    string host,
            int port_number_left,
            int port_number_right,
            int broadcast_port,
            float fps) : base(broadcast_port, fps)
        {
            usage.Update("Create, SurveyorVisionStereo, Constructor");
            
            device_name = "Surveyor stereo camera";
            this.host = host;
            
            camera = new SurveyorVisionClient[2];
            for (int cam = 0; cam < 2; cam++)
            {
                camera[cam] = new SurveyorVisionClient();
                camera[cam].usage = usage;
                camera[cam].grab_mode = SurveyorVisionClient.GRAB_MULTI_CAMERA;
				camera[cam].cam_index = cam;
            }
            
            port_number = new int[2];
            port_number[0] = port_number_left;
            port_number[1] = port_number_right;            
        }