大华工业相机显示帧率问题

上位机接收相机传回的数据时间较长

    // 转码显示线程 
    private void ShowThread()
    {
        while (m_bShowLoop)
        {
            
            if (m_frameList.Count == 0)
            {
                Thread.Sleep(1);
                continue;
            }

            cot++;
            if (cot == 5)
            {
                watch1.Stop();  //停止监视
                TimeSpan timespan = watch1.Elapsed;  //获取当前实例测量得出的总时间
            }

            // 图像队列取最新帧 

            m_mutex.WaitOne();
            //IGrabbedRawData frame = m_frameList.ElementAt(m_frameList.Count - 1);
            IGrabbedRawData frame = m_frameList.ElementAt(0);
            m_frameList.Clear();
            m_mutex.ReleaseMutex();

            // 主动调用回收垃圾 
            GC.Collect();

             //控制显示最高帧率为25FPS 
             
            if (false == isTimeToDisplay())
            {
                continue;
            }
            
            try
            {
                // 图像转码成bitmap图像 
                var bitmap = frame.ToBitmap(false);

                m_bShowByGDI = true;
                if (m_bShowByGDI)
                {
                    // 使用GDI绘图 
                    if (_g == null)
                    {
                        _g = pictureBox1.CreateGraphics();
                    }
                    _g.DrawImage(bitmap, new Rectangle(0, 0, pictureBox1.Width, pictureBox1.Height),
                    new Rectangle(0, 0, bitmap.Width, bitmap.Height), GraphicsUnit.Pixel);
                    bitmap.Dispose();
                }
                else
                {
                    // 使用控件绘图,会造成主界面卡顿 
                    if (InvokeRequired)
                    {
                        BeginInvoke(new MethodInvoker(() =>
                        {
                            try
                            {
                                pictureBox1.Image = bitmap;
                            }
                            catch (Exception exception)
                            {
                                Catcher.Show(exception);
                            }
                        }));
                    }
                }

                if (cot == 4)
                {
                    watch1.Start();  //开始监视代码运行时间
                }

                //m_frameList.RemoveAt(0);
            }
            catch (Exception exception)
            {
                Catcher.Show(exception);
            }
        }
    }

在判断数据队列不为空语句前后加了时间监控,检测第五次上位机接收数据花费的时间

缩短曝光时间,但没有效果

想要帧率达到20FPS以上