CN107664805B - Correction method for focusing preset position - Google Patents
Correction method for focusing preset position Download PDFInfo
- Publication number
- CN107664805B CN107664805B CN201710984305.4A CN201710984305A CN107664805B CN 107664805 B CN107664805 B CN 107664805B CN 201710984305 A CN201710984305 A CN 201710984305A CN 107664805 B CN107664805 B CN 107664805B
- Authority
- CN
- China
- Prior art keywords
- preset
- focusing
- called
- bit
- far
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G02—OPTICS
- G02B—OPTICAL ELEMENTS, SYSTEMS OR APPARATUS
- G02B7/00—Mountings, adjusting means, or light-tight connections, for optical elements
- G02B7/02—Mountings, adjusting means, or light-tight connections, for optical elements for lenses
- G02B7/04—Mountings, adjusting means, or light-tight connections, for optical elements for lenses with mechanism for focusing or varying magnification
Abstract
The invention discloses a method for correcting a focusing preset position, which is characterized in that a setting flag bit is set to indicate the direction of the preset position, the direction of the preset position and the direction of a focusing position are compared, return clearance supplement is carried out or the preset position is directly called, the deviation of the focusing preset position caused by the return clearance of a lens and the like can be effectively eliminated, and the problem of the deviation of the preset position is solved. And meanwhile, a threshold value and a compensation value are set, so that the focusing position is more accurate.
Description
Technical Field
The invention relates to a method for correcting a focusing preset position, which can be used for visible light and thermal imaging lenses with an electric focusing function and similar products and can eliminate the problem of the deviation of the focusing preset position caused by return gaps of the lenses and the like.
Background
With the further development of security technology, the characteristics of intellectualization and unattended operation become one of the trends of the development of a monitoring system, a monitor is used as a front-end device and plays a role in playing a role in the monitoring system, more intellectualization and automation functions need to be realized by being matched with background software, and the realization of the intellectualization functions depends on clear image pictures at first, and especially high-definition products have higher requirements on the accuracy of the focusing position of a lens. However, in practical applications, the lens usually has a return gap, i.e. a preset position of focus sharpness is set in one direction, and the focus sharpness is reduced when called from the other direction.
Disclosure of Invention
The invention aims to provide a method for correcting a focusing preset position, which solves the problem of the deviation of the focusing preset position caused by the return clearance of a lens and the like.
In order to solve the technical problem, the technical scheme adopted by the invention is as follows: a method of rectifying focus preset bits, comprising the steps of: s01), setting a flag bit to indicate the direction when setting the preset bit, setting the preset bit from near to far and from far to near, and adopting different flag bits to indicate the two directions; s02), when calling the preset position, judge that the direction of calling the preset position at present is the same with the direction when being called the preset position setting, if same, then directly call this preset position, adjust focusing position to preset position can, if different, then adjust focusing position to with the same direction of being called the preset position earlier, then call the preset position again, adjust focusing position to the preset position.
Further, when the focusing position is adjusted to the same direction as the called preset position, a threshold value with the size being 2-3 times of the focusing gap of the used lens is set, the threshold value is the size of a stroke of the focusing position adjusted to the same direction side as the called preset position, and then the focusing position is adjusted to the same direction as the called preset position according to the threshold value.
Further, a flag bit 1 indicates a preset bit in the near-to-far direction, and a flag bit 0 indicates a preset bit in the far-to-near direction.
Furthermore, when the presetting bit is called, a compensation value is set, the compensation value is 0.2-0.3 times of the numerical value of the called presetting bit, and the focusing position is adjusted to the position of the presetting bit according to the sum or the difference of the presetting bit and the compensation value.
Further, when the preset position is called, if the preset position is in a direction from near to far, the direction of the current focusing position is judged below, and if the current position is in the near side, namely the focusing position is adjusted from the near to far direction, and the focusing direction of the focusing position is the same as the direction when the preset position is set, the preset position is called directly, and the focusing position is adjusted to the preset position; if the current position is on the far side, the focusing position is adjusted to the near side, then whether the focusing position really reaches the near side is judged, if yes, the preset position is called, and if not, the focusing position is continuously adjusted to the near side and whether the focusing position really reaches is judged.
Further, when the preset bit is called, if the preset bit is in the direction from far to near, the current position is judged to be far, and if the preset bit is in the far side, the preset bit is directly called; if not, the focusing position is adjusted to the far side, then whether the focusing position actually reaches the far side is judged, if yes, the preset bit is called, and if not, the focusing position is continuously adjusted to the far side and whether the focusing position actually reaches is judged.
The invention has the beneficial effects that: the invention sets the flag bit to indicate the direction when the preset bit is set, compares the direction when the preset bit is set with the direction of the focusing position, supplements the return clearance or directly calls the preset bit, can effectively eliminate the deviation of the focusing preset bit caused by the return clearance of the lens and the like, and solves the problem of the deviation of the preset bit. And meanwhile, a threshold value and a compensation value are set, so that the focusing position is more accurate.
Drawings
FIG. 1 is a flow chart of example 1.
Detailed Description
The invention is further described with reference to the following figures and specific embodiments.
A method of correcting a focus preset position, comprising the steps of: s01), setting a flag bit to indicate the direction when setting the preset bit, setting the preset bit from near to far and from far to near, and adopting different flag bits to indicate the two directions; s02), when the preset position is called, judging whether the direction of the current calling preset position is the same as the direction when the called preset position is set, if so, directly calling the preset position, and adjusting the focusing position to the preset position; when the focusing position is adjusted to the same direction as the called preset position, firstly, a threshold value which is 2-3 times of the focusing gap of the used lens is set, the threshold value is the stroke size of the focusing position adjusted to the side of the same direction as the called preset position, and then the focusing position is adjusted to the position of the same direction as the called preset position according to the threshold value.
In this embodiment, the flag bit 1 represents a preset bit in the near-to-far direction, and the flag bit 0 represents a preset bit in the far-to-near direction.
In order to make the preset position more ready, when calling the preset position, a compensation value is set, the compensation value is 0.2-0.3 times of the numerical value of the called preset position, and the focusing position is adjusted to the preset position according to the sum or difference of the preset position and the compensation value.
Example 1
In this embodiment, the method for correcting the focus preset position is applied to a lens of a thermal imager, and a potentiometer is used to collect the position of the lens, as shown in fig. 1, the specific steps of this embodiment are as follows:
s01), setting a flag bit to indicate the direction when setting the preset bit, and setting the preset bit from near to far (near to far) and from far to near (far to near), wherein 1 is used for indicating the preset bit from near to far, and 0 is used for indicating the preset bit from far to near;
s02), when calling the preset position, judging whether the preset position to be called is in a near to far direction (referred to as far direction in the figure), if so, judging the direction of the current focusing position, if the current position is at the near side, namely the focusing position is adjusted from near to far direction, and the focusing direction of the focusing position is the same as the direction when the preset position is set, directly calling the preset position, and adjusting the focusing position to the preset position; if the current position is on far side, the focusing position is adjusted to near side first, then whether the focusing position really reaches near side is judged, if yes, the preset position is called, if not, the focusing position is continuously adjusted to near side and whether the focusing position really reaches is judged;
s03), similarly, if the preset position is in the far to near direction (called near direction for short in the figure), judging that the current positions are all on the far side, and if the preset position is on the far side, calling the preset position from the far to near direction; if not, the focusing position is adjusted to the far side, then whether the focusing position really reaches the far side is judged, if so, the preset bit is called, and if not, the focusing position is continuously adjusted to the far side and whether the focusing position really reaches is judged.
In this embodiment, the process of adjusting the focusing position to the near side or far side is as follows: firstly, setting a threshold value with the size 2-3 times of the focusing gap of the used lens, wherein the threshold value is the stroke size of the focusing position adjusted to the side in the same direction as the called preset position, and then adjusting the focusing position to the near side or far side according to the threshold value (stroke size).
In this embodiment, in order to make the preset position more ready, when calling the preset position, set up a compensation value, this compensation value is 0.2~0.3 times of the preset position numerical value size called, according to actual conditions, with the sum or the difference of preset position and compensation value for the camera lens stroke size with focusing position adjustment to the preset position.
The foregoing description is only for the basic principle and the preferred embodiments of the present invention, and modifications and substitutions by those skilled in the art are included in the scope of the present invention.
Claims (4)
1. A method for correcting a focus preset position is characterized by comprising the following steps: the method comprises the following steps: s01), setting a flag bit to indicate the direction when setting the preset bit, setting the preset bit from near to far and from far to near, and adopting different flag bits to indicate the two directions; s02), when the preset position is called, judging whether the direction of the current focusing position is the same as that of the called preset position, if so, directly calling the preset position, and adjusting the focusing position to the preset position, if not, firstly adjusting the focusing position to the same direction as that of the called preset position, then calling the preset position, and adjusting the focusing position to the preset position;
when the focusing position is adjusted to the same direction as the called preset position, firstly setting a threshold value which is 2-3 times of the focusing gap of the used lens, wherein the threshold value is the stroke size of the focusing position adjusted to the side in the same direction as the called preset position, and then adjusting the focusing position to the position in the same direction as the called preset position according to the threshold value;
when the presetting bit is called, a compensation value is set, the compensation value is 0.2-0.3 times of the numerical value of the called presetting bit, and the focusing position is adjusted to the position of the presetting bit according to the sum or difference of the presetting bit and the compensation value.
2. The method of claim 1, wherein the method further comprises: the flag bit 1 indicates a preset bit in the near-to-far direction, and the flag bit 0 indicates a preset bit in the far-to-near direction.
3. The method of claim 1, wherein the method further comprises: when the preset position is called, if the preset position is in a direction from near to far, the direction of the current focusing position is judged below, if the current position is in the near side, namely the focusing position is adjusted from the near to far direction, and the focusing direction of the focusing position is the same as the direction when the preset position is set, the preset position is directly called, and the focusing position is adjusted to the preset position; if the current position is on the far side, the focusing position is adjusted to the near side, then whether the focusing position really reaches the near side is judged, if yes, the preset position is called, and if not, the focusing position is continuously adjusted to the near side and whether the focusing position really reaches is judged.
4. The method of claim 1, wherein the method further comprises: when the preset bit is called, if the preset bit is in the direction from far to near, the current position is judged to be far side, and if the preset bit is in the far side, the preset bit is directly called; if not, the focusing position is adjusted to the far side, then whether the focusing position actually reaches the far side is judged, if yes, the preset bit is called, and if not, the focusing position is continuously adjusted to the far side and whether the focusing position actually reaches is judged.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710984305.4A CN107664805B (en) | 2017-10-20 | 2017-10-20 | Correction method for focusing preset position |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710984305.4A CN107664805B (en) | 2017-10-20 | 2017-10-20 | Correction method for focusing preset position |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107664805A CN107664805A (en) | 2018-02-06 |
CN107664805B true CN107664805B (en) | 2020-10-16 |
Family
ID=61097604
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710984305.4A Active CN107664805B (en) | 2017-10-20 | 2017-10-20 | Correction method for focusing preset position |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107664805B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110753172B (en) * | 2019-10-22 | 2022-02-15 | Oppo广东移动通信有限公司 | Correction method and device, electronic equipment and voice coil motor |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103901704A (en) * | 2014-03-21 | 2014-07-02 | 天津市亚安科技股份有限公司 | Pan-tilt and presetting bit recall control method of pan-tilt |
CN104079883A (en) * | 2014-07-07 | 2014-10-01 | 山东神戎电子股份有限公司 | Laser night-vision device illuminator presetting bit implementation method based on stepping motor |
CN106657790A (en) * | 2016-12-30 | 2017-05-10 | 山东神戎电子股份有限公司 | Laser night-vision device with preset position compensation function and preset position compensation method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20150115455A (en) * | 2014-04-04 | 2015-10-14 | 삼성전자주식회사 | Method and apparatus for controlling projector focus in portable device |
-
2017
- 2017-10-20 CN CN201710984305.4A patent/CN107664805B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103901704A (en) * | 2014-03-21 | 2014-07-02 | 天津市亚安科技股份有限公司 | Pan-tilt and presetting bit recall control method of pan-tilt |
CN104079883A (en) * | 2014-07-07 | 2014-10-01 | 山东神戎电子股份有限公司 | Laser night-vision device illuminator presetting bit implementation method based on stepping motor |
CN106657790A (en) * | 2016-12-30 | 2017-05-10 | 山东神戎电子股份有限公司 | Laser night-vision device with preset position compensation function and preset position compensation method |
Also Published As
Publication number | Publication date |
---|---|
CN107664805A (en) | 2018-02-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8149280B2 (en) | Face detection image processing device, camera device, image processing method, and program | |
US10021307B2 (en) | Processing apparatus for camera shake correction | |
US20170132820A1 (en) | Method and system for mitigating color mutation in image fusion | |
EP3328065B1 (en) | Dual-camera focusing method and apparatus, and terminal device | |
US10393996B2 (en) | Image processing apparatus, image pickup apparatus, image processing method, and storage medium | |
US10171739B2 (en) | Image pickup device | |
JP2009020190A (en) | Focus regulator, imaging device, and control method therefor | |
US20100238342A1 (en) | Method, an apparatus and a computer readable storage medium for controlling an assist light during image capturing process | |
US20190347776A1 (en) | Image processing method and image processing device | |
US20180077336A1 (en) | Image capturing apparatus | |
US10681277B1 (en) | Translation compensation in optical image stabilization (OIS) | |
CN107664805B (en) | Correction method for focusing preset position | |
JP2014209671A (en) | Imaging device and imaging method | |
US20140071302A1 (en) | Processing apparatus, processing method, and program | |
CN102238328A (en) | Method of automatically calibrating a visual parameter for an imaging device | |
WO2012026502A1 (en) | Stereography device and stereography method | |
CN106791411B (en) | Lens focusing method | |
US20210120182A1 (en) | Lens control apparatus, optical apparatus, and lens control method | |
US20150168809A1 (en) | Focus control apparatus and focus control method | |
US10475162B2 (en) | Image processing device, method, and storage medium for gamma correction based on illuminance | |
CN109862332B (en) | Method, apparatus and system for detecting and reducing color fringing effects | |
US20200045215A1 (en) | Control apparatus, imaging apparatus, and storage medium | |
US20200186716A1 (en) | Imaging device and method for correcting shake of captured image | |
EP2509302A2 (en) | Image processing apparatus, image processing method, and computer program | |
US11809017B2 (en) | Focus control device, lens apparatus, imaging apparatus, and control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | 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 |