Camera calibration method, apparatus, system, electronic device, and storage medium

By acquiring images of the camera to be calibrated from a standard camera, the installation status parameters are determined for camera calibration. This solves the problem of complex and inefficient camera calibration in the prior art, and achieves the effect of simplifying and improving calibration efficiency.

CN115239819BActive Publication Date: 2025-11-25ZHEJIANG HUARAY TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210715401.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-23
Publication Date
2025-11-25
Estimated Expiration
2042-06-23

AI Technical Summary

Technical Problem

Existing camera calibration algorithms are complex, require sophisticated equipment, and need to be repeatedly calculated at different shooting distances, resulting in low calibration efficiency.

Method used

By acquiring images of the camera to be calibrated from a standard camera, the installation status parameters of the camera sensor are determined, including the optical center offset, sensor rotation angle, and flatness parameters. These parameters are then used for camera calibration.

Benefits of technology

It simplifies the camera calibration process, improves calibration efficiency, reduces reliance on precision equipment, and is suitable for mass production optimization of industrial cameras.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115239819B_ABST
    Figure CN115239819B_ABST
Patent Text Reader

Abstract

The application relates to a camera calibration method, device, system, electronic device and storage medium, wherein the camera calibration method comprises the following steps: acquiring a detection image, the detection image being a to-be-calibrated camera image collected by a standard camera; determining a mounting state parameter of a camera sensor based on the detection image, the mounting state parameter comprising at least one of an optical center offset value, a sensor rotation angle and a flatness parameter; and performing camera calibration according to the mounting state parameter. Through the application, the problem of low camera calibration efficiency is solved, and the effect of improving the camera calibration efficiency is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of camera calibration, and in particular to a camera calibration method, apparatus, system, electronic device, and storage medium. Background Technology

[0002] Industrial cameras are used for guiding robotic arms, and visual positioning requires calculating the coordinates of the object being photographed. The relationship between the three-dimensional geometric position of a point on the surface of a spatial object and its corresponding point in the image is determined by the geometric model of the camera imaging; these geometric model parameters are the camera parameters. Under most conditions, these parameters must be obtained through experimentation and calculation; this process is called camera calibration.

[0003] Existing camera calibration algorithms all involve taking pictures of targets with industrial cameras and directly calibrating based on the captured images. This calibration method requires very complex algorithms and precise control equipment to assist in shooting. It also usually requires repeated calculations at different shooting distances, resulting in low calibration efficiency.

[0004] There is currently no effective solution to the problem of low camera calibration efficiency in related technologies. Summary of the Invention

[0005] This embodiment provides a camera calibration method, apparatus, system, electronic device, and storage medium to solve the problem of low efficiency in camera calibration in related technologies.

[0006] Firstly, this embodiment provides a camera calibration method, which includes: acquiring a detection image, wherein the detection image is a camera image to be calibrated acquired by a standard camera; determining installation state parameters of a camera sensor based on the detection image, wherein the installation state parameters include at least one of an optical center offset value, a sensor rotation angle, and a flatness parameter; and performing camera calibration according to the installation state parameters.

[0007] In one embodiment, acquiring the detection image includes: performing orthogonal processing on the detection image to obtain a preprocessed image; determining an image tilt angle based on the preprocessed image, wherein the image tilt angle is the difference between the current shooting angle and the ideal shooting angle of the standard camera; and determining a target image based on the image tilt angle and the preprocessed image.

[0008] In one embodiment, determining the image tilt angle based on the preprocessed image includes: acquiring a feature identifier on the preprocessed image; and determining the image tilt angle based on the ratio of a first pixel length and a second pixel length of the feature identifier, wherein the first pixel length is the pixel length of the feature identifier in the horizontal direction and the second pixel length is the pixel length of the feature identifier in the vertical direction.

[0009] In one embodiment, determining the installation status parameters of the camera sensor based on the detected image includes: determining the lens area of ​​the camera to be tested based on the detected image, and obtaining a first optical center position of the lens area; determining the photosensitive area of ​​the camera sensor based on the detected image, and obtaining a second optical center position of the photosensitive area; and determining the optical center offset value based on the first optical center position and the second optical center position.

[0010] In one embodiment, determining the installation state parameters of the camera sensor based on the detected image includes: acquiring the edge of the photosensitive area of ​​the camera sensor; and determining the rotation angle of the camera sensor based on the angle between the edge of the photosensitive area and the horizontal direction.

[0011] In one embodiment, determining the installation status parameters of the camera sensor based on the detected image includes: determining the photosensitive area of ​​the camera sensor based on the detected image, obtaining the second optical center position of the photosensitive area; obtaining the feature distance between the second optical center position and multiple boundary points of the photosensitive area; and determining the flatness parameter based on the feature distance.

[0012] Secondly, this embodiment provides a camera calibration device, which includes:

[0013] The acquisition module is used to acquire the detection image, which is an image of the camera to be calibrated captured by the standard camera;

[0014] The calculation module is used to determine the installation status parameters of the camera sensor based on the detected image. The installation status parameters include at least one of the following: optical center offset value, sensor rotation angle, and flatness parameter.

[0015] The calibration module is used to calibrate the camera based on the installation status parameters.

[0016] Thirdly, this embodiment provides a camera calibration system, which includes: a standard camera, a first fixture, a second fixture, and a controller. The first fixture is connected to both the standard camera and the second fixture. The standard camera is mounted on the second fixture, and the controller is connected to the standard camera. The standard camera is used to acquire detection images of the camera to be calibrated. The first fixture is used to fix the standard camera and the second fixture. The second fixture includes a scale target, which assists the controller in processing the detection images into target images. The controller is used to implement the camera calibration method described in the first aspect.

[0017] Fourthly, this embodiment provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the camera calibration method described in the first aspect above.

[0018] Fifthly, this embodiment provides a storage medium storing a computer program that, when executed by a processor, implements the camera calibration method described in the first aspect above.

[0019] Compared with related technologies, the camera calibration method provided in this embodiment acquires a detection image, which is an image of the camera to be calibrated captured by a standard camera; determines the installation state parameters of the camera sensor based on the detection image, which include at least one of the following: optical center offset value, sensor rotation angle, and flatness parameter; and performs camera calibration based on the installation state parameters, thus solving the problem of low camera calibration efficiency and achieving the technical effect of improving camera calibration efficiency.

[0020] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description

[0021] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0022] Figure 1 This is a hardware structure block diagram of the terminal of the camera calibration method in this embodiment;

[0023] Figure 2 This is a flowchart of the camera calibration method in this embodiment;

[0024] Figure 3 This is a schematic diagram of image acquisition according to the camera calibration method of the present application embodiment;

[0025] Figure 4 This is a schematic diagram of the detected image according to the camera calibration method of the embodiment of this application;

[0026] Figure 5 This is a schematic diagram of image tilt arc calculation according to the camera calibration method of this application embodiment;

[0027] Figure 6 This is a schematic diagram of the calculation of installation state parameters according to the camera calibration method of the embodiment of this application;

[0028] Figure 7 This is a structural block diagram of the camera calibration device in this embodiment. Detailed Implementation

[0029] To better understand the purpose, technical solution, and advantages of this application, the application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0030] Unless otherwise defined, the technical or scientific terms used in this application shall have the general meaning as understood by one of ordinary skill in the art to which this application pertains. Words such as “a,” “an,” “an,” “the,” “the,” and “these,” used in this application, do not indicate quantitative limitation and may be singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include steps or modules (units) not listed, or may include other steps or modules (units) inherent to such processes, methods, products, or devices. The terms “connected,” “linked,” and “coupled,” used in this application, are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. The term “multiple” used in this application refers to two or more. The "and / or" operator describes the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: A alone, A and B simultaneously, and B alone. Typically, the character " / " indicates that the objects before and after it are in an "or" relationship. The terms "first," "second," and "third," etc., used in this application are merely for distinguishing similar objects and do not represent a specific ordering of the objects.

[0031] The method embodiments provided in this example can be executed on a terminal, computer, or similar computing device. For example, it can run on a terminal. Figure 1 This is a hardware structure block diagram of the terminal for the camera calibration method in this embodiment. For example... Figure 1As shown, a terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 and a memory 104 for storing data are also included. The processor 102 may be, but is not limited to, a microprocessor (MCU) or a programmable logic device (FPGA). The terminal may also include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that… Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the terminal described above. For example, the terminal may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown are illustrated.

[0032] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the camera calibration method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, thereby implementing the aforementioned method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0033] The transmission device 106 is used to receive or send data via a network. This network includes a wireless network provided by the terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 can be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0034] A camera sensor, also known as a camera sensor, is a photosensitive element that uses the photoelectric conversion function of optoelectronic devices to convert the light image on the photosensitive surface into a signal proportional to the light image. Industrial cameras require the calculation of the coordinates of the object being photographed; therefore, camera calibration is necessary during the camera's production process. As a core component of the camera, the camera sensor, due to limitations in installation precision, inevitably deviates from its theoretical state during production. This deviation increases the computational complexity of camera calibration.

[0035] This embodiment provides a camera calibration method. Figure 2 This is a flowchart of the camera calibration method in this embodiment, as follows: Figure 2 As shown, the process includes the following steps:

[0036] Step S201: Obtain the detection image, which is the image of the camera to be calibrated acquired by the standard camera.

[0037] Specifically, the camera to be calibrated is placed in a designated position, and a pre-calibrated standard camera acquires images of the lens and sensor of the camera to be calibrated. This image is then used as the test image. The standard camera can be calibrated using a fixture with a target and common camera calibration algorithms to ensure that the test image acquired by the standard camera corresponds to the actual spatial geometric position of the camera to be calibrated in the image.

[0038] Step S202: Determine the installation status parameters of the camera sensor based on the detected image. The installation status parameters include at least one of the following: optical center offset value, sensor rotation angle, and flatness parameter.

[0039] Specifically, based on the detected image, the relative positional relationship between the sensor's photosensitive area and the lens is obtained. This positional relationship is used to determine the camera sensor's mounting state. The optical center refers to the center of the optical imaging area. For a lens, the optical center is the point where the lens's optical axis intersects with the lens's cross-section. For a camera sensor, the optical center is the geometric center of its photosensitive area. Ideally, the lens's optical center should coincide with the camera sensor's optical center. The difference between the position of the lens's optical center and the position of the photosensitive area's optical center is recorded as the optical center deviation value. The sensor rotation angle is the angle of rotation of the sensor relative to a preset imaging direction. Generally, the photosensitive area of ​​a camera sensor is rectangular; the angle between the upper or lower edge of the photosensitive area and the horizontal direction is taken as the sensor rotation angle. The flatness parameter characterizes the flatness of the camera sensor on the lens mount.

[0040] Step S203: Perform camera calibration based on the installation status parameters.

[0041] Specifically, after obtaining the installation status parameters, technicians can readjust the installation status of the camera sensor in the actual camera or adjust the calculation parameters in the calibration algorithm to correct the deviation between the current installation status of the camera sensor and the ideal status. Then, the camera to be calibrated is corrected according to the relevant parameters of the ideal installation status to complete the final camera calibration.

[0042] Through the above steps, the camera calibration method of this embodiment decomposes the causes of camera distortion into two parts: deviation caused by poor camera sensor installation and distortion of the lens itself. Then, it acquires images of the camera to be calibrated using a pre-calibrated standard camera, detects the camera sensor installation parameters of the camera to be calibrated, and then performs lens correction processing based on the camera sensor installation status, ultimately completing the camera calibration process. Compared to existing technologies that calibrate by photographing a target with the camera to be calibrated, this application obtains the sensor installation parameters of the camera to be calibrated by photographing the camera with a pre-calibrated standard camera, solving the problems of complex and inefficient camera calibration processes in existing technologies, and achieving the technical effect of improving camera calibration efficiency. Furthermore, in actual production applications, industrial camera manufacturers often find it difficult to accurately measure the sensor installation status of each camera in their existing production environments. Based on the camera calibration method of this embodiment, the sensor installation parameters can be accurately obtained to assist manufacturers in optimizing production processes and improving camera sensor installation techniques.

[0043] In one embodiment, acquiring the detection image includes: performing orthogonal processing on the detection image to obtain a preprocessed image; determining an image tilt angle based on the preprocessed image, the image tilt angle being the difference between the current shooting angle and the ideal shooting angle of the standard camera; and determining a target image based on the image tilt angle and the preprocessed image. Specifically, the cross-sectional image to be calibrated acquired by the standard camera can acquire the lens image of the camera to be identified and the sensor image. By adjusting the shooting direction of the standard camera, the shooting plane is made parallel to the sensor mounting plane, improving the accuracy of the acquired sensor mounting status parameters.

[0044] In one embodiment, Figure 3 This is a schematic diagram of image acquisition according to the camera calibration method of this application embodiment, such as... Figure 3 As shown, a standard camera is fixed on a fixture, and the camera to be calibrated is an industrial camera. The camera to be calibrated is placed in the groove of the test fixture, and the distance between the standard camera and the test fixture is adjusted to ensure that the entire test fixture can be clearly captured. At the same time, the light of the supplementary light is adjusted to ensure that the entire test fixture and the photosensitive surface of the sensor can be clearly captured. Then, the standard camera is used to take a picture of the industrial camera to be calibrated to obtain an image of the camera to be calibrated with a calibration target. The calibration target uses a circular cursor to match the calculation method of the circular reflective mark on the camera to be calibrated.

[0045] In one embodiment, the calibration target on the test fixture is of the same size and specifications and is precisely measured in advance. By comparing the relative position and shape on the test image taken by the standard camera, the calibration parameters of the standard camera can be obtained. Using a conventional calibration algorithm, the initial photo taken by the standard camera is restored into a distortion-free positive image.

[0046] In one embodiment, determining the image tilt angle based on the preprocessed image includes: acquiring a feature identifier on the preprocessed image; and determining the image tilt angle based on the ratio of a first pixel length and a second pixel length of the feature identifier, wherein the first pixel length is the pixel length of the feature identifier in the horizontal direction and the second pixel length is the pixel length of the feature identifier in the vertical direction.

[0047] Specifically, this embodiment provides a fixture and a reflective cursor, which can be used to determine the image tilt angle of the preprocessed image. Figure 4 This is a schematic diagram of the detected image according to the camera calibration method of the embodiment of this application, such as... Figure 4 As shown, the image captured by the standard camera also includes reflective markers, which are feature markers. These reflective markers are circular; in one embodiment, they can also be of other shapes and arrangements, and the directional function can be achieved by adjusting their shape. Preferably, multiple reflective markers are included, all circular in shape, and arranged in a directional manner with equal size and spacing.

[0048] In one specific embodiment, the reflective markers utilize multiple circular markers arranged in a directional pattern with equal size and spacing. A graphic is formed using 2×2 circular reflective markers, each 5mm in diameter and 5mm apart, and these directional markers are placed at the four corners of the cross-section of the camera to be calibrated. The marker group at the upper left corner of the camera is rotated 45 degrees to indicate the camera's orientation. This arrangement of reflective markers provides higher accuracy and a more gradual calculation process.

[0049] Figure 5 This is a schematic diagram illustrating the calculation of image tilt arc according to the camera calibration method of this application, as shown below. Figure 5 As shown, the process of correcting a detection image captured by a standard camera to be fully positive includes extracting the front section of the camera being calibrated, which includes reflective cursors at the four corners, and extracting the image of the cursors. Based on the shooting angle of the standard camera in the current image:

[0050]

[0051] Where a and b are the major and minor radii of a single reflective marker sphere in the image, respectively. Figure 5As shown, Δθ represents the tilt angle in radians between the standard camera and the camera to be calibrated. Because this angle is small, the formula can be simplified, i.e. Based on this curvature, the image of the camera to be calibrated in the preprocessed image acquired by the standard camera is further corrected to be completely upright, that is, the initial image is converted into an image taken by the standard camera directly above the industrial camera under test, facing the front of the camera's front section, to obtain the target image.

[0052] In one embodiment, determining the installation status parameters of the camera sensor based on the detected image includes: determining the lens area of ​​the camera to be tested based on the detected image, and obtaining a first optical center position of the lens area; determining the photosensitive area of ​​the camera sensor based on the detected image, and obtaining a second optical center position of the photosensitive area; and determining the optical center offset value based on the first optical center position and the second optical center position.

[0053] Specifically, Figure 6 This is a schematic diagram illustrating the calculation of installation state parameters according to the camera calibration method of this application, as shown below. Figure 6 As shown, the calculation process for the optical center offset value includes:

[0054] The coordinates Ocir(x,y) of the camera lens center and the radius R of the lens mount are calculated using the Hough circle transform. Using the calculated lens center coordinates and radius, the rectangular photosensitive area of ​​the sensor is detected within the annular region of the lens mount. A corner detection algorithm is employed to calculate the coordinates of the four vertices of the sensor's photosensitive rectangle. Based on these vertex coordinates, the coordinates Orec(x,y) of the two diagonals of the sensor are calculated. The difference between the coordinates Ocir(x,y) and Orec(x,y) is the optical center offset value of the sensor.

[0055] Furthermore, the calculation process of coordinates Orec(x,y) includes: using the Hough line detection algorithm to detect the four edge segments of the sensor photosensitive rectangle;

[0056]

[0057] Where a1, b1, and c1 are parameters representing one of the diagonals; and a2, b2, and c2 are parameters representing the other diagonal.

[0058] Therefore, the intersection point of the two lines should satisfy f1(x,y)=f2(x,y), from which we can deduce that the coordinates of the intersection point are (x,y):

[0059]

[0060] When a1*b2 = a2*b1, it means that the two lines are parallel.

[0061] In one embodiment, determining the installation state parameters of the camera sensor based on the detected image includes: acquiring the edge of the photosensitive area of ​​the camera sensor; and determining the rotation angle of the camera sensor based on the angle between the edge of the photosensitive area and the horizontal direction.

[0062] Specifically, Figure 6 This is a schematic diagram illustrating the calculation of installation state parameters according to the camera calibration method of this application, as shown below. Figure 6 As shown, the angle between the sensor's bottom edge BC and the horizontal plane of the concave testing fixture is the sensor's rotation angle. The calculation process for the sensor's rotation angle includes: the sensor's rotation angle is the straight line f of the sensor's bottom edge BC. r (x,y)=kr*x+y+cr and the horizontal plane f of the concave testing fixture l The angle θ between (x,y) and kl*x+y+cl can be calculated using the following formula;

[0063]

[0064] Where kr and cr are the fitting parameters for the straight line equation of the bottom edge BC of the sensor, and kl and cl are the fitting parameters for the straight line equation of the horizontal plane of the concave testing fixture.

[0065] In one embodiment, determining the installation status parameters of the camera sensor based on the detected image includes: determining the photosensitive area of ​​the camera sensor based on the detected image, obtaining the second optical center position of the photosensitive area; obtaining the feature distance between the second optical center position and multiple boundary points of the photosensitive area; and determining the flatness parameter based on the feature distance.

[0066] Specifically, by calculating the distances from the two diagonal corners of the sensor to the four corners, the height difference of the four corners of the sensor can be determined, which is the flatness parameter of the sensor. Figure 6 This is a schematic diagram illustrating the calculation of installation state parameters according to the camera calibration method of this application, as shown below. Figure 6 As shown, the calculation process for the flatness parameter includes: The flatness parameter of the sensor can be obtained by calculating the relationship between the diagonals of the sensor's photosensitive area. The relationship between the distances from the intersection of the two diagonals to the four diagonals allows for the calculation of the height difference between the four corners of the sensor. The distances from the four corners A, B, C, and D of the sensor's photosensitive surface to the intersection point (x1, y1) of the diagonals are L0, L1, L2, and L3, respectively.

[0067] The sensor leveling angle θ can be calculated using the formula:

[0068]

[0069] It should be noted that the steps shown in the above process or in the flowchart of the accompanying figures can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0070] This embodiment also provides a camera calibration device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. The terms "module," "unit," "subunit," etc., used below refer to combinations of software and / or hardware that perform predetermined functions. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0071] Figure 7 This is a structural block diagram of the camera calibration device in this embodiment, as shown below. Figure 7 As shown, the device includes:

[0072] The acquisition module 71 is used to acquire the detection image, which is the image of the camera to be calibrated captured by the standard camera;

[0073] The calculation module 72 is used to determine the installation status parameters of the camera sensor based on the detected image. The installation status parameters include at least one of the following: optical center offset value, sensor rotation angle, and flatness parameter.

[0074] The calibration module 73 is used to calibrate the camera based on the installation status parameters.

[0075] The acquisition module 71 is further configured to perform orthogonal processing on the detected image to obtain a preprocessed image; determine the image tilt angle based on the preprocessed image, wherein the image tilt angle is the difference between the current shooting angle and the ideal shooting angle of the standard camera; and determine the target image based on the image tilt angle and the preprocessed image.

[0076] The acquisition module 71 is further configured to acquire feature identifiers on the preprocessed image; and determine the image tilt angle based on the ratio of the first pixel length and the second pixel length of the feature identifier, wherein the first pixel length is the pixel length of the feature identifier in the horizontal direction and the second pixel length is the pixel length of the feature identifier in the vertical direction.

[0077] The calculation module 72 is further configured to determine the lens area of ​​the camera to be detected based on the detected image, and obtain the first optical center position of the lens area; determine the photosensitive area of ​​the camera sensor based on the detected image, and obtain the second optical center position of the photosensitive area; and determine the optical center offset value based on the first optical center position and the second optical center position.

[0078] The calculation module 72 is also used to obtain the edge of the photosensitive area of ​​the camera sensor; and to determine the rotation angle of the camera sensor based on the angle between the edge of the photosensitive area and the horizontal direction.

[0079] The calculation module 72 is further configured to determine the photosensitive area of ​​the camera sensor based on the detected image, obtain the second optical center position of the photosensitive area; obtain the feature distance between the second optical center position and multiple boundary points of the photosensitive area; and determine the flatness parameter based on the feature distance.

[0080] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.

[0081] This embodiment provides a camera calibration system, which includes: a standard camera, a first fixture, a second fixture, and a controller. The first fixture is connected to both the standard camera and the second fixture. The standard camera is mounted on the second fixture, and the controller is connected to the standard camera. The standard camera is used to acquire detection images of the camera to be calibrated. The first fixture is used to fix the standard camera and the second fixture. The second fixture includes a scale target, which assists the controller in processing the detection images into target images. The controller is used to implement the camera calibration method described in the first aspect above.

[0082] In one embodiment, the first fixture is a fixed fixture, the second fixture is a concave fixture, also called a test fixture, and the controller is a data processing controller. The concave fixture has a scale target for calibrating the standard camera and simultaneously acquiring the reference coordinate system of the camera under test. The groove limits the offset angle of the camera under test, minimizing the influence of other factors. During measurement, the camera under test is simply placed in the groove; no special alignment or orientation is required, improving measurement efficiency. The standard camera is a calibrated camera used to photograph the camera under test and the scale target of the concave fixture, acquiring the images needed for calculation. Generally, a calibrated network industrial camera is sufficient. Under the control of the data processing controller, the calibration target surface is photographed to acquire calibration parameters. The fixed fixture is used to fix the concave fixture and the standard camera, preventing changes in the relative position of the standard camera and the target under test during the photographing process; it also adjusts the distance between the standard camera and the test fixture to ensure clear imaging of the entire test fixture. The data processing controller is used to acquire images captured by a standard camera, perform image conversion processing, calculate the sensor's installation status according to the aforementioned algorithm, and write these parameters into the industrial camera under test.

[0083] This application transforms the process of using the camera under test (DUT) to photograph the calibration target into using a standard camera to photograph the sensor installation state of the DUT. Compared to previous calibration algorithms, this new algorithm is simpler, and the resulting state-based measurement is more intuitive and repeatable. The application of this measuring device improves the repeatability of the measurement work and can be used for factory calibration during camera production, making it suitable for batch measurement tasks.

[0084] This embodiment also provides an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0085] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0086] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0087] S1, acquire the detection image, which is the image of the camera to be calibrated acquired by the standard camera.

[0088] S2, Based on the detected image, determine the installation status parameters of the camera sensor, wherein the installation status parameters include at least one of the following: optical center offset value, sensor rotation angle, and flatness parameter.

[0089] S3, perform camera calibration based on the installation status parameters.

[0090] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated in this embodiment.

[0091] Furthermore, in conjunction with the camera correction methods provided in the above embodiments, this embodiment can also provide a storage medium for implementation. This storage medium stores a computer program; when executed by a processor, the computer program implements any of the camera correction methods described in the above embodiments.

[0092] It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. All other embodiments derived by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.

[0093] Obviously, the accompanying drawings are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar situations based on these drawings without any creative effort. Furthermore, it is understood that although the work done in this development process may be complex and lengthy, for those skilled in the art, certain design, manufacturing, or production modifications made based on the technical content disclosed in this application are merely conventional technical means and should not be considered as insufficient disclosure of this application.

[0094] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0095] The term "embodiment" in this application refers to a specific feature, structure, or characteristic described in connection with an embodiment that may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily imply the same embodiment, nor does it imply that it is mutually exclusive with or independent of other embodiments. It will be clearly or implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0096] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the appended claims.

Claims

1. A camera calibration method, characterized in that, include: Acquire a detection image, wherein the detection image is an image of the camera to be calibrated acquired by a standard camera; The process of acquiring the detection image includes: performing orthogonal processing on the detection image to obtain a preprocessed image; determining an image tilt angle based on the preprocessed image, wherein the image tilt angle is the difference between the current shooting angle and the ideal shooting angle of the standard camera; and determining a target image based on the image tilt angle and the preprocessed image; wherein the current shooting angle of the standard camera is... Where a and b are the major and minor radii of a single reflective marker sphere in the image, respectively; Based on the detected image, the installation status parameters of the camera sensor are determined, and the installation status parameters include at least one of the following: optical center offset value, sensor rotation angle, and flatness parameter. Camera calibration is performed based on the installation status parameters.

2. The camera calibration method according to claim 1, characterized in that, Determining the image tilt angle based on the preprocessed image includes: Obtain feature identifiers on the preprocessed image; The image tilt angle is determined based on the ratio of the first pixel length and the second pixel length of the feature identifier, where the first pixel length is the pixel length of the feature identifier in the horizontal direction and the second pixel length is the pixel length of the feature identifier in the vertical direction.

3. The camera calibration method according to claim 1, characterized in that, The determination of the camera sensor installation status parameters based on the detected image includes: Based on the detected image, the lens area of ​​the camera to be detected is determined, and the first optical center position of the lens area is obtained. Based on the detected image, the photosensitive area of ​​the camera sensor is determined, and the position of the second optical center of the photosensitive area is obtained; The optical center offset value is determined based on the first optical center position and the second optical center position.

4. The camera calibration method according to claim 1, characterized in that, The determination of the camera sensor installation status parameters based on the detected image includes: Obtain the edge of the photosensitive area of ​​the camera sensor; The rotation angle of the camera sensor is determined based on the angle between the edge of the photosensitive area and the horizontal direction.

5. The camera calibration method according to claim 1, characterized in that, The determination of the camera sensor installation status parameters based on the detected image includes: Based on the detected image, the photosensitive area of ​​the camera sensor is determined, and the position of the second optical center of the photosensitive area is obtained; Obtain the characteristic distances between the second optical center position and the boundary points of multiple photosensitive areas; The flatness parameter is determined based on the feature distance.

6. A camera calibration device, characterized in that, include: The acquisition module is used to acquire the detection image, which is an image of the camera to be calibrated captured by the standard camera; The process of acquiring the detection image includes: performing orthogonal processing on the detection image to obtain a preprocessed image; determining an image tilt angle based on the preprocessed image, wherein the image tilt angle is the difference between the current shooting angle and the ideal shooting angle of the standard camera; and determining a target image based on the image tilt angle and the preprocessed image; wherein the current shooting angle of the standard camera is... Where a and b are the major and minor radii of a single reflective marker sphere in the image, respectively; The calculation module is used to determine the installation status parameters of the camera sensor based on the detected image. The installation status parameters include at least one of the following: optical center offset value, sensor rotation angle, and flatness parameter. The calibration module is used to calibrate the camera based on the installation status parameters.

7. A camera calibration system, characterized in that, include: The system includes a standard camera, a first fixture, a second fixture, and a controller. The first fixture is connected to both the standard camera and the second fixture. The standard camera is mounted on the second fixture. The controller is connected to the standard camera. The standard camera is used to acquire detection images of the camera to be calibrated; The first fixture is used to fix the standard camera and the second fixture; The second tooling includes a scale target, used to assist the controller in processing the detected image into a target image; The controller is used to perform the camera calibration method according to any one of claims 1 to 5.

8. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the camera calibration method according to any one of claims 1 to 5.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the camera calibration method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Camera sensor installation state calibration method

    CN115100289A