陆其明吧 关注:196贴子:6,653
  • 9回复贴,共1

编程调整摄像头焦距

收藏回复

  • 219.132.237.*
我有一个清华紫光的摄像头,可以运行AMCap.exe调整焦距(AMCap.exe本来是没有设置焦距按钮,是供应商驱动程序自己添加上的)。
现在我需要在自己的程序里改变焦距,怎样作,请陆老师指点一下


1楼2006-12-19 12:07回复
    你把“清华紫光的摄像头”寄给我,我来帮你瞧瞧,哈哈~~~


    禁言 |2楼2006-12-19 12:27
    回复
      看看能不能获得IAMCameraControl 接口去控制。

      The IAMCameraControl interface provides local or remote control over a camera. Applications can use this interface to control camera settings such as zoom, pan, aperture adjustment, or shutter speed. To obtain this interface, query the filter that controls the camera. 

      In addition to the methods inherited from IUnknown, the IAMCameraControl interface exposes the following methods.

      Method Description 
      Get Retrieves the current setting of a camera property. 
      GetRange retrieves the range and default value of a specified camera property. 
      Set Sets a specified property on the camera.


      禁言 |3楼2006-12-19 12:28
      回复
        • 211.102.240.*
        我试验了,尽管编译能过,代码运行也正常,但是硬件并没有对代码产生对应的是效果。。
        陆老师能指点下吗?
        MSN:liang_ls@163.com
        MAIL:liangls1982@gmail.com


        4楼2009-05-14 20:44
        回复
          • 211.102.240.*
          MSN:liang_ls@163.com 
          MAIL:liangls1982@gmail.com
          我的代码如下:
          请陆老师指教,我是windows mobile 6.0的系统
          CHK(m_pCaptureGraphBuilder->FindInterface(NULL,NULL,m_pVideoCaptureFilter,IID_IAMCameraControl,(void**)&pCamControl)); 
          //CHK( m_pVideoCaptureFilter->QueryInterface(IID_IAMCameraControl, (void **)&pCamControl));
          CHK( pCamControl->GetRange(CameraControl_Focus,&Min,&Max,&Step,&Default,&Flags));
          CHK( pCamControl->Get(CameraControl_Focus, &Val, &Flags));
          printf("Focus : %d - %d ; %d [%d](%d) ? \n",Min,Max,Step,Default,Val);
          CHK( pCamControl->Set(CameraControl_Focus,200,CameraControl_Flags_Manual));
          CHK( pCamControl->GetRange(CameraControl_Zoom,&Min,&Max,&Step,&Default,&Flags));
          CHK( pCamControl->Get(CameraControl_Zoom, &Val, &Flags));
          printf("Zoom : %d - %d ; %d [%d](%d) ? \n",Min,Max,Step,Default,Val);
          CHK( pCamControl->Set(CameraControl_Zoom,4,CameraControl_Flags_Manual));


          5楼2009-05-14 20:46
          回复
            • 211.102.240.*
            陆老师 最近不在吗?


            6楼2009-05-20 11:30
            回复
              • 220.248.151.*
              我的Logitech Quickcam Pro 9000可以调


              7楼2009-05-26 21:40
              回复
                楼主要实现自动对焦吗?


                禁言 |8楼2011-05-17 14:14
                回复
                  我最近也在实现自动对焦和摄像头旋转的功能,代码都是正常运行,只是没效果。求支持。Q1913392936.


                  IP属地:贵州禁言 |9楼2012-08-10 17:11
                  回复
                    我想要一个当摄像头出现亮点鼠标自动跟踪


                    禁言 |10楼2014-10-14 13:05
                    回复