CN117197170B - Method and system for measuring angle of vision of monocular camera - Google Patents

Method and system for measuring angle of vision of monocular camera Download PDF

Info

Publication number
CN117197170B
CN117197170B CN202311449025.5A CN202311449025A CN117197170B CN 117197170 B CN117197170 B CN 117197170B CN 202311449025 A CN202311449025 A CN 202311449025A CN 117197170 B CN117197170 B CN 117197170B
Authority
CN
China
Prior art keywords
camera
edge
image
angle
target image
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
CN202311449025.5A
Other languages
Chinese (zh)
Other versions
CN117197170A (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.)
Foshan University
Original Assignee
Foshan University
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 Foshan University filed Critical Foshan University
Priority to CN202311449025.5A priority Critical patent/CN117197170B/en
Publication of CN117197170A publication Critical patent/CN117197170A/en
Application granted granted Critical
Publication of CN117197170B publication Critical patent/CN117197170B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Image Processing (AREA)

Abstract

The invention discloses a method and a system for measuring the angle of vision of a monocular camera, wherein the method comprises the following steps: based on the plane target image, taking an internal reference matrix of the camera to be detected and a distortion coefficient of the camera to be detected; based on an internal reference matrix of the camera to be detected and a distortion coefficient of the camera to be detected, and combining a Brown lens distortion model, constructing four edge linear equations of a maximum inscribed orthogonal rectangle of an undistorted image; determining the normal vector of the back projection plane corresponding to the maximum inscription orthogonal rectangular edge line of the undistorted image; and determining the vertical field angle of the camera to be tested and the horizontal field angle of the camera to be tested. According to the invention, the included angles of the straight back projection planes of the upper edge, the lower edge, the left edge and the right edge of the maximum inscribed orthogonal rectangle of the undistorted image are calculated, so that the existing camera view angle measuring device can be simplified, and the accuracy of measuring the camera view angle can be improved. The invention provides a monocular camera field angle measuring method and a monocular camera field angle measuring system, which can be widely applied to the technical field of computer vision measurement.

Description

Method and system for measuring angle of vision of monocular camera
Technical Field
The invention relates to the technical field of computer vision measurement, in particular to a method and a system for measuring the angle of vision of a monocular camera.
Background
In the fields of optical imaging and machine vision, the field angle is an important basis for calculating the imaging range of a camera. For example: in unmanned aerial vehicle and robot technology, the measurement of the angle of field of view can be used for determining the perception range of the unmanned aerial vehicle or robot, so as to help the unmanned aerial vehicle or robot to realize tasks such as navigation, obstacle avoidance, detection and the like; in the visual detection system, through designing a proper view angle range, the camera can be ensured to completely cover a workpiece to be detected, and meanwhile, pixels in an image can be fully utilized; in three-dimensional scanner designs, determining the field angle is equally important, and the scanning range of the scanner can be effectively calculated only under the conditions that the field angle and the object distance are determined;
currently, for the measurement of the angle of view, a manual measurement mode is still generally adopted, namely: firstly, fixing a camera to be tested, and ensuring that an optical axis is vertical to a certain flat wall surface as much as possible; then, measuring by using tools such as a ruler, a tape measure and the like to obtain the vertical distance from the camera optical center to the wall surface and the left, right, upper and lower maximum imaging ranges of the wall surface in the image while dynamically picking up the image; finally, calculating a horizontal view angle and a vertical view angle of the camera by utilizing a triangular relation, wherein for a manual measurement method, the vertical distance from the optical center of the camera to the wall surface is required to be manually measured, and the scale range of a ruler which can be shot by the camera is observed from an image, so that the problems of large manual measurement result and large reading error exist;
in order to improve the convenience of measuring the angle of view, the prior art includes acquiring a first calibration image by shooting a calibration object; then, after the camera is controlled to rotate a certain angle along the horizontal or vertical direction, shooting a calibration object to obtain a second calibration image, and determining the relative movement distance according to the position difference of the calibration object in the first calibration image and the second calibration image; finally, according to the positions of the calibration objects in the first calibration image and the second calibration image and the set rotation angle, the view angle of the camera in the rotation direction is calculated, but the rotation mechanism is required to ensure that the camera rotates by a specified angle, so that the view angle calculation can be completed, and for the capsule endoscope view angle measurement method which also exists in the prior art, the view angle measurement can be realized only by moving the capsule camera by a one-dimensional translation stage, so that the existing view angle measurement method all needs a mechanical movement mechanism to ensure that the camera performs specific movement, so that the view angle measurement can be completed, and the problems of lower measurement precision, complex hardware composition, inconvenience in carrying and the like all exist.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide a monocular camera view angle measuring method and a monocular camera view angle measuring system, which can simplify the existing camera view angle measuring device and improve the accuracy of camera view angle measurement by calculating the included angle of normal vectors of the vertical and horizontal edge straight back projection planes of the maximum inscribed orthogonal rectangle of an undistorted image.
The first technical scheme adopted by the invention is as follows: a monocular camera angle of view measuring method includes the following steps:
acquiring an internal reference matrix of a globally optimal camera to be measured and a distortion coefficient of the globally optimal camera to be measured by a Zhang calibration method based on the plane target image;
based on the internal reference matrix of the globally optimal camera to be tested and the distortion coefficient of the globally optimal camera to be tested, and combining with a Brown lens distortion model, constructing four edge linear equations of the maximum inscribed orthogonal rectangle of the undistorted image;
determining the normal vector of the back projection plane corresponding to the edge straight line of the maximum inscribed orthogonal rectangle of the undistorted image according to four edge straight line equations of the maximum inscribed orthogonal rectangle of the undistorted image;
and determining the vertical field angle of the camera to be tested and the horizontal field angle of the camera to be tested according to the normal vector of the back projection plane corresponding to the maximum inscribed orthogonal rectangular edge line of the undistorted image.
Further, the step of obtaining the internal reference matrix of the globally optimal camera to be measured and the distortion coefficient of the globally optimal camera to be measured by the Zhang calibration method based on the plane target image specifically comprises the following steps:
constructing a field angle measuring device, wherein the field angle measuring device represents a two-dimensional plane target with a characteristic pattern on the surface;
shooting the view angle measuring device through a camera to be tested to obtain a plurality of plane target images with multiple angles, wherein the plane target images are images with distortion;
and (3) calibrating the plane target image by a Zhongshi calibration method to obtain an internal reference matrix of the globally optimal camera to be tested and a distortion coefficient of the globally optimal camera to be tested.
Further, the step of performing calibration processing on the plane target image by using a Zhang calibration method to obtain an internal reference matrix of the globally optimal camera to be measured and a distortion coefficient of the globally optimal camera to be measured specifically includes:
extracting 2D coordinates of target feature points of the planar target image through a corner detection algorithm to obtain 3D coordinates of the target feature points;
acquiring a homography matrix between a target plane and an image plane according to the corresponding relation between the 2D coordinates of the target feature points and the 3D coordinates of the target feature points;
according to orthogonality of the rotation matrix and combining a homography matrix between a target plane and an image plane, constructing an absolute quadratic curve projection linear equation set related to the camera to be tested;
solving an absolute secondary curve projection linear equation set of the camera to be tested by a linear least square method and a Cholesky decomposition method to obtain a preliminary internal reference matrix of the camera to be tested;
decomposing the target homography matrix based on the initial internal reference matrix of the camera to be detected to obtain external parameters of the camera to be detected;
constructing a linear equation set of undistorted 2D coordinates and distorted 2D coordinates of target feature points through a Brown lens distortion model, and solving by a least square method to obtain a preliminary distortion coefficient of the camera to be tested;
based on a camera perspective projection model, combining an internal reference matrix of a preliminary camera to be detected and a distortion coefficient of the preliminary camera to be detected to establish a target characteristic point re-projection error objective function, and performing minimization treatment by using an LM nonlinear optimization algorithm to obtain a globally optimal internal reference matrix of the camera to be detected and a globally optimal distortion coefficient of the camera to be detected.
Further, the expression of the Brown lens distortion model is specifically as follows:
;
in the above-mentioned method, the step of,representing the normalized plane target image with distorted discrete point coordinates,and->Representing the distortion coefficient of the camera under test, +.>And (5) representing the undistorted plane target image discrete point normalized coordinates.
Further, the step of constructing four edge linear equations of the maximum inscribed orthogonal rectangle of the undistorted image based on the internal reference matrix of the globally optimal camera to be measured and the distortion coefficient of the globally optimal camera to be measured and combining a Brown lens distortion model specifically comprises the following steps:
acquiring a distorted discrete point set of a planar target image, wherein the distorted discrete point set represents an upper edge discrete point of the planar target image, a lower edge discrete point of the planar target image, a left edge discrete point of the planar target image and a right edge discrete point of the planar target image;
normalizing the distorted discrete point set of the planar target image according to the overall optimal internal reference matrix of the camera to be tested to obtain normalized distorted discrete point coordinates of the planar target image;
combining the normalized plane target image discrete point coordinates with distortion with the distortion coefficient of the globally optimal camera to be tested and substituting the distortion coefficient into a Brown lens distortion model to obtain undistorted plane target image discrete point coordinates;
performing inverse normalization processing on the undistorted planar target image discrete point normalization coordinates to obtain inverse normalized undistorted planar target image discrete point coordinates;
and determining the maximum value of the ordinate of the edge discrete point on the plane target image, the minimum value of the ordinate of the edge discrete point on the lower edge of the plane target image, the maximum value of the abscissa of the left edge discrete point of the plane target image and the minimum value of the abscissa of the right edge discrete point of the plane target image based on the undistorted plane target image discrete point coordinates after inverse normalization, and constructing four edge linear equations of the maximum inscription orthogonal rectangle of the undistorted image.
Further, the step of determining the normal vector of the back projection plane corresponding to the edge line of the maximum inscribed orthogonal rectangle of the undistorted image according to the four edge line equations of the maximum inscribed orthogonal rectangle of the undistorted image specifically comprises the following steps:
converting four edge linear equations of the maximum inscribed orthogonal rectangle of the undistorted image to obtain coefficient vectors of the four edge linear equations;
and combining the internal reference matrix of the camera to be detected with coefficient vectors of four edge linear equations to obtain a corresponding back projection plane normal vector of the maximum inscribed orthogonal rectangular edge line of the undistorted image.
Further, the step of determining a vertical field angle of the camera to be measured and a horizontal field angle of the camera to be measured according to the normal vector of the back projection plane corresponding to the maximum inscribed orthogonal rectangular edge line of the undistorted image specifically includes:
and determining the included angle between the normal vectors of the upper and lower edges of the plane target image and the normal vectors of the left and right edges of the plane target image according to the normal vectors of the back projection planes corresponding to the maximum inscribed orthogonal rectangular edge straight line of the undistorted image, wherein the included angle between the normal vectors of the upper and lower edges of the plane target image is the vertical field angle of the camera to be tested, and the included angle between the normal vectors of the left and right edges of the plane target image is the horizontal field angle of the camera to be tested.
Further, the expression of the vertical field angle of the camera to be measured and the horizontal field angle of the camera to be measured is specifically as follows:
;
in the above-mentioned method, the step of,representing the vertical field angle of the camera to be measured, +.>Representing the horizontal angle of view of the camera to be measured, +.> And->Representing normal vector of back projection plane corresponding to maximum inscribed orthogonal rectangular edge line of undistorted image, ++>Modulo representing vector, ++>Representing the inverse cosine calculation symbol.
The second technical scheme adopted by the invention is as follows: a monocular camera field angle measurement system, comprising:
the acquisition module is used for acquiring an internal reference matrix of the globally optimal camera to be tested and a distortion coefficient of the globally optimal camera to be tested through a Zhang calibration method based on the plane target image;
the construction module is used for constructing four edge linear equations of the maximum inscription orthogonal rectangle of the undistorted image based on the internal reference matrix of the globally optimal camera to be tested and the distortion coefficient of the globally optimal camera to be tested and combining the Brown lens distortion model;
the first determining module is used for determining the corresponding back projection plane normal vector of the maximum inscribed orthogonal rectangle edge straight line of the undistorted image according to the four edge straight line equations of the maximum inscribed orthogonal rectangle of the undistorted image;
and the second determining module is used for determining the vertical field angle of the camera to be detected and the horizontal field angle of the camera to be detected according to the normal vector of the back projection plane corresponding to the maximum inscribed orthogonal rectangular edge line of the undistorted image.
The method and the system have the beneficial effects that: according to the invention, the plane target image is calibrated to obtain the internal reference matrix of the camera to be measured and the distortion coefficient of the camera to be measured, the normal vector of the back projection plane corresponding to the maximum inscribed orthogonal rectangular edge straight line of the undistorted image is further determined by combining with the Brown lens distortion model, the influence caused by lens distortion is eliminated in the field angle measurement process, the field angle measurement precision is improved, and the vertical field angle of the camera to be measured and the horizontal field angle of the camera to be measured are obtained.
Drawings
FIG. 1 is a flow chart showing the steps of a method for measuring the angle of view of a monocular camera according to an embodiment of the present invention;
FIG. 2 is a block diagram of a monocular camera angle of view measurement system according to an embodiment of the present invention;
FIG. 3 is a schematic view illustrating a camera view angle according to an embodiment of the present invention;
FIG. 4 is a schematic illustration of a set of distorted discrete points on four edges generated by an embodiment of the present invention;
FIG. 5 is a schematic diagram of a distortion free discrete point set obtained in accordance with an embodiment of the present invention;
fig. 6 is a schematic diagram of four edge lines corresponding to a maximum inscribed orthogonal rectangle of an undistorted image according to an embodiment of the invention.
Detailed Description
The invention will now be described in further detail with reference to the drawings and to specific examples. The step numbers in the following embodiments are set for convenience of illustration only, and the order between the steps is not limited in any way, and the execution order of the steps in the embodiments may be adaptively adjusted according to the understanding of those skilled in the art.
Explanation of technical terms of the present invention:
angle of view: in the optical Field, the Field of View (FOV) refers to the size of the Field of View of a particular optical instrument (e.g., lens). The range takes the lens of the optical instrument as the vertex, and the object image of the measured object can pass through the included angle formed by the two edges of the maximum range of the lens. In a display system, the field angle is the angle between the edge of the display and the line of sight (eye). The larger the angle of view, the larger the field of view, the smaller the optical magnification, the angle of view refers to a camera or otherIn the imaging process of the vision sensor, the included angle of the largest imaging range of the object to be measured on the image sensor through the optical center of the lens is shown as figure 3, and the space imaging area of the general camera is a tetrahedron, so the angle of view comprises the horizontal angle of view #) And vertical angle of view (+)>)。
Calibrating a camera: camera calibration is a key technology in the field of computer vision, which is a process of quantitatively describing the relationship between pixel coordinates and real world coordinates. The main purpose of camera calibration is to establish the relationship between the two-dimensional image coordinates in the camera image coordinate system and the three-dimensional coordinates in the world coordinate system, and correct the camera with the calibration result, so that the output result of the camera is more accurate and reliable, that is, the camera calibration refers to the process of determining the internal parameters and the external parameters of the camera, wherein the internal parameters of the camera comprise an internal reference matrix and distortion coefficients, and the external parameters comprise the position and the posture of the camera in the three-dimensional space. The camera calibration generally utilizes a plane or a three-dimensional target to establish a mapping relation between the space three-dimensional coordinates of the feature points and the two-dimensional coordinates of the projection points, so that the calculation of the internal and external parameters of the camera is completed.
Lens distortion correction: the lens distortion correction is to eliminate or reduce the influence of lens distortion on an image by adjusting the configuration of a lens or using a software algorithm, the lens distortion is to cause distortion or deformation of a shot image compared with an actual object because of the optical characteristics of the lens, and the lens distortion correction process is to complete removal of radial distortion and tangential distortion of the image by using a distortion coefficient and a distortion model on the basis of completing camera calibration.
Back projection plane: on the basis of completing camera calibration and distortion correction, the method is easy to think according to a pinhole imaging model: one point in the image corresponds to one ray in space; a straight line in the image corresponds to a plane in space, which is referred to as the back projection plane of the straight line.
The measuring device is only a 2-dimensional plane target, and the target is used for completing the rapid calibration of the monocular camera internal reference matrix and the distortion coefficient, so that the accurate field angle of the camera under the distortion-free condition can be directly calculated based on the calibration result. The method for measuring the angle of view does not need to take part in reading manually in the whole process, and does not need mechanical moving devices such as a translation table, a turntable and the like in the process of measuring the angle of view, so that the device and the method for measuring the angle of view have the advantages of simple hardware structure, convenience in operation, accuracy in measurement and the like.
Referring to fig. 1, the present invention provides a monocular camera angle of view measuring method, which includes the steps of:
s1, acquiring an internal reference matrix of a globally optimal camera to be tested and a distortion coefficient of the globally optimal camera to be tested through a Zhang calibration method based on a plane target image;
in this embodiment, a surface is prepared to be printed with a specification ofThe grid side is a 2-dimensional planar target of a 20mm checkerboard. Shooting a plurality of plane target images under different angles by using a camera to be detected, and calibrating the camera by using a Camera Calibration Toolbox for Matlab toolbox developed by Jean-Yves Bouguet based on a Zhang Zhengyou calibration method to obtain a parameter matrix and distortion coefficients->. Wherein (1)>Respectively representing the normalized focal lengths of the camera in the directions of the horizontal axis and the vertical axis; />Representing principal point coordinates; />Respectively representing first-order, second-order and third-order radial distortion coefficients; />Respectively representing first order and second order tangential distortion coefficients.
The specific algorithm flow of the Zhang Zhengyou calibration method is as follows:
s11, shooting a plurality of checkerboard images under different angles by using a camera to be detected, finishing the 2D coordinate extraction of the corner points of the checkerboard by using a corner detection algorithm, and simultaneously finishing the generation of the 3D coordinates of the corner points by combining the design size of the checkerboard. The targets used herein are of the specificationCheckerboard with 20mm sides. Generating 3D coordinates of the corner points according to the design size of the checkerboard: selecting plane printed with checkerboard image as reference plane, taking upper left corner of calibration plate as origin, and setting coordinates as +.>The method comprises the steps of carrying out a first treatment on the surface of the Secondly, determining the axial direction of a coordinate system of the calibration plate, and establishing +.>An axis defining a positive direction to the right; establishing +.about.with origin as the starting point along the vertical sides of the checkerboard>The axis and defines a positive downward direction. After the coordinate system is established, determining 3D coordinates of all corner points according to the size of the checkerboard: wherein the upper left corner coordinate is +.>The upper right corner coordinates areThe lower left corner coordinate is +>The lower right corner coordinate is->. Other internal corner points are derived according to the size of the checkerboard;
s12, converting the detected 2D coordinates of the corner points and the generated 3D real coordinates into homogeneous coordinates, constructing a homogeneous linear equation for each corner point, and correlating the corresponding 2D coordinates with the 3D coordinates to form a linear equation set. Solving for the expansion of the homography matrix using a linear equation and reducing it toThe homography matrix H between the target plane and the image plane can be solved.
S13, establishing a linear equation set about the projection of the absolute conic of the camera by utilizing the homography matrix H calculated in the embodiment S12 and the orthogonality of the rotation matrix, and completing the reference matrix of the camera by utilizing the linear least square method and Cholesky decompositionSolving each element;
s14, further decomposing the homography matrix on the basis of completing the solving of the reference matrix in the camera. Decomposing the homography matrix by using a singular value decomposition method to obtain a rotation matrix R and a translation vector of the camera
S15, establishing a linear equation set of undistorted 2D coordinates and distorted 2D coordinates of the target feature points by using a Brown lens distortion model, and solving a camera distortion coefficient
S16, establishing a target characteristic point reprojection error objective function based on a camera perspective projection model, and minimizing the target characteristic point reprojection error objective function by using an LM nonlinear optimization algorithm to obtain a globally optimal camera internal reference matrixAnd a lens distortion coefficient
S2, constructing four edge linear equations of the maximum inscribed orthogonal rectangle of the undistorted image based on an internal reference matrix of the globally optimal camera to be tested and a distortion coefficient of the globally optimal camera to be tested and by combining a Brown lens distortion model;
in this embodiment, the original image size of the camera is obtained by referring to the product specification manual of the camera, sets of distorted discrete points on four edge lines of the upper, lower, left and right are respectively generated according to the original image size, then the generated point coordinates are respectively substituted into a lens distortion model to calculate to obtain an undistorted discrete point set corresponding to the distorted discrete points, and four edge straight line equations corresponding to the maximum inscribed orthogonal rectangle of the undistorted image are calculated based on the contour extremum formed by the undistorted discrete points. Specifically, the calculation of the edge straight line equation is performed as follows.
S21, firstly, obtaining the size and the height of an original image by referring to a camera product specification manualWidth of (width of)At this time, the image is a distorted image, and then sets of distorted discrete points on the upper, lower, left and right edges of the image are respectively generated>Wherein->Respectively representing pixel coordinates of discrete points with distortion in the directions of a horizontal axis and a vertical axis, wherein the sampling interval of the discrete points on each edge is 1 pixel, and the sampling range of the discrete points on the upper edge, the lower edge and the edge is +.>The sampling range of the left and right edge discrete points is +.>As shown in FIG. 4, is generated based on the original imageSet of distorted discrete points on upper, lower, left and right edges
S22, combining the normalized focal length obtained by marking in the embodiment S1And principal point coordinates +.>Pixel coordinates of discrete points with distortion on each edge line are +.>After normalization operation, the image is converted into normalized image coordinates +.>The specific normalization operation is as follows:
;
in the above-mentioned method, the step of,normalized coordinates of distorted discrete points of the normalized planar target image are represented by +.>Representing normalized focal length in the camera reference matrix, < >>A pixel coordinate point representing a discrete point with distortion on each edge line,representing principal point coordinates in the camera's reference matrix.
S23, normalizing image coordinates of discrete points with distortionIs substituted into the lens distortion model,distortion coefficient +.>Calculating normalized image coordinates of corresponding undistorted discrete points>FIG. 5 shows a calculated corresponding undistorted set of discrete pointsThe specific lens distortion model is as follows:
;
in the above-mentioned method, the step of,representing the normalized plane target image with distorted discrete point coordinates,and->Representing the distortion coefficient of the camera under test, +.>Representing undistorted plane target image discrete point normalized coordinates;
wherein,
s24, calibrating the normalized focal length by combining the embodiment S1And principal point coordinates +.>Normalized image coordinates of undistorted discrete points calculated in embodiment S23>After inverse normalization operation, the pixel coordinates are converted into undistorted pixel coordinates>The specific inverse normalization operation is as follows:
;
in the above-mentioned method, the step of,representing the inverse normalization operation and then converting to undistorted pixel coordinates.
Distortion-bearing discrete point set on four edge lines of original imageAfter the processing of the embodiments S22 to S24, the corresponding undistorted discrete point set +.>
S25, calculating an undistorted discrete point set from the upper edge of the original imageIs selected to be the largest +.>Recorded as->The method comprises the steps of carrying out a first treatment on the surface of the Zero distortion discrete point set at lower edge +.>Is selected to be the smallest->Recorded as->The method comprises the steps of carrying out a first treatment on the surface of the Zero distortion discrete point set at left edge +.>Is selected to be the largest +.>Recorded as->The method comprises the steps of carrying out a first treatment on the surface of the Undistorted discrete point set at right edgeIs selected to be the smallest->Recorded as->. By extremum->The four edge straight-line equations of the maximum inscribed orthogonal rectangle of the undistorted image can be determined, as shown in fig. 6, which is four edge straight lines corresponding to the maximum inscribed orthogonal rectangle of the undistorted image, and the general formulas are respectively as follows:
;
in the above-mentioned method, the step of,maximum value of ordinate representing edge discrete point on plane target image,/->Ordinate minimum representing the discrete point of the lower edge of the planar target image, +.>Maximum value of abscissa representing left edge discrete point of planar target image,/->Representing right edge separation of planar target imageThe abscissa of the scatter is the minimum.
S3, determining a corresponding back projection plane normal vector of the maximum inscribed orthogonal rectangle edge straight line of the undistorted image according to four edge straight line equations of the maximum inscribed orthogonal rectangle of the undistorted image;
in this example, the linear equation general expression calculated in the embodiment S25 is converted into a coefficient vector, and the camera internal reference matrix obtained by the calibration in the embodiment S1 is usedCalculating the normal vector of the back projection plane corresponding to the inscribed orthogonal rectangular edge line with the maximum undistorted image +.>. The specific back projection plane normal vector is calculated as follows.
S31, converting the general formula of four edge linear equations of the maximum inscribed orthogonal rectangle of the undistorted image obtained by calculation in the embodiment S25 into coefficient vectors, wherein the conversion result is as follows:
;
in the above-mentioned method, the step of,and the coefficient vector represents four edge linear equations of the maximum inscribed orthogonal rectangle of the undistorted image.
S32, calibrating the obtained camera internal reference matrix by combining the embodiment S1And the linear coefficient vector converted in embodiment S31 +.>Calculating normal vector of back projection plane corresponding to maximum inscription orthogonal rectangular edge line of undistorted image>The method comprises the following steps of:
;
in the above-mentioned method, the step of,representing normal vector of back projection plane corresponding to maximum inscribed orthogonal rectangular edge line of undistorted image, ++>Representing the transpose of the camera's reference matrix.
And S4, determining the vertical field angle of the camera to be tested and the horizontal field angle of the camera to be tested according to the normal vector of the back projection plane corresponding to the maximum inscribed orthogonal rectangular edge line of the undistorted image.
In this embodiment, the angles of normal vectors of the upper and lower pairs of edge back projection planes are calculated, wherein the angles of the upper and lower edge back projection planes are the vertical angle of view of the cameraThe angle between the left and right edge back projection planes is the horizontal angle of the camera>The method comprises the following steps:
;
in the above-mentioned method, the step of,representing the vertical field angle of the camera to be measured, +.>Representing the horizontal field angle of the camera under test,and->Representing normal vector of back projection plane corresponding to maximum inscribed orthogonal rectangular edge line of undistorted image, ++>Modulo representing vector, ++>Representing the inverse cosine calculation symbol.
Referring to fig. 2, a monocular camera angle of view measurement system includes:
the acquisition module is used for acquiring an internal reference matrix of the globally optimal camera to be tested and a distortion coefficient of the globally optimal camera to be tested through a Zhang calibration method based on the plane target image;
the construction module is used for constructing four edge linear equations of the maximum inscription orthogonal rectangle of the undistorted image based on the internal reference matrix of the globally optimal camera to be tested and the distortion coefficient of the globally optimal camera to be tested and combining the Brown lens distortion model;
the first determining module is used for determining the corresponding back projection plane normal vector of the maximum inscribed orthogonal rectangle edge straight line of the undistorted image according to the four edge straight line equations of the maximum inscribed orthogonal rectangle of the undistorted image;
and the second determining module is used for determining the vertical field angle of the camera to be detected and the horizontal field angle of the camera to be detected according to the normal vector of the back projection plane corresponding to the maximum inscribed orthogonal rectangular edge line of the undistorted image.
The content in the method embodiment is applicable to the system embodiment, the functions specifically realized by the system embodiment are the same as those of the method embodiment, and the achieved beneficial effects are the same as those of the method embodiment.
While the preferred embodiment of the present invention has been described in detail, the invention is not limited to the embodiment, and various equivalent modifications and substitutions can be made by those skilled in the art without departing from the spirit of the invention, and these modifications and substitutions are intended to be included in the scope of the present invention as defined in the appended claims.

Claims (9)

1. A monocular camera angle of view measurement method, comprising the steps of:
acquiring an internal reference matrix of a globally optimal camera to be measured and a distortion coefficient of the globally optimal camera to be measured by a Zhang calibration method based on the plane target image;
based on the internal reference matrix of the globally optimal camera to be tested and the distortion coefficient of the globally optimal camera to be tested, and combining with a Brown lens distortion model, constructing four edge linear equations of the maximum inscribed orthogonal rectangle of the undistorted image;
determining the normal vector of the back projection plane corresponding to the edge straight line of the maximum inscribed orthogonal rectangle of the undistorted image according to four edge straight line equations of the maximum inscribed orthogonal rectangle of the undistorted image;
and determining the vertical field angle of the camera to be tested and the horizontal field angle of the camera to be tested according to the normal vector of the back projection plane corresponding to the maximum inscribed orthogonal rectangular edge line of the undistorted image.
2. The monocular camera angle of view measurement method according to claim 1, wherein the step of obtaining the overall optimum reference matrix of the camera to be measured and the distortion coefficient of the overall optimum camera to be measured by the zhang calibration method based on the planar target image specifically comprises:
constructing a field angle measuring device, wherein the field angle measuring device represents a two-dimensional plane target with a characteristic pattern on the surface;
shooting the view angle measuring device through a camera to be tested to obtain a plurality of plane target images with multiple angles, wherein the plane target images are images with distortion;
and (3) calibrating the plane target image by a Zhongshi calibration method to obtain an internal reference matrix of the globally optimal camera to be tested and a distortion coefficient of the globally optimal camera to be tested.
3. The method for measuring the angle of view of a monocular camera according to claim 2, wherein the step of performing calibration processing on the plane target image by a zhangshi calibration method to obtain an internal reference matrix of the globally optimal camera to be measured and a distortion coefficient of the globally optimal camera to be measured specifically comprises the steps of:
extracting 2D coordinates of target feature points of the planar target image through a corner detection algorithm to obtain 3D coordinates of the target feature points;
acquiring a homography matrix between a target plane and an image plane according to the corresponding relation between the 2D coordinates of the target feature points and the 3D coordinates of the target feature points;
according to orthogonality of the rotation matrix and combining a homography matrix between a target plane and an image plane, constructing an absolute quadratic curve projection linear equation set related to the camera to be tested;
solving an absolute secondary curve projection linear equation set of the camera to be tested by a linear least square method and a Cholesky decomposition method to obtain a preliminary internal reference matrix of the camera to be tested;
decomposing the target homography matrix based on the initial internal reference matrix of the camera to be detected to obtain external parameters of the camera to be detected;
constructing a linear equation set of undistorted 2D coordinates and distorted 2D coordinates of target feature points through a Brown lens distortion model, and solving by a least square method to obtain a preliminary distortion coefficient of the camera to be tested;
based on a camera perspective projection model, combining an internal reference matrix of a preliminary camera to be detected and a distortion coefficient of the preliminary camera to be detected to establish a target characteristic point re-projection error objective function, and performing minimization treatment by using an LM nonlinear optimization algorithm to obtain a globally optimal internal reference matrix of the camera to be detected and a globally optimal distortion coefficient of the camera to be detected.
4. A monocular camera angle of view measurement method according to claim 3, wherein the expression of the Brown lens distortion model is specifically as follows:
;
in the above-mentioned method, the step of,representing normalized plane target image with distorted discrete point coordinates,>andrepresenting the distortion coefficient of the camera under test, +.>And (5) representing the undistorted plane target image discrete point normalized coordinates.
5. The monocular camera angle of view measurement method of claim 4, wherein the step of constructing four edge linear equations of the maximum inscribed orthogonal rectangle of the undistorted image based on the internal reference matrix of the globally optimal camera to be measured and the distortion coefficient of the globally optimal camera to be measured in combination with the Brown lens distortion model specifically comprises:
acquiring a distorted discrete point set of a planar target image, wherein the distorted discrete point set represents an upper edge discrete point of the planar target image, a lower edge discrete point of the planar target image, a left edge discrete point of the planar target image and a right edge discrete point of the planar target image;
normalizing the distorted discrete point set of the planar target image according to the overall optimal internal reference matrix of the camera to be tested to obtain normalized distorted discrete point coordinates of the planar target image;
combining the normalized plane target image discrete point coordinates with distortion with the distortion coefficient of the globally optimal camera to be tested and substituting the distortion coefficient into a Brown lens distortion model to obtain undistorted plane target image discrete point coordinates;
performing inverse normalization processing on the undistorted planar target image discrete point normalization coordinates to obtain inverse normalized undistorted planar target image discrete point coordinates;
and determining the maximum value of the ordinate of the edge discrete point on the plane target image, the minimum value of the ordinate of the edge discrete point on the lower edge of the plane target image, the maximum value of the abscissa of the left edge discrete point of the plane target image and the minimum value of the abscissa of the right edge discrete point of the plane target image based on the undistorted plane target image discrete point coordinates after inverse normalization, and constructing four edge linear equations of the maximum inscription orthogonal rectangle of the undistorted image.
6. The method for measuring the angle of view of a monocular camera according to claim 5, wherein the step of determining the normal vector of the back projection plane corresponding to the edge line of the maximum inscribed orthogonal rectangle of the undistorted image according to the four edge line equations of the maximum inscribed orthogonal rectangle of the undistorted image specifically comprises:
converting four edge linear equations of the maximum inscribed orthogonal rectangle of the undistorted image to obtain coefficient vectors of the four edge linear equations;
and combining the internal reference matrix of the camera to be detected with coefficient vectors of four edge linear equations to obtain a corresponding back projection plane normal vector of the maximum inscribed orthogonal rectangular edge line of the undistorted image.
7. The method for measuring the angle of view of a monocular camera according to claim 6, wherein the step of determining the vertical angle of view of the camera to be measured and the horizontal angle of view of the camera to be measured according to the normal vector of the back projection plane corresponding to the straight line of the maximum inscribed orthogonal rectangular edge of the undistorted image specifically comprises:
and determining the included angle between the normal vectors of the upper and lower edges of the plane target image and the normal vectors of the left and right edges of the plane target image according to the normal vectors of the back projection planes corresponding to the maximum inscribed orthogonal rectangular edge straight line of the undistorted image, wherein the included angle between the normal vectors of the upper and lower edges of the plane target image is the vertical field angle of the camera to be tested, and the included angle between the normal vectors of the left and right edges of the plane target image is the horizontal field angle of the camera to be tested.
8. The monocular camera angle of view measurement method of claim 7, wherein the expression of the vertical angle of view of the camera under test and the horizontal angle of view of the camera under test is as follows:
;
in the above-mentioned method, the step of,representing the vertical field angle of the camera to be measured, +.>Representing the horizontal angle of view of the camera to be measured, +.>、/>And->Representing normal vector of back projection plane corresponding to maximum inscribed orthogonal rectangular edge line of undistorted image, ++>Modulo representing vector, ++>Representing the inverse cosine calculation symbol.
9. A monocular camera angle of view measurement system, comprising the following modules:
the acquisition module is used for acquiring an internal reference matrix of the globally optimal camera to be tested and a distortion coefficient of the globally optimal camera to be tested through a Zhang calibration method based on the plane target image;
the construction module is used for constructing four edge linear equations of the maximum inscription orthogonal rectangle of the undistorted image based on the internal reference matrix of the globally optimal camera to be tested and the distortion coefficient of the globally optimal camera to be tested and combining the Brown lens distortion model;
the first determining module is used for determining the corresponding back projection plane normal vector of the maximum inscribed orthogonal rectangle edge straight line of the undistorted image according to the four edge straight line equations of the maximum inscribed orthogonal rectangle of the undistorted image;
and the second determining module is used for determining the vertical field angle of the camera to be detected and the horizontal field angle of the camera to be detected according to the normal vector of the back projection plane corresponding to the maximum inscribed orthogonal rectangular edge line of the undistorted image.
CN202311449025.5A 2023-11-02 2023-11-02 Method and system for measuring angle of vision of monocular camera Active CN117197170B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311449025.5A CN117197170B (en) 2023-11-02 2023-11-02 Method and system for measuring angle of vision of monocular camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311449025.5A CN117197170B (en) 2023-11-02 2023-11-02 Method and system for measuring angle of vision of monocular camera

Publications (2)

Publication Number Publication Date
CN117197170A CN117197170A (en) 2023-12-08
CN117197170B true CN117197170B (en) 2024-02-09

Family

ID=89000109

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311449025.5A Active CN117197170B (en) 2023-11-02 2023-11-02 Method and system for measuring angle of vision of monocular camera

Country Status (1)

Country Link
CN (1) CN117197170B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6101408A (en) * 1996-08-22 2000-08-08 Western Research Company, Inc. Probe and method to obtain accurate area measurements from cervical lesions
CN111274959A (en) * 2019-12-04 2020-06-12 北京航空航天大学 Oil filling taper sleeve pose accurate measurement method based on variable field angle
WO2021212844A1 (en) * 2020-04-21 2021-10-28 广东博智林机器人有限公司 Point cloud stitching method and apparatus, and device and storage device
CN115493568A (en) * 2022-08-26 2022-12-20 重庆软江图灵人工智能科技有限公司 Monocular camera indoor coordinate positioning method based on machine vision

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114037675B (en) * 2021-11-05 2022-12-06 南京航空航天大学 Airplane sample plate defect detection method and device
CN114419150A (en) * 2021-12-21 2022-04-29 未来机器人(深圳)有限公司 Forklift goods taking method and device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6101408A (en) * 1996-08-22 2000-08-08 Western Research Company, Inc. Probe and method to obtain accurate area measurements from cervical lesions
CN111274959A (en) * 2019-12-04 2020-06-12 北京航空航天大学 Oil filling taper sleeve pose accurate measurement method based on variable field angle
WO2021212844A1 (en) * 2020-04-21 2021-10-28 广东博智林机器人有限公司 Point cloud stitching method and apparatus, and device and storage device
CN115493568A (en) * 2022-08-26 2022-12-20 重庆软江图灵人工智能科技有限公司 Monocular camera indoor coordinate positioning method based on machine vision

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
单相机立体视觉测量技术的研究;吴恩启 等;《光学技术》;第44卷(第1期);第1-5页 *

Also Published As

Publication number Publication date
CN117197170A (en) 2023-12-08

Similar Documents

Publication Publication Date Title
Shah et al. Intrinsic parameter calibration procedure for a (high-distortion) fish-eye lens camera with distortion model and accuracy estimation
Shah et al. A simple calibration procedure for fish-eye (high distortion) lens camera
Heikkila Geometric camera calibration using circular control points
Schreier et al. Advances in light microscope stereo vision
CN110296667B (en) High-reflection surface three-dimensional measurement method based on line structured light multi-angle projection
CN108416812B (en) Calibration method of single-camera mirror image binocular vision system
CN110378969B (en) Convergent binocular camera calibration method based on 3D geometric constraint
CN105716542B (en) A kind of three-dimensional data joining method based on flexible characteristic point
CN102155909B (en) Nano-scale three-dimensional shape measurement method based on scanning electron microscope
CN110830781B (en) Automatic projected image correction method and system based on binocular vision
CN102221331B (en) Measuring method based on asymmetric binocular stereovision technology
CN107886547B (en) Fisheye camera calibration method and system
CN107729893B (en) Visual positioning method and system of die spotting machine and storage medium
US20130058581A1 (en) Microscopic Vision Measurement Method Based On Adaptive Positioning Of Camera Coordinate Frame
CN109544628B (en) Accurate reading identification system and method for pointer instrument
CN111707187B (en) Measuring method and system for large part
CN110136068B (en) Sound membrane dome assembly system based on position calibration between bilateral telecentric lens cameras
CN109272555B (en) External parameter obtaining and calibrating method for RGB-D camera
KR20210128881A (en) System and method for efficient 3d reconstruction of objects with telecentric line-scan cameras
CN109544642B (en) N-type target-based TDI-CCD camera parameter calibration method
CN112229323A (en) Six-degree-of-freedom measurement method of checkerboard cooperative target based on monocular vision of mobile phone and application of six-degree-of-freedom measurement method
EP4242609A1 (en) Temperature measurement method, apparatus, and system, storage medium, and program product
CN114299156A (en) Method for calibrating and unifying coordinates of multiple cameras in non-overlapping area
CN116188591A (en) Multi-camera global calibration method and device and electronic equipment
CN208350997U (en) A kind of object movement monitoring system

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