CN106231171B - A kind of quick focusing method for video camera - Google Patents

A kind of quick focusing method for video camera Download PDF

Info

Publication number
CN106231171B
CN106231171B CN201511035222.8A CN201511035222A CN106231171B CN 106231171 B CN106231171 B CN 106231171B CN 201511035222 A CN201511035222 A CN 201511035222A CN 106231171 B CN106231171 B CN 106231171B
Authority
CN
China
Prior art keywords
focal position
clarity
focusing
value
maximum value
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201511035222.8A
Other languages
Chinese (zh)
Other versions
CN106231171A (en
Inventor
戴林
石行
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TIANJIN TIANDI WEIYE THINGS TECHNOLOGY CO LTD
Original Assignee
TIANJIN TIANDI WEIYE THINGS TECHNOLOGY CO LTD
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 TIANJIN TIANDI WEIYE THINGS TECHNOLOGY CO LTD filed Critical TIANJIN TIANDI WEIYE THINGS TECHNOLOGY CO LTD
Priority to CN201511035222.8A priority Critical patent/CN106231171B/en
Publication of CN106231171A publication Critical patent/CN106231171A/en
Application granted granted Critical
Publication of CN106231171B publication Critical patent/CN106231171B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Automatic Focus Adjustment (AREA)
  • Focusing (AREA)

Abstract

The present invention provides a kind of quick focusing methods for video camera, include the following steps: S1: changing focal position, it is recorded in focusing simultaneously, clarity maximum value and its place focal position, clarity minimum value and its place focal position, current definition values and its place focal position;S2: compare the difference of clarity maxima and minima;S3: compare the difference of clarity maximum value and current value;S4: focal position where comparing clarity maximum value judges whether among focusing where clear minimum value and present convergence location;S5: while when meeting S2, S3, S4, it can determine the clearest point of image at the clarity maximum value of focusing.Quick focusing method of the present invention improves focusing speed on the basis of guaranteeing focusing accuracy.

Description

A kind of quick focusing method for video camera
Technical field
The invention belongs to technical field of video monitoring, more particularly, to a kind of quick focusing method for video camera.
Background technique
In video monitoring, how video camera can be realized according to monitoring emphasis adjustment monitoring position and camera lens zoom size It quickly focuses and directly influences video effect and supervisory function bit.
Now widely used focus method is all based on hill-climbing algorithm, and the optimization done on its basis.Although mesh Before the algorithm that is widely present all promoting focusing speed as far as possible, but hill-climbing algorithm the shortcomings that there are apparent poor anti jamming capabilities, Especially under darker scene, noise can largely influence the Exact Travelling focused, therefore focusing speed and accuracy can not It gets both.
Summary of the invention
In view of this, the present invention is directed to propose a kind of quick focusing method for video camera, accurate to focus in guarantee Focusing speed is improved on the basis of property.
In order to achieve the above objectives, the technical scheme of the present invention is realized as follows:
A kind of quick focusing method for video camera, includes the following steps:
S1: changing focal position, while being recorded in focusing, clarity maximum value and its place focal position, clear Clear degree minimum value and its place focal position, current definition values and its place focal position;
S2: comparing the difference of clarity maxima and minima, no into comparing in next step when meeting the threshold value of setting Then continue to change focal position;
S3: comparing the difference of clarity maximum value and current value, no into comparing in next step when meeting the threshold value of setting Then continue to change focal position;
S4: focal position where comparing clarity maximum value, judge whether to focus where clear minimum value with it is current Among focal position, if meeting condition, into next step, otherwise continue to change focal position;
S5: while when meeting S2, S3, S4, can determine the clearest point of image at the clarity maximum value of focusing, It is not required to be further continued for adjusting focal position.
Further, described image sharpness evaluation function is Brenner function.
Further, the clarity of image is analyzed, determines that the current clarity of described image includes: extraction image In each pixel boundary information;The boundary information of each pixel of the correspondence of described image is subjected to summation operation;According to operation As a result clarity maximum value, clarity minimum value and the current definition values of described image are determined.
Further, it after step S4, that is, determines and focuses at clearest point, add and subtract the range of a step-length in its vicinity It is interior, fine search is carried out, focusing correctness is further increased.
Compared with the existing technology, a kind of quick focusing method for video camera of the present invention has the advantage that
Focus method of the present invention need to only save three quantity of states in focusing, without consuming more memories Data are accessed, data statistics and calculation amount are reduced;Without covering gamut, meets condition i.e. and can determine peak value position, Improve focusing speed;Only general trend is judged in focusing, is had ignored the variation between consecutive points, is eliminated noise and ghost peak Interference, improve focusing success rate.
Detailed description of the invention
The attached drawing for constituting a part of the invention is used to provide further understanding of the present invention, schematic reality of the invention It applies example and its explanation is used to explain the present invention, do not constitute improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is focus method flow diagram described in the embodiment of the present invention.
Specific embodiment
It should be noted that in the absence of conflict, the feature in embodiment and embodiment in the present invention can phase Mutually combination.
In the description of the present invention, it is to be understood that, term " center ", " longitudinal direction ", " transverse direction ", "upper", "lower", The orientation or positional relationship of the instructions such as "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outside" is It is based on the orientation or positional relationship shown in the drawings, is merely for convenience of description of the present invention and simplification of the description, rather than instruction or dark Show that signified device or element must have a particular orientation, be constructed and operated in a specific orientation, therefore should not be understood as pair Limitation of the invention.In addition, term " first ", " second " etc. are used for description purposes only, it is not understood to indicate or imply phase To importance or implicitly indicate the quantity of indicated technical characteristic.The feature for defining " first ", " second " etc. as a result, can To explicitly or implicitly include one or more of the features.In the description of the present invention, unless otherwise indicated, " multiple " It is meant that two or more.
In the description of the present invention, it should be noted that unless otherwise clearly defined and limited, term " installation ", " phase Even ", " connection " shall be understood in a broad sense, for example, it may be being fixedly connected, may be a detachable connection, or be integrally connected;It can To be mechanical connection, it is also possible to be electrically connected;It can be directly connected, can also can be indirectly connected through an intermediary Connection inside two elements.For the ordinary skill in the art, above-mentioned term can be understood by concrete condition Concrete meaning in the present invention.
The present invention will be described in detail below with reference to the accompanying drawings and embodiments.
As shown in Figure 1, the quick focusing method according to an embodiment of the present invention for monitor camera includes:
S1: at the beginning of focusing, first start to change focal position to a direction, while recording in focusing The maximum value Vmax of clarity, the minimum value Vmin and clarity current value Vnow of clarity and corresponding focusing position Set Pmax, Pmin, Pnow;
S2: in comparison procedure, the difference of clarity maximum value Vmax and clarity minimum value Vmin is calculated, Vmax- is worked as Vmin is greater than given threshold Thresh1, represents the requirement for meeting real peak, enters step S3, otherwise return step S1 continues to change Focal position;
S3: in comparison procedure, the difference of clarity maximum value Vmax and current definition values Vnow is calculated, Vmax- is worked as Vnow is greater than given threshold Thresh2, represents across peak value, enters step S4, and otherwise return step S1 continues to change poly- Burnt position;
S4: in comparison procedure, judge whether the focal position Pmax of clarity maximum value is in clarity minimum value institute Among focal position Pmin and present convergence location Pnow, if meeting condition, indicate at left and right sides of peak value to gather to reach Burnt clearest point just at peak value, otherwise indicates peak value side of only passing by, not can determine that peak value position, need reversely to change Focal position, then return step S1 continues to change focal position;
As optimization, threshold value Thresh1 and threshold value Thresh2 can link with image gain, and gain is bigger, and threshold value is higher, Gain is smaller, and threshold value is smaller, can improve focusing accuracy while excluding the interference of noise and ghost peak in this way, subtract simultaneously Few focal time.
As optimization, when the condition for being unsatisfactory for being mentioned in step S2, with big step-length fast search, accelerate search speed.
As optimization, it can determine and focus at clearest point after step S4, add and subtract the range of a step-length in its vicinity It is interior, fine search is carried out, focusing correctness is further increased.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention Within mind and principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (4)

1. a kind of quick focusing method for video camera, which comprises the steps of:
S1: at the beginning of focusing, first start to change focal position to a direction, while being recorded in focusing, clearly Clear degree maximum value and its place focal position, clarity minimum value and its place focal position, current definition values and its place Focal position;
S2: comparing the difference of clarity maxima and minima, when meet setting threshold value when, into comparing in next step, otherwise after It is continuous to change focal position;
S3: comparing the difference of clarity maximum value and current value, when meet setting threshold value when, into comparing in next step, otherwise after It is continuous to change focal position;
S4: focal position where comparing clarity maximum value judges whether focusing and present convergence where clear minimum value Among position, if meeting condition, into next step, otherwise needs reversely to change focal position, then return to S1 and continue to change Focal position;
S5: while when meeting S2, S3, S4, it can determine that the clearest point of image at the clarity maximum value of focusing, is not required to It is further continued for adjusting focal position.
2. a kind of quick focusing method for video camera according to claim 1, it is characterised in that: image definition is commented Valence function is Brenner function.
3. a kind of quick focusing method for video camera according to claim 1, it is characterised in that: to the clear of image Degree is analyzed, and determines that the current clarity of described image includes: to extract the boundary information of each pixel in image;By the figure The boundary information of each pixel of the correspondence of picture carries out summation operation;Determine that the clarity of described image is maximum according to operation result Value, clarity minimum value and current definition values.
4. a kind of quick focusing method for video camera according to claim 1, it is characterised in that: after step S4, It determines and focuses at clearest point, in the range of adding and subtracting a step-length in its vicinity, carry out fine search, further increase focusing Correctness.
CN201511035222.8A 2015-12-31 2015-12-31 A kind of quick focusing method for video camera Active CN106231171B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201511035222.8A CN106231171B (en) 2015-12-31 2015-12-31 A kind of quick focusing method for video camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201511035222.8A CN106231171B (en) 2015-12-31 2015-12-31 A kind of quick focusing method for video camera

Publications (2)

Publication Number Publication Date
CN106231171A CN106231171A (en) 2016-12-14
CN106231171B true CN106231171B (en) 2019-08-20

Family

ID=57528734

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201511035222.8A Active CN106231171B (en) 2015-12-31 2015-12-31 A kind of quick focusing method for video camera

Country Status (1)

Country Link
CN (1) CN106231171B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106791432A (en) * 2017-01-18 2017-05-31 深圳竹信科技有限公司 A kind of focal length determines method and device
CN111711759B (en) * 2020-06-29 2022-02-01 重庆紫光华山智安科技有限公司 Focusing method, device, storage medium and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0421243A2 (en) * 1989-09-29 1991-04-10 Sanyo Electric Co., Ltd. Automatic focusing camera
CN1065341A (en) * 1991-02-19 1992-10-14 利诺泰普-赫尔有限公司 The focus adjustment method of optical image system and device
CN101071251A (en) * 2006-05-11 2007-11-14 致伸科技股份有限公司 Method for estimating automatic focusing least effective sampling points
CN101494737A (en) * 2009-03-09 2009-07-29 杭州海康威视数字技术股份有限公司 Integrated camera device and self-adapting automatic focus method
CN102053339A (en) * 2010-11-23 2011-05-11 天津市亚安科技电子有限公司 Automatic focusing method
CN102520503A (en) * 2011-12-27 2012-06-27 杭州恒胜电子科技有限公司 Method for quickly focusing high-definition image acquisition equipment
CN103513395A (en) * 2012-06-15 2014-01-15 中兴通讯股份有限公司 Passive auto-focusing method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0421243A2 (en) * 1989-09-29 1991-04-10 Sanyo Electric Co., Ltd. Automatic focusing camera
CN1065341A (en) * 1991-02-19 1992-10-14 利诺泰普-赫尔有限公司 The focus adjustment method of optical image system and device
CN101071251A (en) * 2006-05-11 2007-11-14 致伸科技股份有限公司 Method for estimating automatic focusing least effective sampling points
CN101494737A (en) * 2009-03-09 2009-07-29 杭州海康威视数字技术股份有限公司 Integrated camera device and self-adapting automatic focus method
CN102053339A (en) * 2010-11-23 2011-05-11 天津市亚安科技电子有限公司 Automatic focusing method
CN102520503A (en) * 2011-12-27 2012-06-27 杭州恒胜电子科技有限公司 Method for quickly focusing high-definition image acquisition equipment
CN103513395A (en) * 2012-06-15 2014-01-15 中兴通讯股份有限公司 Passive auto-focusing method and device

Also Published As

Publication number Publication date
CN106231171A (en) 2016-12-14

Similar Documents

Publication Publication Date Title
CN103464869B (en) The rotating the arc narrow gap MAG welding line deviation recognition device of view-based access control model sensing and method
US11343432B2 (en) Imaging apparatus
CN102843513B (en) The camera apparatus and method of target are recognized by using camera
US8164682B2 (en) Dithered focus evaluation
US8970672B2 (en) Three-dimensional image processing
CN101272511B (en) Method and device for acquiring image depth information and image pixel information
EP2613518B1 (en) Video signal processing apparatus
CN105391945B (en) Camera autofocus control method and device
US10395348B2 (en) Image pickup apparatus, image processing apparatus, and control method of image pickup apparatus
KR102228456B1 (en) Image pickup apparatus and image pickup method of generating image having depth information
CN104070264B (en) The narrow gap MAG of rotating the arc becoming groove width welds self adaptation pendulous device and method
CN103248812A (en) Image signal processing apparatus and image signal processing method
CN103095983A (en) Image signal processing device
CN106231171B (en) A kind of quick focusing method for video camera
CN106506946B (en) A kind of camera automatic focusing method and video camera
CN105611158A (en) Automatic focus following method and device and user equipment
CN106973199B (en) Multi-aperture camera system for improving depth accuracy by using focusing distance scanning
CN106772925A (en) A kind of passive camera automatic focusing method based on inner product energy
CN103529544A (en) Nano membrane thickness measuring instrument capable of automatically positioning and focusing
CN110749974B (en) Automatic focusing method of full-glass-slide imaging scanner and image acquisition method thereof
KR102477757B1 (en) Automatic focus system and method
JP2014215476A (en) Imaging apparatus and method for controlling the same
CN105022138B (en) Use the autofocus system and its method of more camera lenses
KR20070040547A (en) Method and apparatus for auto-focusing for camera
KR102422125B1 (en) Auto focusing method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant