CN113920197A - Method for assisting camera to automatically focus and focus by laser radar - Google Patents

Method for assisting camera to automatically focus and focus by laser radar Download PDF

Info

Publication number
CN113920197A
CN113920197A CN202111207244.3A CN202111207244A CN113920197A CN 113920197 A CN113920197 A CN 113920197A CN 202111207244 A CN202111207244 A CN 202111207244A CN 113920197 A CN113920197 A CN 113920197A
Authority
CN
China
Prior art keywords
camera
image
target
laser radar
area
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
CN202111207244.3A
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.)
Shandong New Generation Information Industry Technology Research Institute Co Ltd
Original Assignee
Shandong New Generation Information Industry Technology Research Institute 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 Shandong New Generation Information Industry Technology Research Institute Co Ltd filed Critical Shandong New Generation Information Industry Technology Research Institute Co Ltd
Priority to CN202111207244.3A priority Critical patent/CN113920197A/en
Publication of CN113920197A publication Critical patent/CN113920197A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S7/00Details of systems according to groups G01S13/00, G01S15/00, G01S17/00
    • G01S7/02Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S13/00
    • G01S7/40Means for monitoring or calibrating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10141Special mode during image acquisition
    • G06T2207/10148Varying focus

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Studio Devices (AREA)
  • Optical Radar Systems And Details Thereof (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

A method for assisting automatic focusing of a camera by a laser radar comprises the following steps of firstly calibrating internal parameters of the camera, external parameters of the laser radar and the camera; then, acquiring an initial image, finding an initial area of a target in the image by using an image recognition method, and calculating a rotational angle of a holder so that an optical axis of a camera is aligned with the target; in the rotation process of the holder, according to the parameters jointly calibrated by the laser radar and the camera, finding a target area in the laser radar point cloud, determining the three-dimensional coordinates of the target, and calculating a focal length value and a focusing value according to an optical imaging model of the camera; and when the rotation of the holder is finished, the camera executes the calculated focal length value and the calculated focusing value, and an image is acquired. In the image obtained at the moment, the target is centered in the image, the imaging size is proper, and the imaging is clear. The calculation result is accurate, the manual participation is reduced, the intelligent and convenient effects are realized, and the practical value of image acquisition is very high.

Description

Method for assisting camera to automatically focus and focus by laser radar
Technical Field
The invention relates to the field of image focusing, in particular to a method for assisting a camera to automatically focus by using a laser radar.
Background
When the intelligent inspection robot executes an inspection task, a camera carried by a rotatable holder is often used for collecting field images, and image recognition algorithms such as deep learning are used for monitoring tasks such as face recognition, vehicle recognition and fire recognition. The premise of accurate image recognition is that a clear image of the target is acquired, and the target has a proper position and size in the image. According to an imaging model of the camera, the focal length influences the imaging size; when the object distance, the image distance (focusing value) and the focal length satisfy the lens imaging formula, the focusing is clear. Therefore, the pan-tilt is required to rotate by a proper angle to aim at the target, and a proper focusing value and an image distance value of the camera are adjusted, so that a proper image can be acquired. The existing monitoring image acquisition scheme has the defects that the rotation angle, the focal length and the focusing value of a holder are continuously adjusted manually according to the image acquisition condition at the background, but the labor is too consumed, and the precision is poor. Some focal length adjustment schemes are that the inspection robot reaches a specified position every time, a fixed holder rotation angle, a fixed focal length and a fixed focusing value are adopted, but the inspection robot moves with a position error, and the mode can only collect images at the specified position and is not flexible enough. Some focusing methods use auto-focusing, estimate the sharpness of the image using an image sharpness evaluation function, and then adjust the focus value to maximize the sharpness of the image, but the end result of this approach is that the entire image appears sharpest and the target area may be blurred.
Disclosure of Invention
In order to overcome the defects of the technology, the invention provides the method for automatically focusing and focusing the laser radar auxiliary camera, which has the advantages that the target is centered in the image, the imaging size is proper and the imaging is clear.
The technical scheme adopted by the invention for overcoming the technical problems is as follows:
a method for automatic focusing of a laser radar-assisted camera is characterized by comprising the following steps:
a) installing a laser radar and a cloud deck with a camera on the outdoor inspection robot;
b) calibrating the camera to obtain an internal parameter matrix
Figure BDA0003307340170000011
Wherein
Figure BDA0003307340170000012
Which represents the focal length of the camera in pixels in the x-direction in a planar coordinate system,
Figure BDA0003307340170000021
denotes the focal length of the camera in pixels in the y-direction in a planar coordinate system, f is the focal length of the camera, dxFor the length of each imaging element in the CCD sensor of the camera, dyFor the width, u, of each imaging element in a camera CCD sensor0Is the pixel abscissa, v, of the optical center on the image0Is the pixel ordinate of the optical center on the image;
c) carrying out combined calibration on the laser radar and the camera to obtain external parameters between the laser radar and the camera;
d) acquiring an initial image, and finding an area where a target is located in the image by using an image recognition method of deep learning;
e) calculating the rotation angle of the holder, and aligning the optical axis of the camera with the target to center the area where the target is located in the image;
f) measuring the target distance by using a laser radar, and adjusting the focal length to enable the area where the target is located to reach a set size in the image;
g) adjusting the focus value to make the target clear in the image;
h) collecting images according to the focal length value obtained by calculation in the step f) and the focus value in the step g).
Further, the step b) finds out the camera to be calibrated by a Zhang Yongyou calibration method.
Further, step e) is based on the formula
Figure BDA0003307340170000022
Calculating to obtain the horizontal rotation angle of the holder
Figure BDA0003307340170000023
By the formula
Figure BDA0003307340170000024
Calculating to obtain the rotation angle of the holder in the vertical direction
Figure BDA0003307340170000025
Wherein u is the abscissa of the center point of the area where the target is located in the image, and v is the ordinate of the center point of the area where the target is located in the image.
Further, the step f) calculates the magnification of the target area by dividing the size of the area where the target is located by the size of the current target, namely the magnification of the focus change, wherein the size of the area where the target is located is 4/5 of the image size.
Further, step g) is performed by the formula
Figure BDA0003307340170000026
And calculating to obtain a focus value m, wherein n is the distance from the laser radar to the camera after the target is obtained.
The invention has the beneficial effects that: firstly, calibrating internal parameters of a camera, external parameters of a laser radar and the camera; then, acquiring an initial image, finding an initial area of a target in the image by using an image recognition method, and calculating a rotational angle of a holder so that an optical axis of a camera is aligned with the target; in the rotation process of the holder, according to the parameters jointly calibrated by the laser radar and the camera, finding a target area in the laser radar point cloud, determining the three-dimensional coordinates of the target, and calculating a focal length value and a focusing value according to an optical imaging model of the camera; and when the rotation of the holder is finished, the camera executes the calculated focal length value and the calculated focusing value, and an image is acquired. In the image obtained at the moment, the target is centered in the image, the imaging size is proper, and the imaging is clear. The calculation result is accurate, the manual participation is reduced, the intelligent and convenient effects are realized, and the practical value of image acquisition is very high.
Drawings
FIG. 1 is a flow chart of the method of the present invention
Fig. 2 is a structural diagram of the intelligent inspection robot of the present invention.
Detailed Description
The invention will be further explained with reference to fig. 1 and 2.
A method for automatic focusing of a laser radar-assisted camera is characterized by comprising the following steps:
a) and a laser radar and a cloud platform with a camera are arranged on the outdoor inspection robot.
b) Calibrating the camera to obtain an internal parameter matrix
Figure BDA0003307340170000031
Wherein
Figure BDA0003307340170000032
Which represents the focal length of the camera in pixels in the x-direction in a planar coordinate system,
Figure BDA0003307340170000033
denotes the focal length of the camera in pixels in the y-direction in a planar coordinate system, f is the focal length of the camera, dxFor the length of each imaging element in the CCD sensor of the camera, dyFor the width, u, of each imaging element in a camera CCD sensor0Is the pixel abscissa, v, of the optical center on the image0Is the pixel ordinate of the optical center on the image.
c) And carrying out combined calibration on the laser radar and the camera to obtain external parameters between the laser radar and the camera.
d) Acquiring an initial image, and finding a region where a target is located in the image by using an image recognition method of deep learning. The target area may not be centered in the image, too small in size, or may not be in focus.
e) And calculating the rotation angle of the holder, so that the optical axis of the camera is aligned to the target, and the area where the target is located is centered in the image.
f) And measuring the target distance by the laser radar, and adjusting the focal length to enable the area where the target is located to reach a set size in the image.
g) And adjusting the focus value to make the target clear in the image.
h) Collecting images according to the focal length value obtained by calculation in the step f) and the focus value in the step g). The obtained image target is centered, the size is moderate and the imaging is clear.
Firstly, calibrating internal parameters of a camera, external parameters of a laser radar and the camera; then, acquiring an initial image, finding an initial area of a target in the image by using an image recognition method, and calculating a rotational angle of a holder so that an optical axis of a camera is aligned with the target; in the rotation process of the holder, according to the parameters jointly calibrated by the laser radar and the camera, finding a target area in the laser radar point cloud, determining the three-dimensional coordinates of the target, and calculating a focal length value and a focusing value according to an optical imaging model of the camera; and when the rotation of the holder is finished, the camera executes the calculated focal length value and the calculated focusing value, and an image is acquired. In the image obtained at the moment, the target is centered in the image, the imaging size is proper, and the imaging is clear. The calculation result is accurate, the manual participation is reduced, the intelligent and convenient effects are realized, and the practical value of image acquisition is very high.
Further, the step b) finds out the camera to be calibrated by a Zhang Yongyou calibration method.
Further, step e) is based on the formula
Figure BDA0003307340170000041
Calculating to obtain the horizontal rotation angle of the holder
Figure BDA0003307340170000042
By the formula
Figure BDA0003307340170000043
Calculating to obtain the rotation angle of the holder in the vertical direction
Figure BDA0003307340170000045
Wherein u is the abscissa of the central point of the region where the target is located in the image, and v is the eyeAnd marking the ordinate of the central point of the area in the image.
Further, the step f) calculates the magnification of the target area by dividing the size of the area where the target is located by the size of the current target, namely the magnification of the focus change, wherein the size of the area where the target is located is 4/5 of the image size. And reading the current focal length value, and multiplying the current focal length value by the multiple of the focal length change to obtain the focal length value f to be set.
Further, step g) is performed by the formula
Figure BDA0003307340170000044
And calculating to obtain a focus value m, wherein n is the distance from the laser radar to the camera after the target is obtained.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that changes may be made in the embodiments and/or equivalents thereof without departing from the spirit and scope of the invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (5)

1. A method for automatic focusing of a laser radar-assisted camera is characterized by comprising the following steps:
a) installing a laser radar and a cloud deck with a camera on the outdoor inspection robot;
b) calibrating the camera to obtain an internal parameter matrix
Figure FDA0003307340160000011
Wherein
Figure FDA0003307340160000012
Which represents the focal length of the camera in pixels in the x-direction in a planar coordinate system,
Figure FDA0003307340160000013
denotes the focal length of the camera in pixels in the y-direction in a planar coordinate system, f is the focal length of the camera, dxFor the length of each imaging element in the CCD sensor of the camera, dyFor the width, u, of each imaging element in a camera CCD sensor0Is the pixel abscissa, v, of the optical center on the image0Is the pixel ordinate of the optical center on the image;
c) carrying out combined calibration on the laser radar and the camera to obtain external parameters between the laser radar and the camera;
d) acquiring an initial image, and finding an area where a target is located in the image by using an image recognition method of deep learning;
e) calculating the rotation angle of the holder, and aligning the optical axis of the camera with the target to center the area where the target is located in the image;
f) measuring the target distance by using a laser radar, and adjusting the focal length to enable the area where the target is located to reach a set size in the image;
g) adjusting the focus value to make the target clear in the image;
h) collecting images according to the focal length value obtained by calculation in the step f) and the focus value in the step g).
2. The method of lidar assisted camera autofocus focusing of claim 1, wherein: and b) finding out the camera to calibrate the camera by a Zhang Zhengyou calibration method.
3. The method of lidar assisted camera autofocus focusing of claim 1, wherein: in step e) by formula
Figure FDA0003307340160000014
Calculating to obtain the horizontal rotation angle of the holder
Figure FDA0003307340160000015
By the formula
Figure FDA0003307340160000016
Calculating to obtain the rotation angle of the holder in the vertical direction
Figure FDA0003307340160000017
Wherein u is the abscissa of the center point of the area where the target is located in the image, and v is the ordinate of the center point of the area where the target is located in the image.
4. The method of lidar assisted camera autofocus focusing of claim 1, wherein: and f) calculating to obtain the expansion multiple of the target area by dividing the size of the area where the target is located by the size of the area where the current target is located, namely the multiple of the focusing change, wherein the size of the area where the target is located is 4/5 of the size of the image.
5. The method of lidar assisted camera autofocus focusing of claim 1, wherein: in step g) by the formula
Figure FDA0003307340160000021
And calculating to obtain a focus value m, wherein n is the distance from the laser radar to the camera after the target is obtained.
CN202111207244.3A 2021-10-18 2021-10-18 Method for assisting camera to automatically focus and focus by laser radar Pending CN113920197A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111207244.3A CN113920197A (en) 2021-10-18 2021-10-18 Method for assisting camera to automatically focus and focus by laser radar

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111207244.3A CN113920197A (en) 2021-10-18 2021-10-18 Method for assisting camera to automatically focus and focus by laser radar

Publications (1)

Publication Number Publication Date
CN113920197A true CN113920197A (en) 2022-01-11

Family

ID=79240861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111207244.3A Pending CN113920197A (en) 2021-10-18 2021-10-18 Method for assisting camera to automatically focus and focus by laser radar

Country Status (1)

Country Link
CN (1) CN113920197A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118011421A (en) * 2024-04-10 2024-05-10 中国科学院西安光学精密机械研究所 Theodolite image automatic focusing method and system based on laser radar depth estimation

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109479088A (en) * 2017-06-02 2019-03-15 深圳市大疆创新科技有限公司 The system and method for carrying out multiple target tracking based on depth machine learning and laser radar and focusing automatically
CN112396664A (en) * 2020-11-24 2021-02-23 华南理工大学 Monocular camera and three-dimensional laser radar combined calibration and online optimization method
CN113205604A (en) * 2021-05-17 2021-08-03 南昌智能新能源汽车研究院 Feasible region detection method based on camera and laser radar
CN113406604A (en) * 2021-06-30 2021-09-17 山东新一代信息产业技术研究院有限公司 Device and method for calibrating positions of laser radar and camera

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109479088A (en) * 2017-06-02 2019-03-15 深圳市大疆创新科技有限公司 The system and method for carrying out multiple target tracking based on depth machine learning and laser radar and focusing automatically
CN112396664A (en) * 2020-11-24 2021-02-23 华南理工大学 Monocular camera and three-dimensional laser radar combined calibration and online optimization method
CN113205604A (en) * 2021-05-17 2021-08-03 南昌智能新能源汽车研究院 Feasible region detection method based on camera and laser radar
CN113406604A (en) * 2021-06-30 2021-09-17 山东新一代信息产业技术研究院有限公司 Device and method for calibrating positions of laser radar and camera

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118011421A (en) * 2024-04-10 2024-05-10 中国科学院西安光学精密机械研究所 Theodolite image automatic focusing method and system based on laser radar depth estimation

Similar Documents

Publication Publication Date Title
EP3389268B1 (en) Depth information acquisition method and apparatus, and image collection device
CN109859272B (en) Automatic focusing binocular camera calibration method and device
US8098984B2 (en) Focus detecting apparatus and an imaging apparatus
CN105118055A (en) Camera positioning correction calibration method and system
CN112949478A (en) Target detection method based on holder camera
WO2022037633A1 (en) Calibration method and apparatus for binocular camera, image correction method and apparatus for binocular camera, storage medium, terminal and intelligent device
CN106482640A (en) A kind of apparatus and method of integrated machine core optical axis correction
CN112541953B (en) Vehicle detection method based on radar signal and video synchronous coordinate mapping
CN111288967A (en) Remote high-precision displacement detection method based on machine vision
CN110779491A (en) Method, device and equipment for measuring distance of target on horizontal plane and storage medium
CN110044262B (en) Non-contact precision measuring instrument based on image super-resolution reconstruction and measuring method
CN109191527B (en) Alignment method and device based on minimum distance deviation
CN105953741B (en) System and method for measuring local geometric deformation of steel structure
CN110736447B (en) Vertical-direction horizontal position calibration method for integrated image acquisition equipment
CN108020200A (en) A kind of depth measurement method and system
CN108805940B (en) Method for tracking and positioning zoom camera in zooming process
CN111595302A (en) Double-sided array CCD auxiliary three-linear array CCD pose optical measurement and calibration method
CN110595374B (en) Large structural part real-time deformation monitoring method based on image transmission machine
CN107784633B (en) Unmanned aerial vehicle aerial image calibration method suitable for plane measurement
CN113920197A (en) Method for assisting camera to automatically focus and focus by laser radar
US7999851B2 (en) Optical alignment of cameras with extended depth of field
CN116957943B (en) Microscope stitching calibration method based on image fusion
CN113421300B (en) Method and device for determining actual position of object in fisheye camera image
CN114111578B (en) Automatic pose determining method for large-caliber element
CN113805304B (en) Automatic focusing system and method for linear array camera

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