예제 #1
0
        //设置为预设分辨率
        private void radioButton_ResolutionPreset_CheckedChanged(object sender, EventArgs e)
        {
            tSdkImageResolution t;

            MvApi.CameraGetImageResolution(m_hCamera, out t);
            t.iIndex = m_iResolutionIndex;//切换预设分辨率, 只需要设定index值就行了。 其余的值可忽略,或者填0
            MvApi.CameraSetImageResolution(m_hCamera, ref t);
            UpdateResolution();
        }
예제 #2
0
        //选中一个预设分辨率进行设置
        private void comboBox_RresPreset_SelectedIndexChanged(object sender, EventArgs e)
        {
            m_iResolutionIndex = comboBox_RresPreset.SelectedIndex;

            tSdkImageResolution t;

            MvApi.CameraGetImageResolution(m_hCamera, out t);
            t.iIndex = m_iResolutionIndex;//切换预设分辨率, 只需要设定index值就行了。
            MvApi.CameraSetImageResolution(m_hCamera, ref t);
        }
예제 #3
0
        //可视化设置自定义分辨率。
        private void button_ROI_Click(object sender, EventArgs e)
        {
            tSdkImageResolution t;
            CameraSdkStatus     status;

            MvApi.CameraGetImageResolution(m_hCamera, out t);
            status = MvApi.CameraCustomizeResolution(m_hCamera, ref t);
            if (status == CameraSdkStatus.CAMERA_STATUS_SUCCESS)
            {
                m_tRoiResolution = t;
                MvApi.CameraSetImageResolution(m_hCamera, ref m_tRoiResolution);
            }
        }
예제 #4
0
 //设置为自定义分辨率
 private void radioButton_ResolutionROI_CheckedChanged(object sender, EventArgs e)
 {
     MvApi.CameraSetImageResolution(m_hCamera, ref m_tRoiResolution);
     UpdateResolution();
 }