WO2023103207A1 - Imaging focusing system for specified monitoring area - Google Patents

Imaging focusing system for specified monitoring area Download PDF

Info

Publication number
WO2023103207A1
WO2023103207A1 PCT/CN2022/081182 CN2022081182W WO2023103207A1 WO 2023103207 A1 WO2023103207 A1 WO 2023103207A1 CN 2022081182 W CN2022081182 W CN 2022081182W WO 2023103207 A1 WO2023103207 A1 WO 2023103207A1
Authority
WO
WIPO (PCT)
Prior art keywords
lens
image
focusing
focus ring
focus
Prior art date
Application number
PCT/CN2022/081182
Other languages
French (fr)
Chinese (zh)
Inventor
李俊杰
高超
曹渊
顾伟
Original Assignee
江苏航天大为科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 江苏航天大为科技股份有限公司 filed Critical 江苏航天大为科技股份有限公司
Publication of WO2023103207A1 publication Critical patent/WO2023103207A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/50Constructional details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/50Constructional details
    • H04N23/55Optical parts specially adapted for electronic image sensors; Mounting thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals

Definitions

  • the invention belongs to the technical field of video monitoring, in particular to an imaging focusing system for a designated monitoring area.
  • Autofocus technology is one of the key technologies of computer vision and various imaging systems, and it is widely used in imaging systems such as digital cameras and digital video cameras.
  • the traditional autofocus technology mostly uses the distance measurement method, that is, by measuring the object distance, the image distance or focal length of the system is obtained from the lens equation to adjust the system to make it in the state of accurate focus.
  • auto-focus technology has entered a new digital era. More and more auto-focus methods analyze and calculate image-related information based on image processing theory, and then according to control strategy Drive the motor and adjust the system to make it focus accurately.
  • Auto Focus is the use of the principle of object light reflection, the reflected light is received by the sensor on the camera, processed by a computer, and the way to drive the electric focus device to focus is called auto focus. It is divided into active and passive two categories. Active autofocus: use the infrared generator and ultrasonic generator on the camera to emit infrared light or ultrasonic waves to the subject. The receiver on the camera accepts the reflected infrared light or ultrasonic to focus, and its optical principle is similar to the triangular ranging focusing method. There is an energy method in the active type, which is used for the autofocus of low-end popular cameras, and is widely used in various head-up viewfinder cameras.
  • Passive autofocus It is a way to directly receive and analyze the reflection from the scene itself and perform autofocus.
  • the advantage of this autofocus method is that it does not require a launch system, so it consumes less energy and is conducive to miniaturization. It can autofocus ideally for subjects with a certain brightness, and it can also focus well under backlighting. It can automatically focus on objects with high brightness in the distance, and can focus through glass.
  • the shooting objects are traffic participants on the road, and most of them are a large number of moving targets.
  • the movement of traffic objects or the change of light cannot guarantee the clear picture of the designated shooting area. Therefore, fixed-focus lenses with manual focus are commonly used in road and traffic video surveillance systems.
  • special vehicles and personnel are needed to focus the camera. Therefore, the present invention designs an imaging focusing system for a designated monitoring area, and the lens of the user's video monitoring camera focuses.
  • Video surveillance cameras with fixed-focus lenses are widely used in road and traffic monitoring. Due to the different scenes and objects of video surveillance, it is necessary to focus on the lens every time the camera is installed or replaced. Due to the particularity of road and traffic video surveillance installations, the focus debugging requires the cooperation of professionals, and the process is complicated. At the same time, the common auto-focus lens will be automatically calculated according to the focus algorithm, which will cause the focus point or area to change with the movement of the object and the change of light, which is not conducive to the requirement of a fixed shooting area in road and traffic video surveillance.
  • the present invention proposes an imaging focusing system in a specified environment. By setting the shooting area, collecting images multiple times, using the image definition value algorithm and focusing ring driver control, the automatic focusing of the specified area is realized, which greatly reduces the It eliminates the difficulty of focusing work of fixed-focus lens monitoring cameras in road and traffic monitoring.
  • An imaging focusing system for a designated monitoring area disclosed in the present invention includes a focusing ring driving wheel, a lens focusing ring, a motor system and a fixed bracket, and the motor system includes a motor control system and a motor; the motor control system controls the rotation of the motor direction and rotation time, and then the transmission structure in the motor drives the focus ring drive wheel to rotate, and the focus ring drive wheel is connected with the lens fixed focus ring to control the lens focus ring to realize the focusing operation of the lens.
  • the gear ratio of the drive wheel of the focus ring enables the focus ring of the lens to rotate and focus in units of 1°.
  • the motor control system reads the configuration of the detection area in the camera, sets the start point and end point, and then reads the gray value of the current frame detection area image, calculates the sharpness value of the image, and controls the The focus ring of the lens is rotated to adjust the focus.
  • controlling the rotation and focusing of the lens fixed focus ring according to the sharpness value of the image includes:
  • the image sharpness is calculated using the gray variance product method, and the formula is as follows:
  • the electric mechanism is used to control the rotation of the fixed focus ring, so there is no need to manually focus when installing the camera, and at the same time, it can be adjusted in time after the specified area is modified.
  • the evaluation algorithm is used to calculate the sharpness of the image after focusing. Compared with the traditional subjective evaluation method, the focus is more accurate.
  • the focus ring driver adopts a gear set structure, which can control the angle more precisely than other transmission methods, so there is no need to rotate the lens.
  • Fig. 1 is a structural connection diagram of the imaging focusing system of the present invention
  • Fig. 2 is a flow chart of the calculation of the definition of the detection area of the present invention.
  • FIG. 3 is a flow chart of the imaging focus control algorithm of the present invention.
  • the present invention is mainly aimed at installing video surveillance cameras on the road.
  • the detection area is a common configuration, which is mainly used to calibrate the area where the camera needs to detect and shoot. Therefore, the clarity of the image in the detection area directly affects the function of the camera. .
  • the present invention utilizes the gray scale variance product (SMD2) algorithm to calculate the definition value of the detection area, so as to reduce the error caused by the subjective evaluation.
  • SMD2 gray scale variance product
  • the image in the focused area has a clearer segmentation of the scene content, so the difference between pixels is greater, and in a more complex scene, the clearer the image, the greater the change in adjacent pixels;
  • the SMD2 algorithm takes advantage of this feature and uses the gray variance product index to measure the sharpness of the image.
  • the calculation formula of the gray variance product is as follows:
  • (m s , n s ) represents the starting point of the image detection area, which is the coordinate point of the upper left corner of the area; (m e , n e ) represents the end point of the image detection area, which is the coordinate point of the lower right corner of the area; x ij represents The gray value of the image pixels in the detection area.
  • the present invention calculates the image sharpness value, it first reads the detection area configuration in the camera, sets the starting point (m e , n e ), the end point (m s , n s ), and then reads the detection area of the current frame ( m, n) the gray value of the image, and finally use the SMD2 algorithm to output the sharpness value of the image.
  • the process is shown in Figure 1 below.
  • the present invention can evaluate the adjustment of the focus system on the basis of the sharpness value, and control the focus system based on this, so as to achieve the purpose of clearly focusing the detection area.
  • the focus ring driver of the present invention is a structure composed of a focus ring drive wheel, a motor system and a fixed bracket, and the physical connection structure is shown in FIG. 2 .
  • the main working principle of the focus ring driver in the present invention is that the control system controls the rotation direction and rotation time of the motor, and then the transmission structure in the motor system drives the focus ring drive wheel to rotate, and the focus ring drive wheel is connected with the lens fixed focus ring to directly control the lens
  • the focus ring realizes the focus operation of the lens.
  • the motor system needs to calibrate the system before working. It is necessary to calibrate the working time of the motor system when the focus ring rotates 1° according to the gear ratio of the transmission system in the system, so as to control the focus ring with 1° as The unit rotates to adjust the focus.
  • the present invention designs a set of focus ring driver control algorithms based on the SMD2 algorithm and the focus ring driver.
  • the algorithm first initializes the parameters of the focus ring driver and the SMD2 algorithm.
  • the initialization parameters include the time required to power on the motor when the focus ring rotates 1° and the designated area in the camera monitoring screen.
  • calculate SMD2(m,n) while rotating the fixed focus ring at a speed of 1°/time and compare the values of SMD2(m,n) twice before and after. Since the image of the specified area is in a blurred state at the beginning, the value of SMD2(m,n) is small. After rotating the fixed focus ring, the image gradually becomes clear.
  • SMD2(m,n)' is the sharpness value of the image in the specified area after the previous rotation
  • the initial value of SMD2(m,n)' is the maximum value of the current calculation accuracy, which is initialized to 65535 in this algorithm , so as to ensure that the algorithm can enter the judgment process.
  • the focus ring driver will not make the next rotation, and will not retreat 1° to correct the focus result.
  • the focus ring driver rotates 1° and captures the image, and updates SMD2(m,n), if SMD2(m,n)>SMD2( m, n)' then stop the rotation to complete the focus.
  • the electric mechanism is used to control the rotation of the fixed focus ring, so there is no need to manually focus when installing the camera, and at the same time, it can be adjusted in time after the specified area is modified.
  • the evaluation algorithm is used to calculate the sharpness of the image after focusing. Compared with the traditional subjective evaluation method, the focus is more accurate.
  • the focus ring driver adopts a gear set structure, which can control the angle more precisely than other transmission methods, so there is no need to rotate the lens.
  • the word "preferred” means serving as an example, instance or illustration. Any aspect or design described herein as “preferred” is not necessarily to be construed as advantageous over other aspects or designs. Rather, use of the word “preferred” is intended to present concepts in a concrete manner.
  • the term “or” is intended to mean an inclusive “or” rather than an exclusive “or”. That is, unless otherwise specified or clear from context, "X employs A or B” is meant to naturally include either of the permutations. That is, if X employs A; X employs B; or X employs both A and B, then "X employs A or B" is satisfied in any of the foregoing instances.
  • Each functional unit in the embodiment of the present invention may be integrated into one processing module, or each unit may physically exist separately, or multiple or more of the above units may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the integrated modules are implemented in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium.
  • the storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, and the like.
  • Each of the above devices or systems may execute the storage method in the corresponding method embodiment.

Abstract

Disclosed in the present invention is an imaging focusing system for a specified monitoring area. The imaging focusing system comprises a focusing ring driving wheel, a lens focus-fixing ring, an electric motor system and a fixed support, wherein the electric motor system comprises an electric motor control system and an electric motor; the electric motor control system controls the rotation direction and the rotation time of the electric motor, a transmission structure in the electric motor then drives the focusing ring driving wheel to rotate, and the focusing ring driving wheel is connected to the lens focus-fixing ring, so as to control the lens focus-fixing ring to implement a focusing operation of a lens. In the present invention, the rotation of a focus-fixing ring is controlled by using an electric mechanism, without needing to perform manual focusing when a camera is mounted, and adjustment can also be performed in a timely manner after a specified area is modified. The definition of a focused image is calculated by using an assessment algorithm, and therefore, compared with a traditional subjective assessment method, focusing is more accurate. A focusing ring driver uses a gear set structure, and therefore, compared with other transmission methods, a control angle is more accurate, and thus there is no need to rotate a lens backwards.

Description

一种指定监控区域的成像对焦系统An imaging focusing system for designated monitoring area 技术领域technical field
本发明属于视频监控技术领域,尤其涉及一种指定监控区域的成像对焦系统。The invention belongs to the technical field of video monitoring, in particular to an imaging focusing system for a designated monitoring area.
背景技术Background technique
自动对焦技术是计算机视觉和各类成像系统的关键技术之一,在数码相机、数码摄像机等成像系统中有着广泛的用途。传统的自动对焦技术较多采用测距法,即通过测出物距,由镜头方程求出系统的像距或焦距,来调整系统使之处于准确对焦的状态。随着现代计算技术的发展和数字图像处理理论的日益成熟,自动对焦技术进入一个新的数字时代,越来越多的自动对焦方法基于图像处理理论对图像有关信息进行分析计算,然后根据控制策略驱动电机,调节系统使之准确对焦。Autofocus technology is one of the key technologies of computer vision and various imaging systems, and it is widely used in imaging systems such as digital cameras and digital video cameras. The traditional autofocus technology mostly uses the distance measurement method, that is, by measuring the object distance, the image distance or focal length of the system is obtained from the lens equation to adjust the system to make it in the state of accurate focus. With the development of modern computing technology and the increasing maturity of digital image processing theory, auto-focus technology has entered a new digital era. More and more auto-focus methods analyze and calculate image-related information based on image processing theory, and then according to control strategy Drive the motor and adjust the system to make it focus accurately.
自动对焦(Auto Focus)是利用物体光反射的原理,将反射的光被相机上的传感器接受,通过计算机处理,带动电动对焦装置进行对焦的方式叫自动对焦。它多分为主动式和被动式两类。主动式自动对焦:利用相机上的红外线发生器、超声波发生器发出红外光或超声波到被摄体。相机上的接受器接受反射回来的红外光或超声波进行对焦,其光学原理类似三角测距对焦法。主动式中又有能量法,用于低档普及型相机的自动对焦,广泛用于各种平视取景相机。被动式自动对焦:即直接接收分析来自景物自身的反光,进行自动对焦的方式。这种自动对焦方式的优点是;自身不要发射系统,因而耗能少,有利于小型化。对具有一定亮度的被摄体能理想的自动对焦,在逆光下也能良好的对焦,对远处亮度大的物体能自动对焦,能透过玻璃对焦。Auto Focus (Auto Focus) is the use of the principle of object light reflection, the reflected light is received by the sensor on the camera, processed by a computer, and the way to drive the electric focus device to focus is called auto focus. It is divided into active and passive two categories. Active autofocus: use the infrared generator and ultrasonic generator on the camera to emit infrared light or ultrasonic waves to the subject. The receiver on the camera accepts the reflected infrared light or ultrasonic to focus, and its optical principle is similar to the triangular ranging focusing method. There is an energy method in the active type, which is used for the autofocus of low-end popular cameras, and is widely used in various head-up viewfinder cameras. Passive autofocus: It is a way to directly receive and analyze the reflection from the scene itself and perform autofocus. The advantage of this autofocus method is that it does not require a launch system, so it consumes less energy and is conducive to miniaturization. It can autofocus ideally for subjects with a certain brightness, and it can also focus well under backlighting. It can automatically focus on objects with high brightness in the distance, and can focus through glass.
在道路、交通视频监控系统中,由于拍摄场景路口或路段的固定位置, 拍摄对象为道路上的交通参与对象,多为大量移动目标,因此在拍摄时如果使用自动对焦系统,会使得对焦区域随交通对象的移动或者光线的变换发生移动,无法保证指定拍摄区域的画面清晰,因此在道路、交通视频监控系统中普遍使用了手动对焦的定焦镜头。但由于道路、交通视频监控安装的特殊性,对相机对焦需要借助特殊车辆和人员,因此本发明设计了一种指定监控区域的成像对焦系统,用户视频监控相机的镜头对焦。In the road and traffic video monitoring system, due to the fixed position of the intersection or road section of the shooting scene, the shooting objects are traffic participants on the road, and most of them are a large number of moving targets. The movement of traffic objects or the change of light cannot guarantee the clear picture of the designated shooting area. Therefore, fixed-focus lenses with manual focus are commonly used in road and traffic video surveillance systems. However, due to the particularity of road and traffic video monitoring installations, special vehicles and personnel are needed to focus the camera. Therefore, the present invention designs an imaging focusing system for a designated monitoring area, and the lens of the user's video monitoring camera focuses.
发明内容Contents of the invention
带定焦镜头的视频监控相机在道路、交通监控中有着广泛的应用。由于视频监控的场景、对象不同,导致每次安装或更换相机时,都需要对镜头进行对焦操作。受限于道路、交通视频监控安装的特殊性,对焦调试需专业人员配合,过程复杂。同时常见的自动对焦镜头在使用会依据对焦算法自动计算,导致对焦点或区域会随着物体移动、光线变化而发生变化,不利于道路、交通视频监控中拍摄区域固定的要求。有鉴于此,本发明提出一种指定环境下的成像对焦系统,通过设置拍摄区域,多次采集成像,利用图像清晰度值算法以及对焦环驱动器控制,来实现对指定区域的自动对焦,大幅降低了道路、交通监控中定焦镜头监控相机对焦作业的难度。Video surveillance cameras with fixed-focus lenses are widely used in road and traffic monitoring. Due to the different scenes and objects of video surveillance, it is necessary to focus on the lens every time the camera is installed or replaced. Due to the particularity of road and traffic video surveillance installations, the focus debugging requires the cooperation of professionals, and the process is complicated. At the same time, the common auto-focus lens will be automatically calculated according to the focus algorithm, which will cause the focus point or area to change with the movement of the object and the change of light, which is not conducive to the requirement of a fixed shooting area in road and traffic video surveillance. In view of this, the present invention proposes an imaging focusing system in a specified environment. By setting the shooting area, collecting images multiple times, using the image definition value algorithm and focusing ring driver control, the automatic focusing of the specified area is realized, which greatly reduces the It eliminates the difficulty of focusing work of fixed-focus lens monitoring cameras in road and traffic monitoring.
本发明公开的一种指定监控区域的成像对焦系统,包括对焦环驱动轮、镜头定焦环、电机系统和固定支架,所述电机系统包括电机控制系统和电机;所述电机控制系统控制电机转动方向以及转动时间,再由电机内的传动结构带动所述对焦环驱动轮转动,所述对焦环驱动轮与所述镜头定焦环连接,控制镜头定焦环实现镜头的对焦操作。An imaging focusing system for a designated monitoring area disclosed in the present invention includes a focusing ring driving wheel, a lens focusing ring, a motor system and a fixed bracket, and the motor system includes a motor control system and a motor; the motor control system controls the rotation of the motor direction and rotation time, and then the transmission structure in the motor drives the focus ring drive wheel to rotate, and the focus ring drive wheel is connected with the lens fixed focus ring to control the lens focus ring to realize the focusing operation of the lens.
进一步的,所述对焦环驱动轮的齿比使得所述镜头定焦环以1°为单位进行旋转调焦。Further, the gear ratio of the drive wheel of the focus ring enables the focus ring of the lens to rotate and focus in units of 1°.
进一步的,电机控制系统读取相机中的检测区域配置,设置起始点、终止点,再读取当前帧检测区域图像的灰度值,计算图像的清晰度值,并根据图像的清晰度值控制所述镜头定焦环旋转调焦。Further, the motor control system reads the configuration of the detection area in the camera, sets the start point and end point, and then reads the gray value of the current frame detection area image, calculates the sharpness value of the image, and controls the The focus ring of the lens is rotated to adjust the focus.
进一步的,所述根据图像的清晰度值控制所述镜头定焦环旋转调焦包括:Further, the controlling the rotation and focusing of the lens fixed focus ring according to the sharpness value of the image includes:
以1°/次的速度旋转所述镜头定焦环,并计算图像清晰度,比较前后两次图像清晰度的值;Rotate the fixed focus ring of the lens at a speed of 1°/time, and calculate the image sharpness, and compare the values of the two image sharpness before and after;
如果图像清晰度逐渐增大,继续旋转所述镜头定焦环;If the image sharpness increases gradually, continue to rotate the fixed focus ring of the lens;
当旋转镜头定焦环计算的图像清晰度开始比上一次的图像清晰度小时,对焦环驱动轮停止旋转,对焦完成。When the image sharpness calculated by rotating the fixed focus ring of the lens starts to be smaller than the previous image sharpness, the drive wheel of the focus ring stops rotating, and the focus is completed.
进一步的,所述图像清晰度使用灰度方差乘积方法计算,公式如下:Further, the image sharpness is calculated using the gray variance product method, and the formula is as follows:
Figure PCTCN2022081182-appb-000001
Figure PCTCN2022081182-appb-000001
其中(m s,n s)表示图像检测区域的起始点,为区域的左上角坐标点;(m e,n e)表示图像检测区域的终止点,为区域的右下角坐标点;x ij表示检测区域中图像像素点的灰度值。 Among them (m s , n s ) represents the starting point of the image detection area, which is the coordinate point of the upper left corner of the area; (m e , n e ) represents the end point of the image detection area, which is the coordinate point of the lower right corner of the area; x ij represents The gray value of the image pixels in the detection area.
本发明的有益效果如下:The beneficial effects of the present invention are as follows:
采用电动机构控制定焦环旋转,无需在安装相机时手动对焦,同时指定区域修改后也可及时调整。The electric mechanism is used to control the rotation of the fixed focus ring, so there is no need to manually focus when installing the camera, and at the same time, it can be adjusted in time after the specified area is modified.
采用评价算法计算对焦后图像清晰度,相比传统主观评价的方式,对焦更为精准。The evaluation algorithm is used to calculate the sharpness of the image after focusing. Compared with the traditional subjective evaluation method, the focus is more accurate.
焦环驱动器采用齿轮组结构,相比其他传动方式,控制角度更为精确,也因此无需回转镜头。The focus ring driver adopts a gear set structure, which can control the angle more precisely than other transmission methods, so there is no need to rotate the lens.
附图说明Description of drawings
图1为本发明的成像对焦系统结构连接图;Fig. 1 is a structural connection diagram of the imaging focusing system of the present invention;
图2为本发明检测区域清晰度计算流程图;Fig. 2 is a flow chart of the calculation of the definition of the detection area of the present invention;
图3为本发明成像对焦控制算法流程图。FIG. 3 is a flow chart of the imaging focus control algorithm of the present invention.
具体实施方式Detailed ways
下面结合附图对本发明作进一步的说明,但不以任何方式对本发明加以限制,基于本发明教导所作的任何变换或替换,均属于本发明的保护范围。The present invention will be further described below in conjunction with the accompanying drawings, but the present invention is not limited in any way. Any transformation or replacement based on the teaching of the present invention belongs to the protection scope of the present invention.
本发明主要针对安装道路上的视频监控相机,在此类相机配置中,检测区域是一个常见配置,主要是用于标定相机需要检测拍摄的区域,因此检测区域图像的清晰度直接影响相机的功能。在相机安装时也会根据检测区域手动对焦,通过主观评价的方式判定是否对焦成功。本发明利用灰度方差乘积(SMD2)算法,计算检测区域清晰度值,以减少主观评价带来的误差。The present invention is mainly aimed at installing video surveillance cameras on the road. In this type of camera configuration, the detection area is a common configuration, which is mainly used to calibrate the area where the camera needs to detect and shoot. Therefore, the clarity of the image in the detection area directly affects the function of the camera. . When the camera is installed, it will also focus manually according to the detection area, and judge whether the focus is successful through subjective evaluation. The present invention utilizes the gray scale variance product (SMD2) algorithm to calculate the definition value of the detection area, so as to reduce the error caused by the subjective evaluation.
在图像处理中,相比于未对焦区域图像,对焦区域图像由于场景内容分割明确,因此像素间差异越大,且在较复杂的场景中,图像越清晰,相邻像素变化幅度越大;图像越模糊,整个图像的灰度分布较平均,相邻像素变化幅度越小。SMD2算法正是利用这一特点,使用灰度方差乘积指标来衡量图像的清晰度,灰度方差乘积的计算公式如下:In image processing, compared with images in unfocused areas, the image in the focused area has a clearer segmentation of the scene content, so the difference between pixels is greater, and in a more complex scene, the clearer the image, the greater the change in adjacent pixels; The more blurred, the more uniform the gray level distribution of the entire image, and the smaller the variation of adjacent pixels. The SMD2 algorithm takes advantage of this feature and uses the gray variance product index to measure the sharpness of the image. The calculation formula of the gray variance product is as follows:
Figure PCTCN2022081182-appb-000002
Figure PCTCN2022081182-appb-000002
其中(m s,n s)表示图像检测区域的起始点,为区域的左上角坐标点;(m e,n e)表示图像检测区域的终止点,为区域的右下角坐标点;x ij表示检测区域中图像像素点的灰度值。在检测区域(m,n)中灰度方差乘积的值越大,表示图像越清晰,图像的质量越好;反之,图像越模糊,质量越差。 Among them (m s , n s ) represents the starting point of the image detection area, which is the coordinate point of the upper left corner of the area; (m e , n e ) represents the end point of the image detection area, which is the coordinate point of the lower right corner of the area; x ij represents The gray value of the image pixels in the detection area. The larger the value of the gray variance product in the detection area (m, n), the clearer the image and the better the quality of the image; otherwise, the blurrier the image, the worse the quality.
本发明在计算图像清晰度值时,首先读取相机中的检测区域配置,设置起 始点(m e,n e)、终止点(m s,n s),然后再读取当前帧检测区域(m,n)图像的灰度值,最后利用SMD2算法输出图像的清晰度值,流程如下图1所示。 When the present invention calculates the image sharpness value, it first reads the detection area configuration in the camera, sets the starting point (m e , n e ), the end point (m s , n s ), and then reads the detection area of the current frame ( m, n) the gray value of the image, and finally use the SMD2 algorithm to output the sharpness value of the image. The process is shown in Figure 1 below.
在清晰度值的基础上本发明可以对对焦系统的调节做出评价,并以此为据控制对焦系统,达到对检测区域清晰对焦的目的。The present invention can evaluate the adjustment of the focus system on the basis of the sharpness value, and control the focus system based on this, so as to achieve the purpose of clearly focusing the detection area.
常见的视频监控相机采用的定焦镜头中一般有两个调节机构:一是光圈调节环,用于调节光圈大小,控制进光量;二是定焦环,用于改变成像最清晰的平面到镜头的距离,也就是说,调节定焦环可以使被摄主体保持清晰。本发明的对焦环驱动器是一个由对焦环驱动轮、电机系统和固定支架组成的结构,物理连接结构如图2所示。There are generally two adjustment mechanisms in the fixed-focus lens used in common video surveillance cameras: one is the aperture adjustment ring, which is used to adjust the size of the aperture and control the amount of light entering; That is to say, adjusting the focus ring can keep the subject clear. The focus ring driver of the present invention is a structure composed of a focus ring drive wheel, a motor system and a fixed bracket, and the physical connection structure is shown in FIG. 2 .
本发明中的对焦环驱动器主要工作原理是控制系统控制电机转动方向以及转动时间,再由电机系统内的传动结构带动对焦环驱动轮转动,对焦环驱动轮与镜头定焦环连接,直接控制镜头定焦环实现镜头的对焦操作。The main working principle of the focus ring driver in the present invention is that the control system controls the rotation direction and rotation time of the motor, and then the transmission structure in the motor system drives the focus ring drive wheel to rotate, and the focus ring drive wheel is connected with the lens fixed focus ring to directly control the lens The focus ring realizes the focus operation of the lens.
本发明中电机系统在工作前先要对系统进行标定,需要依据系统内传动系统的齿比,标定定焦环旋转1°时电机系统需要工作的时间,由此控制定焦环以1°为单位进行旋转调焦。In the present invention, the motor system needs to calibrate the system before working. It is necessary to calibrate the working time of the motor system when the focus ring rotates 1° according to the gear ratio of the transmission system in the system, so as to control the focus ring with 1° as The unit rotates to adjust the focus.
本发明基于SMD2算法以及对焦环驱动器设计了一套对焦环驱动器控制算法。算法首先将对焦环驱动器以及SMD2算法的参数初始化,初始化参数中包括定焦环旋转1°需要对电机通电的时间以及相机监控画面中的指定区域。然后通过1°/次的速度,边旋转定焦环边计算SMD2(m,n),比较前后两次SMD2(m,n)的值。由于指定区域图像一开始处于模糊状态,SMD2(m,n)值较小,在旋转定焦环后,图像慢慢清晰,此时SMD2(m,n)逐渐增大,而当后一次的SMD2(m,n)又小于前一次的SMD2(m,n)时,说明前一次的SMD2(m,n)到达顶点,图像为最清晰的图像,此时对焦环驱动器停止旋转,对焦完成。 算法流程如下图3所示。The present invention designs a set of focus ring driver control algorithms based on the SMD2 algorithm and the focus ring driver. The algorithm first initializes the parameters of the focus ring driver and the SMD2 algorithm. The initialization parameters include the time required to power on the motor when the focus ring rotates 1° and the designated area in the camera monitoring screen. Then calculate SMD2(m,n) while rotating the fixed focus ring at a speed of 1°/time, and compare the values of SMD2(m,n) twice before and after. Since the image of the specified area is in a blurred state at the beginning, the value of SMD2(m,n) is small. After rotating the fixed focus ring, the image gradually becomes clear. At this time, SMD2(m,n) gradually increases, and when the SMD2 When (m,n) is smaller than the previous SMD2(m,n), it means that the previous SMD2(m,n) reaches the apex, and the image is the clearest image. At this time, the focus ring driver stops rotating and the focus is completed. The algorithm flow is shown in Figure 3 below.
算法流程图中SMD2(m,n)’为前一次旋转后指定区域图像的清晰度值,SMD2(m,n)’初始值为一个当前计算精度的最大值,在此算法中被初始化为65535,以此保证算法能进判断流程。且由于镜头存在一定宽容度,一旦SMD2(m,n)越过最值点,对焦环驱动器就不在做下一次转动,并不会回退1°以修正对焦结果。In the algorithm flow chart, SMD2(m,n)' is the sharpness value of the image in the specified area after the previous rotation, and the initial value of SMD2(m,n)' is the maximum value of the current calculation accuracy, which is initialized to 65535 in this algorithm , so as to ensure that the algorithm can enter the judgment process. And because the lens has a certain latitude, once the SMD2(m,n) exceeds the maximum value point, the focus ring driver will not make the next rotation, and will not retreat 1° to correct the focus result.
以一款CCTV_LENS_3MP·HD_12MM_IR的手动定焦镜头为例,当镜头面向我们是,我们将镜头顺时针转到无法转动,此时镜头焦点处于最近处。将镜头安装至相机,安装对焦环驱动器,此时逆时针旋转镜头,镜头焦点由进至远,标出指定区域,按照电机系统齿比标定对焦环驱动器选装速度为2秒/度,即对焦环驱动器每选装1°需要2秒,同时在这2秒完成SMD2(m,n)与SMD2(m,n)’的比对。如果比对结果为SMD2(m,n)<=SMD2(m,n)’,则对焦环驱动器旋转1°并采集图像,更新SMD2(m,n),如果SMD2(m,n)>SMD2(m,n)’则停止转动,完成对焦。Take a CCTV_LENS_3MP·HD_12MM_IR manual fixed-focus lens as an example. When the lens is facing us, we turn the lens clockwise and cannot rotate, and the focus of the lens is at the closest point. Install the lens to the camera, install the focus ring driver, and rotate the lens counterclockwise at this time, the focus of the lens will be from forward to far, mark the designated area, and calibrate the focus ring driver according to the gear ratio of the motor system. The optional speed is 2 seconds/degree, and then focus It takes 2 seconds for every 1° of the ring driver to be installed, and the comparison between SMD2(m,n) and SMD2(m,n)' is completed in these 2 seconds. If the comparison result is SMD2(m,n)<=SMD2(m,n)', the focus ring driver rotates 1° and captures the image, and updates SMD2(m,n), if SMD2(m,n)>SMD2( m, n)' then stop the rotation to complete the focus.
本发明的有益效果如下:The beneficial effects of the present invention are as follows:
采用电动机构控制定焦环旋转,无需在安装相机时手动对焦,同时指定区域修改后也可及时调整。The electric mechanism is used to control the rotation of the fixed focus ring, so there is no need to manually focus when installing the camera, and at the same time, it can be adjusted in time after the specified area is modified.
采用评价算法计算对焦后图像清晰度,相比传统主观评价的方式,对焦更为精准。The evaluation algorithm is used to calculate the sharpness of the image after focusing. Compared with the traditional subjective evaluation method, the focus is more accurate.
焦环驱动器采用齿轮组结构,相比其他传动方式,控制角度更为精确,也因此无需回转镜头。The focus ring driver adopts a gear set structure, which can control the angle more precisely than other transmission methods, so there is no need to rotate the lens.
本文所使用的词语“优选的”意指用作实例、示例或例证。本文描述为“优选的”任意方面或设计不必被解释为比其他方面或设计更有利。相反,词语“优 选的”的使用旨在以具体方式提出概念。如本申请中所使用的术语“或”旨在意指包含的“或”而非排除的“或”。即,除非另外指定或从上下文中清楚,“X使用A或B”意指自然包括排列的任意一个。即,如果X使用A;X使用B;或X使用A和B二者,则“X使用A或B”在前述任一示例中得到满足。As used herein, the word "preferred" means serving as an example, instance or illustration. Any aspect or design described herein as "preferred" is not necessarily to be construed as advantageous over other aspects or designs. Rather, use of the word "preferred" is intended to present concepts in a concrete manner. As used in this application, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or". That is, unless otherwise specified or clear from context, "X employs A or B" is meant to naturally include either of the permutations. That is, if X employs A; X employs B; or X employs both A and B, then "X employs A or B" is satisfied in any of the foregoing instances.
而且,尽管已经相对于一个或实现方式示出并描述了本公开,但是本领域技术人员基于对本说明书和附图的阅读和理解将会想到等价变型和修改。本公开包括所有这样的修改和变型,并且仅由所附权利要求的范围限制。特别地关于由上述组件(例如元件等)执行的各种功能,用于描述这样的组件的术语旨在对应于执行所述组件的指定功能(例如其在功能上是等价的)的任意组件(除非另外指示),即使在结构上与执行本文所示的本公开的示范性实现方式中的功能的公开结构不等同。此外,尽管本公开的特定特征已经相对于若干实现方式中的仅一个被公开,但是这种特征可以与如可以对给定或特定应用而言是期望和有利的其他实现方式的一个或其他特征组合。而且,就术语“包括”、“具有”、“含有”或其变形被用在具体实施方式或权利要求中而言,这样的术语旨在以与术语“包含”相似的方式包括。Moreover, although the disclosure has been shown and described with respect to one or an implementation, equivalent alterations and modifications will occur to others skilled in the art upon the reading and understanding of this specification and the annexed drawings. The present disclosure includes all such modifications and variations and is limited only by the scope of the appended claims. With particular regard to various functions performed by the above-mentioned components (eg, elements, etc.), terms used to describe such components are intended to correspond to any component that performs the specified function of the component (eg, it is functionally equivalent) Even if there are no structural equivalents to the disclosed structures that perform the functions in the exemplary implementations of the present disclosure shown herein (unless otherwise indicated). Furthermore, although a particular feature of the present disclosure has been disclosed with respect to only one of several implementations, such feature may be combined with one or other features of other implementations as may be desirable and advantageous for a given or particular application. combination. Moreover, to the extent the terms "comprises", "has", "comprising" or variations thereof are used in the detailed description or the claims, such terms are intended to be encompassed in a manner similar to the term "comprising".
本发明实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以多个或多个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。上述提到的存储介质可以是只读存储器,磁盘或光盘等。上述的各装置或系统,可以执行相应方法实施例中的存储方法。Each functional unit in the embodiment of the present invention may be integrated into one processing module, or each unit may physically exist separately, or multiple or more of the above units may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the integrated modules are implemented in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, and the like. Each of the above devices or systems may execute the storage method in the corresponding method embodiment.
综上所述,上述实施例为本发明的一种实施方式,但本发明的实施方式 并不受所述实施例的限制,其他的任何背离本发明的精神实质与原理下所做的改变、修饰、代替、组合、简化,均应为等效的置换方式,都包含在本发明的保护范围之内。In summary, the above-mentioned embodiment is an embodiment of the present invention, but the embodiment of the present invention is not limited by the embodiment, any other changes that deviate from the spirit and principle of the present invention, Modifications, substitutions, combinations, and simplifications should all be equivalent replacement methods, and are all included within the protection scope of the present invention.

Claims (5)

  1. 一种指定监控区域的成像对焦系统,其特征在于,包括对焦环驱动轮、镜头定焦环、电机系统和固定支架,所述电机系统包括电机控制系统和电机;所述电机控制系统控制电机转动方向以及转动时间,再由电机内的传动结构带动所述对焦环驱动轮转动,所述对焦环驱动轮与所述镜头定焦环连接,控制镜头定焦环实现镜头的对焦操作。An imaging focusing system for a designated monitoring area is characterized in that it includes a focus ring drive wheel, a lens fixed focus ring, a motor system and a fixed bracket, and the motor system includes a motor control system and a motor; the motor control system controls the rotation of the motor direction and rotation time, and then the transmission structure in the motor drives the focus ring drive wheel to rotate, and the focus ring drive wheel is connected with the lens fixed focus ring to control the lens focus ring to realize the focusing operation of the lens.
  2. 根据权利要求1所述的指定监控区域的成像对焦系统,其特征在于,所述对焦环驱动轮的齿比使得所述镜头定焦环以1°为单位进行旋转调焦。The imaging focusing system for a designated monitoring area according to claim 1, wherein the gear ratio of the driving wheel of the focusing ring enables the focusing ring of the lens to rotate and focus in units of 1°.
  3. 根据权利要求1所述的指定监控区域的成像对焦系统,其特征在于,电机控制系统读取相机中的检测区域配置,设置起始点、终止点,再读取当前帧检测区域图像的灰度值,计算图像的清晰度值,并根据图像的清晰度值控制所述镜头定焦环旋转调焦。The imaging focusing system for a specified monitoring area according to claim 1, wherein the motor control system reads the configuration of the detection area in the camera, sets the starting point and the end point, and then reads the gray value of the current frame detection area image , calculate the sharpness value of the image, and control the rotation and focus of the fixed focus ring of the lens according to the sharpness value of the image.
  4. 根据权利要求1所述的指定监控区域的成像对焦系统,其特征在于,所述根据图像的清晰度值控制所述镜头定焦环旋转调焦包括:The imaging focusing system for a designated monitoring area according to claim 1, wherein the controlling the rotation and focusing of the lens fixed focus ring according to the sharpness value of the image comprises:
    以1°/次的速度旋转所述镜头定焦环,并计算图像清晰度,比较前后两次图像清晰度的值;Rotate the fixed focus ring of the lens at a speed of 1°/time, and calculate the image sharpness, and compare the values of the two image sharpness before and after;
    如果图像清晰度逐渐增大,继续旋转所述镜头定焦环;If the image sharpness increases gradually, continue to rotate the fixed focus ring of the lens;
    当旋转镜头定焦环计算的图像清晰度开始比上一次的图像清晰度小时,对焦环驱动轮停止旋转,对焦完成。When the image sharpness calculated by rotating the fixed focus ring of the lens starts to be smaller than the previous image sharpness, the drive wheel of the focus ring stops rotating, and the focus is completed.
  5. 根据权利要求3所述的指定监控区域的成像对焦系统,其特征在于,所述图像清晰度使用灰度方差乘积方法计算,公式如下:The imaging focusing system for a designated monitoring area according to claim 3, wherein the image sharpness is calculated using a gray scale variance product method, and the formula is as follows:
    Figure PCTCN2022081182-appb-100001
    Figure PCTCN2022081182-appb-100001
    其中(m s,n s)表示图像检测区域的起始点,为区域的左上角坐标点;(m e,n e)表示图像检测区域的终止点,为区域的右下角坐标点;x ij表示检测区 域中图像像素点的灰度值。 Among them (m s , n s ) represents the starting point of the image detection area, which is the coordinate point of the upper left corner of the area; (m e , n e ) represents the end point of the image detection area, which is the coordinate point of the lower right corner of the area; x ij represents The gray value of the image pixels in the detection area.
PCT/CN2022/081182 2021-12-06 2022-03-16 Imaging focusing system for specified monitoring area WO2023103207A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111479283.9A CN114422660A (en) 2021-12-06 2021-12-06 Imaging focusing system of designated monitoring area
CN202111479283.9 2021-12-06

Publications (1)

Publication Number Publication Date
WO2023103207A1 true WO2023103207A1 (en) 2023-06-15

Family

ID=81265572

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/081182 WO2023103207A1 (en) 2021-12-06 2022-03-16 Imaging focusing system for specified monitoring area

Country Status (2)

Country Link
CN (1) CN114422660A (en)
WO (1) WO2023103207A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116295090B (en) * 2022-12-20 2024-03-12 深圳市前海公共安全科学研究院有限公司 Safety detector for fire-fighting electric facilities

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01164710A (en) * 1987-12-21 1989-06-28 Inax Corp Method for stabilizing aluminum nitride powder
JP2003121721A (en) * 2001-10-18 2003-04-23 Canon Inc Imaging device and its focusing control method, and program
CN101814129A (en) * 2009-02-19 2010-08-25 中国科学院自动化研究所 Automatically focused remote iris image acquisition device, method and recognition system
CN105136292A (en) * 2015-05-06 2015-12-09 中北大学 Aberration compensation method based on AOTF multispectral imaging system
CN108521544A (en) * 2018-03-15 2018-09-11 深圳市瀚晖威视科技有限公司 The focus method and device of video monitoring
CN112601015A (en) * 2020-12-10 2021-04-02 烟台艾睿光电科技有限公司 Automatic focusing method and automatic focusing system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106899838A (en) * 2017-03-01 2017-06-27 成都市极米科技有限公司 A kind of focusing method and system
CN206930878U (en) * 2017-07-12 2018-01-26 凌云光技术集团有限责任公司 A kind of automatic focusing mechanism and camera
CN110428463B (en) * 2019-06-04 2021-09-14 浙江大学 Method for automatically extracting center of image in out-of-focus fuzzy centering of aspheric optical element
CN112114320A (en) * 2020-08-31 2020-12-22 金钱猫科技股份有限公司 Measuring method and device based on image algorithm

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01164710A (en) * 1987-12-21 1989-06-28 Inax Corp Method for stabilizing aluminum nitride powder
JP2003121721A (en) * 2001-10-18 2003-04-23 Canon Inc Imaging device and its focusing control method, and program
CN101814129A (en) * 2009-02-19 2010-08-25 中国科学院自动化研究所 Automatically focused remote iris image acquisition device, method and recognition system
CN105136292A (en) * 2015-05-06 2015-12-09 中北大学 Aberration compensation method based on AOTF multispectral imaging system
CN108521544A (en) * 2018-03-15 2018-09-11 深圳市瀚晖威视科技有限公司 The focus method and device of video monitoring
CN112601015A (en) * 2020-12-10 2021-04-02 烟台艾睿光电科技有限公司 Automatic focusing method and automatic focusing system

Also Published As

Publication number Publication date
CN114422660A (en) 2022-04-29

Similar Documents

Publication Publication Date Title
CN109451244B (en) Automatic focusing method and system based on liquid lens
WO2018201809A1 (en) Double cameras-based image processing device and method
US7831138B2 (en) Focus adjusting method and focus adjusting device
TWI432870B (en) Image processing system and automatic focusing method
US7801432B2 (en) Imaging apparatus and method for controlling the same
US8466989B2 (en) Camera having image correction function, apparatus and image correction method
TWI471630B (en) Auto-focus system and method of a digital camera
US20050206773A1 (en) Optical tracking system using variable focal length lens
US8872961B2 (en) Focusing image verifying device
US20120057034A1 (en) Imaging system and pixel signal readout method
WO2022028082A1 (en) Idle stroke calibration method and apparatus, automatic focusing method and apparatus, and storage medium
US20220180484A1 (en) Image processing method, electronic device, and computer-readable storage medium
WO2022057800A1 (en) Gimbal camera, gimbal camera tracking control method and apparatus, and device
WO2020088518A1 (en) Image outputting method and camera
US20240114245A1 (en) Imaging support device, imaging support system, imaging system, imaging support method, and program
WO2023103207A1 (en) Imaging focusing system for specified monitoring area
CN102314043A (en) Auxiliary focusing method for human face block
JP4334784B2 (en) Autofocus device and imaging device using the same
KR102473142B1 (en) Fast zoom and focusing apparatus predicting for high-speed tracking and predicting moving object for camera for providing a high-quality image seamlessly and method for high-speed tracking and predicting moving object for camera using the same
CN117097872A (en) Automatic trapezoid correction system and method for projection equipment
US8582016B2 (en) Photographing apparatus and focus detecting method using the same
JP7254562B2 (en) Imaging device and its control device
WO2022022682A1 (en) Photographing module apparatus, multi-camera photographing module, photographing system, electronic device, and auto-zoom imaging method
JP4865275B2 (en) Focus detection apparatus and imaging apparatus
TWI395473B (en) Automatic focusing system and method under low-illumination