示例#1
0
        // Set video resolution
        private void resolutionCombo_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (svs.IsConnected)
            {
                try
                {
                    SRV1.VideoResolution resolution = SRV1.VideoResolution.Small;

                    switch (resolutionCombo.SelectedIndex)
                    {
                    case 0:
                        resolution = SRV1.VideoResolution.Tiny;
                        break;

                    case 2:
                        resolution = SRV1.VideoResolution.Medium;
                        break;
                    }

                    svs.SetResolution(resolution);

                    // reset FPS statistics
                    statIndex = statReady = 0;
                }
                catch (Exception ex)
                {
                    System.Diagnostics.Debug.WriteLine("## " + ex.Message);
                }
            }
        }
示例#2
0
 /// <summary>
 /// Set video resolution.
 /// </summary>
 ///
 /// <param name="resolution">Video resolution to set.</param>
 ///
 /// <remarks>
 /// <para><note>Setting higher <see cref="SetQuality">quality level</see> and resolution
 /// may increase delays for other requests processed by <see cref="SRV1"/> class. So if
 /// robot is used not only for video, but also for controlling servos/motors, and higher
 /// response level is required, then do not set very high quality and resolution.
 /// </note></para>
 /// </remarks>
 ///
 public void SetResolution(SRV1.VideoResolution resolution)
 {
     communicator.SetResolution(resolution);
 }
示例#3
0
文件: SVS.cs 项目: EnergonV/BestCS
 /// <summary>
 /// Set video resolution for both cameras.
 /// </summary>
 ///
 /// <param name="resolution">Video resolution to set.</param>
 ///
 /// <remarks>
 /// <para><note>Setting higher <see cref="SetQuality">quality level</see> and resolution
 /// may increase delays for other requests sent to SVS. So if
 /// robot is used not only for video, but also for controlling servos/motors, and higher
 /// response level is required, then do not set very high quality and resolution.
 /// </note></para>
 /// </remarks>
 ///
 /// <exception cref="NotConnectedException">Not connected to SVS. Connect to SVS board before using
 /// this method.</exception>
 ///
 public void SetResolution(SRV1.VideoResolution resolution)
 {
     SafeGetCommunicator1( ).SetResolution(resolution);
     SafeGetCommunicator2( ).SetResolution(resolution);
 }