CN111435988A - Camera automatic focusing detection method and device - Google Patents

Camera automatic focusing detection method and device Download PDF

Info

Publication number
CN111435988A
CN111435988A CN201910037121.6A CN201910037121A CN111435988A CN 111435988 A CN111435988 A CN 111435988A CN 201910037121 A CN201910037121 A CN 201910037121A CN 111435988 A CN111435988 A CN 111435988A
Authority
CN
China
Prior art keywords
camera
definition
lens
preset
images
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.)
Pending
Application number
CN201910037121.6A
Other languages
Chinese (zh)
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.)
Goldtek Technology Co Ltd
Original Assignee
Goldtek 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 Goldtek Technology Co Ltd filed Critical Goldtek Technology Co Ltd
Priority to CN201910037121.6A priority Critical patent/CN111435988A/en
Publication of CN111435988A publication Critical patent/CN111435988A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/002Diagnosis, testing or measuring for television systems or their details for television cameras

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

The invention provides a camera automatic focusing detection method and a device, wherein the camera automatic focusing detection method comprises the following steps: s1: fixing a camera to be tested to a preset object distance; s2: controlling a camera to shoot images and calculating the definition of the images; s3: judging whether the definition of the image reaches a preset definition threshold value, if so, ending focusing detection, and if not, performing step S4; s4: judging whether the lens of the camera reaches an adjustable critical point, if so, ending focusing detection and judging that the camera is a defective product, and if not, performing step S5; s5: the lens is driven to rotate by a predetermined angle and the steps S2-S4 are performed. The invention can automatically focus the camera and judge whether the camera is a defective product, thereby not only having high focusing speed and good effect, but also saving human resources and cost.

Description

Camera automatic focusing detection method and device
Technical Field
The invention relates to the technical field of cameras, in particular to an automatic focusing detection method and device for a camera.
Background
In recent years, due to the maturity of image recognition technology and the reduction of camera cost, more and more 3C products can carry one or more cameras to realize functions such as mobile detection, lost object detection, personnel in and out counting, video conversation of an intelligent doorbell, face recognition of a mobile phone and the like. Before processing various images, the precondition to be satisfied is that the images are clearly recognizable, and if the images are blurred and out of focus, an error may occur in judgment.
In consideration of the manufacturing cost and application situation of the product, not every product uses an auto-focusing camera, so when manufacturing and assembling in a factory, the camera needs to be adjusted to a proper focal length for subsequent use. However, to judge whether the focal length of the camera is normal or not is mainly to manually judge whether the image is clear or not, and to manually adjust the focal length according to the situation, the long-time operation is easily misjudged due to fatigue, and the human resources and time are unnecessarily consumed.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method and an apparatus for detecting automatic focusing of a camera, so as to solve the above problems.
A camera automatic focusing detection method comprises the following steps: s1: fixing the camera to be detected to a preset object distance; s2: controlling the camera to shoot images and calculating the definition of the images; s3: judging whether the definition of the image reaches a preset definition threshold value, if so, ending focusing detection, and if not, performing step S4; s4: judging whether the lens of the camera reaches an adjustable critical point, if so, ending focusing detection and judging that the camera is a defective product, otherwise, performing step S5; s5: the lens is driven to rotate by a preset angle and then the steps S2-S4 are performed.
A camera automatic focusing detection device is suitable for the camera automatic focusing detection method, and comprises a clamp, a driving piece and a controller, wherein the clamp and the driving piece are respectively connected with the controller and controlled by the controller; the clamp is used for fixing the camera to be measured to a preset object distance; the controller is provided with a preset definition threshold value and can control the camera to shoot images, calculate the definition of the images and judge whether the definition of the images reaches the preset definition threshold value or not; the controller can also control the driving piece to drive the lens of the camera to rotate and repeatedly shoot images after the lens rotates, calculate the definition of the images and judge whether the definition of the images reaches the preset definition threshold value or not until the definition of the images reaches the preset definition threshold value or the lens reaches an adjustable critical point.
Compared with the prior art, the camera automatic focusing detection method and the camera automatic focusing detection device provided by the invention can automatically focus the camera and judge whether the camera is a defective product, so that the focusing speed is high, the effect is good, and the human resources and the cost are saved.
Drawings
Fig. 1 is a flowchart of a method for detecting automatic focusing of a camera according to an embodiment of the present invention.
Fig. 2 is a block diagram of a camera autofocus detection apparatus according to an embodiment of the present invention.
Description of the main elements
Figure BDA0001946277110000021
Figure BDA0001946277110000031
The following detailed description will further illustrate the invention in conjunction with the above-described figures.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that when an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. When an element is referred to as being "disposed on" another element, it can be directly on the other element or intervening elements may also be present.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
Referring to fig. 1, an embodiment of the present invention provides an automatic focusing detection method for a camera, which is used for focusing an assembled camera and determining whether the camera is a defective product. The automatic focusing detection method of the camera mainly comprises the following steps:
s1: fixing a camera to be tested to a preset object distance;
s2: controlling a camera to shoot images and calculating the definition of the images;
s3: judging whether the definition of the image reaches a preset definition threshold value, if so, ending focusing detection, and if not, performing step S4;
s4: judging whether the lens of the camera reaches an adjustable critical point, if so, ending focusing detection and judging that the camera is a defective product, and if not, performing step S5;
s5: the lens is driven to rotate by a predetermined angle and the steps S2-S4 are performed.
Specifically, the driving lens rotates along a first direction at first, under the condition that the definition of an image shot after rotation does not reach a preset definition threshold value, whether the definition of the image shot after rotation is higher than that of the image shot before rotation is judged, if so, the subsequent driving lens still rotates along the first direction and rotates for a preset angle every time, and if not, the subsequent driving lens rotates along a second direction opposite to the first direction and rotates for a preset angle every time.
It can be understood that the image distance can be changed by driving the lens to rotate, that is, the focal length of the camera is changed, so that the focusing function is achieved. In this embodiment, the first direction is a direction of increasing the image distance, and the second direction is a direction of decreasing the image distance. In other embodiments, the first direction may also be a direction of decreasing image distance, and correspondingly, the second direction is a direction of increasing image distance. In this embodiment, the direction of increasing the image distance is used as the first direction, because it is found in assembly practice that adjusting the lens in the direction of increasing the image distance can more quickly make the definition of the image captured by the camera reach the preset definition threshold.
In this embodiment, calculating the sharpness of the image is to calculate the variance after sharpening the image according to the laplacian operator. The principle of using the laplacian operator to sharpen the image is as follows: when the gray level of the central pixel in the domain is lower than the average gray level of other pixels in the domain, the gray level of the central pixel is further reduced, and when the gray level of the central pixel in the neighborhood is higher than the average gray level of other pixels in the domain, the gray level of the central pixel is further improved, so that the sharpening processing of the image is realized. Taking the absolute value and calculating the variance (i.e. the square of the standard deviation) can be used to check the sharpness of the image, if the image has a high variance, it has a wide frequency response range, representing a normal, focused picture, but if the image has a small variance, it has a narrow frequency response range, meaning that edges in the image are few, representing blurriness.
It should be noted that the preset object distance may be set according to the actual use situation of the camera. The preset definition threshold value can be obtained by shooting a test drawing at a preset object distance according to a standard sample (the camera of the same type as the camera to be tested). The preset angle may be set according to a rotatable section of the lens, for example, when the rotatable section is large, the preset angle is relatively large, and when the rotatable section is small, the preset angle is correspondingly reduced. In addition, the preset angle can be set according to the focusing precision requirement, for example, when the focusing precision requirement is high, the preset angle is relatively small, and when the focusing precision requirement is low, the preset angle can be correspondingly increased.
Further, in other embodiments, the camera autofocus detection method may further include the following steps: and sending prompt information to remind related workers when the camera is judged to be a defective product. Specifically, at least one of text, picture, sound, light, and text information may be used as the prompt information. After the related staff receives the prompt message, the defective products can be checked and the camera can be processed according to actual problems.
Referring to fig. 2, an embodiment of the present invention provides an automatic focus detection apparatus for a camera, which is suitable for the automatic focus detection method for a camera provided in any of the embodiments. The camera autofocus detection apparatus 100 includes a fixture 10, a driving unit 20, and a controller 30, wherein the fixture 10 and the driving unit 20 are respectively connected to the controller 30 and controlled by the controller 30 to implement the steps in the camera autofocus detection method provided in any of the embodiments.
The fixture 10 is used to fix the camera to be measured at a preset object distance. It should be noted that the object distance is a distance between a fixing position of the camera fixed by the fixture 10 and a test target (for example, a test drawing), and the distance between the fixing position of the camera to be tested and the test target, which is the position where the camera to be tested is fixed to the preset object distance, is preset. The controller 30 is provided with a preset definition threshold value and can control the camera to shoot images, calculate the definition of the images and judge whether the definition of the images reaches the preset definition threshold value. The controller 30 can also control the driving part 20 to drive the lens of the camera to rotate, and repeatedly shoot images after the lens rotates, calculate the definition of the images and judge whether the definition of the images reaches a preset definition threshold value or not until the definition of the images reaches the preset definition threshold value or the lens reaches an adjustable critical point.
The controller 30 can control the driving member 20 to drive the lens to rotate in the first and second opposite directions. Specifically, the controller 30 controls the driving part 20 to drive the lens to rotate in the first direction at first, and continues to judge whether the definition of the image photographed after the rotation is higher than that of the image photographed before the rotation or not under the condition that the definition of the image photographed after the rotation does not reach the preset definition threshold value, and can drive the lens to rotate in the second direction when the definition of the image photographed after the rotation is not higher than that of the image photographed before the rotation.
In this embodiment, the driving member 20 is a stepping motor.
Further, in this embodiment, the camera autofocus detecting apparatus 100 may further include a display 40, the display 40 is connected to the controller 30, and the controller 30 can control the display 40 to display text or picture prompt information to remind relevant workers. The camera autofocus detection apparatus 100 may further include an alarm (not shown) connected to the controller 30, and the controller 30 can control the alarm to emit sound or light prompt information to remind the relevant staff.
In addition, other modifications within the spirit of the invention may occur to those skilled in the art, and such modifications are, of course, included within the scope of the invention as claimed.

Claims (10)

1. An automatic camera focusing detection method is used for focusing an assembled camera and judging whether the camera is a defective product or not, and is characterized in that: the camera automatic focusing detection method comprises the following steps:
s1: fixing the camera to be detected to a preset object distance;
s2: controlling the camera to shoot images and calculating the definition of the images;
s3: judging whether the definition of the image reaches a preset definition threshold value, if so, ending focusing detection, and if not, performing step S4;
s4: judging whether the lens of the camera reaches an adjustable critical point, if so, ending focusing detection and judging that the camera is a defective product, otherwise, performing step S5;
s5: the lens is driven to rotate by a preset angle and then steps S2-S4 are performed.
2. The camera autofocus detection method of claim 1, wherein: in step S5, the lens is driven to rotate first along a first direction, and when the sharpness of the image captured after rotation does not reach the preset sharpness threshold, it is determined whether the sharpness of the image captured after rotation is higher than the sharpness of the image captured before rotation, if so, the lens is subsequently driven to rotate along the first direction and rotate the preset angle each time, otherwise, the lens is subsequently driven to rotate along a second direction opposite to the first direction and rotate the preset angle each time.
3. The camera autofocus detection method of claim 1, wherein: and the step of calculating the definition of the image is to calculate the variance after sharpening the image according to the Laplacian operator.
4. The camera autofocus detection method of claim 2, wherein: the first direction is a direction of increasing the image distance, and the second direction is a direction of decreasing the image distance.
5. The camera autofocus detection method of claim 1, wherein: and sending prompt information to remind related workers when the camera is judged to be a defective product.
6. The utility model provides a camera automatic focusing detection device which characterized in that: the clamp and the driving piece are respectively connected with the controller and controlled by the controller; the clamp is used for fixing the camera to be measured to a preset object distance; the controller is provided with a preset definition threshold value and can control the camera to shoot images, calculate the definition of the images and judge whether the definition of the images reaches the preset definition threshold value or not; the controller can also control the driving piece to drive the lens of the camera to rotate and repeatedly shoot images after the lens rotates, calculate the definition of the images and judge whether the definition of the images reaches the preset definition threshold value or not until the definition of the images reaches the preset definition threshold value or the lens reaches an adjustable critical point.
7. The camera autofocus detection device of claim 6, wherein: the controller can control the driving piece to drive the lens to rotate along a first direction and a second direction which are opposite.
8. The camera autofocus detection device of claim 6, wherein: the driving piece is a stepping motor.
9. The camera autofocus detection device of claim 6, wherein: the camera automatic focusing detection device further comprises a display, the display is connected with the controller, and the controller can control the display to display text or picture prompt information.
10. The camera autofocus detection device of claim 6, wherein: the automatic focusing detection device for the camera further comprises an alarm, the alarm is connected with the controller, and the controller can control the alarm to generate sound or light prompt information.
CN201910037121.6A 2019-01-15 2019-01-15 Camera automatic focusing detection method and device Pending CN111435988A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910037121.6A CN111435988A (en) 2019-01-15 2019-01-15 Camera automatic focusing detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910037121.6A CN111435988A (en) 2019-01-15 2019-01-15 Camera automatic focusing detection method and device

Publications (1)

Publication Number Publication Date
CN111435988A true CN111435988A (en) 2020-07-21

Family

ID=71580092

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910037121.6A Pending CN111435988A (en) 2019-01-15 2019-01-15 Camera automatic focusing detection method and device

Country Status (1)

Country Link
CN (1) CN111435988A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114815121A (en) * 2022-02-22 2022-07-29 湖北三赢兴光电科技股份有限公司 Quick focusing method and system for camera module
CN116760972A (en) * 2023-08-17 2023-09-15 天津华来科技股份有限公司 Automatic focusing detection method and equipment for lens module

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101494737A (en) * 2009-03-09 2009-07-29 杭州海康威视数字技术股份有限公司 Integrated camera device and self-adapting automatic focus method
CN103442247A (en) * 2013-08-15 2013-12-11 华南理工大学 Camera image resolution estimation method and camera image resolution estimation system
CN104639936A (en) * 2015-02-06 2015-05-20 苏州艾微视图像科技有限公司 Automatic test method of camera
CN205622739U (en) * 2016-04-19 2016-10-05 深圳市辰卓科技有限公司 Focusing device and system
CN106101561A (en) * 2016-08-09 2016-11-09 青岛海信移动通信技术股份有限公司 Camera focusing detection method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101494737A (en) * 2009-03-09 2009-07-29 杭州海康威视数字技术股份有限公司 Integrated camera device and self-adapting automatic focus method
CN103442247A (en) * 2013-08-15 2013-12-11 华南理工大学 Camera image resolution estimation method and camera image resolution estimation system
CN104639936A (en) * 2015-02-06 2015-05-20 苏州艾微视图像科技有限公司 Automatic test method of camera
CN205622739U (en) * 2016-04-19 2016-10-05 深圳市辰卓科技有限公司 Focusing device and system
CN106101561A (en) * 2016-08-09 2016-11-09 青岛海信移动通信技术股份有限公司 Camera focusing detection method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114815121A (en) * 2022-02-22 2022-07-29 湖北三赢兴光电科技股份有限公司 Quick focusing method and system for camera module
CN116760972A (en) * 2023-08-17 2023-09-15 天津华来科技股份有限公司 Automatic focusing detection method and equipment for lens module
CN116760972B (en) * 2023-08-17 2023-11-17 天津华来科技股份有限公司 Automatic focusing detection method and equipment for lens module

Similar Documents

Publication Publication Date Title
US10652452B2 (en) Method for automatic focus and PTZ camera
US10277798B2 (en) Multiple lenses system, operation method and electronic device employing the same
US8233078B2 (en) Auto focus speed enhancement using object recognition and resolution
CN106707674B (en) Automatic focusing method of projection equipment and projection equipment
CN102148928B (en) Calibration of a lense device
EP2615484B1 (en) Automatic focusing apparatus and method with calibration and slope correction
US20100166406A1 (en) Sound-based focus system and focus method thereof
TWI692969B (en) Camera automatic focusing method and device thereof
CN106031148B (en) Imaging device, method of auto-focusing in an imaging device and corresponding computer program
US9438785B2 (en) Electronic device and focus adjustment method thereof
EP3481051A1 (en) Combining optical and digital zoom under varying image capturing conditions
US20090109235A1 (en) Display device and method of auto-adjusting brightness
US20210092304A1 (en) Image pickup apparatus, an image processing method and a non-transitory computer-readable medium
US9936112B2 (en) Monitoring camera
CN103973990A (en) Wide dynamic fusion method and device
CN111435988A (en) Camera automatic focusing detection method and device
WO2016197494A1 (en) Method and device for adjusting focusing area
CN106534660B (en) Self-adaptive image shooting method and device
CN108289170B (en) Photographing apparatus, method and computer readable medium capable of detecting measurement area
CN113225473B (en) Method, apparatus, device and medium for auto-focusing
CN109698948B (en) Projection method and projection equipment
TWI578780B (en) Blurry image detecting method and related camera and image processing system
CN108734065B (en) Gesture image acquisition equipment and method
JPH05211625A (en) Image pickup device
CN114339037A (en) Automatic focusing method, device, equipment and storage medium

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200721

WD01 Invention patent application deemed withdrawn after publication