在ZORAN COACH11平台上实现的AutoFocus全局搜索算法

本文详细介绍了在ZORAN COACH11平台上实现的AutoFocus全局搜索算法,包括镜头驱动部分和AF算法部分。算法通过中断函数CheckCurrVD确保VD信号与AF统计同步,全局搜索范围需要根据镜头装配误差校准。编译步骤包括执行bat文件生成库文件,并在HCE.C和工程配置中进行相应修改。
摘要由CSDN通过智能技术生成

AutoFocus全局搜索算法说明

程序文件功能

1)镜头驱动部分,实现镜头的驱动和控制,可以根据需要进行相关修改。

11LS0240II_driver.h

1LS0240II_driver.c

其中:

STATIC VOID

LensThread(ULONG ulParam)

采用多线程实现镜头快门、光圈开关,镜头作动等控制;

 

STATIC  VOID

FocusGoPos(BOOL bCali, SHORT wTgtPos)

bCali——为镜头到HP(零位)位置校准开关,可以校准回转误差;

实现到驱动镜头到固定位置的功能;

 

STATIC BOOL

FocusFar(UINT uiStepMove)

实现镜头往远点方向的驱动,可以利用该函数实现手动聚焦;

 

STATIC BOOL

FocusNear(UINT uiStepMove)

实现镜头往近点方向的驱动,可以利用该函数实现手动聚焦;

 

STATIC VOID MotorStep()

步进马达的单步控制函数;

 

VOID

LensIni();

BOOL

LENS_CMD_ShutterOpen( );

BOOL

LENS_CMD_ShutterClose( );

BOOL

LENS_CMD_IrisBig( );

BOOL

LENS_CMD_IrisSmall( );

供外部函数调用的接口函数,实现镜头快门、光圈大小开关等控制;

 

2AF算法部分说明

AF_Algo.c——实现AutoFocus全局搜索算法。

#define SCAN_STEP_NUM 2 搜索步长

#define SCAN_NEAR_POS -30 ///搜索近点下限——需要根据实际镜头的安装位置进行调整

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
1) Basic concepts of Auto Focus Algorithm 1.1) AF Detection methods There are two focus detection (AF) methods. 1) Distance detection method. 2) Contrast detection method. 1.1.1) Distance detection method The distance detection method is that the camera use AF module for detecting distance for main objects. If the camera is used this AF method, it will not need to use CCD to detect object’s contrast. There are three types of AF modules. 1. Active AF module 2. Passive AF module 3. TTL AF module 1.1.1.1) Active AF module Active AF systems measure distance to the subject independently of the optical system, and subsequently adjust the optical system for correct focus. There are various ways to measure distance, including ultrasonic sound waves and infrared light. In the first case, sound waves are emitted from the camera, and by measuring the delay in their reflection, distance to the subject is calculated. Polaroid cameras were known for successfully applying this system. In the latter case, infrared light is usually used to triangulate the distance to the subject. An exception to the two-step approach is the mechanical autofocus provided in some enlargers, which adjust the lens directly. 1.1.1.2) Passive AF module Passive AF systems determine correct focus by performing passive analysis of the image that is entering the optical system. They generally do not direct any energy, such as ultrasonic sound or infrared light waves, toward the subject. (However, an autofocus assist beam of usually infrared light is required when there is not enough light to take passive measurements.) Passive autofocusing can be achieved by phase detection or contrast measurement.
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值