Camera calibration method and camera calibration device
By designing target targets with alternating bright and dark stripes and overlapping marker stripes in the field of view of multiple cameras, a target calibration comparison table is established, which solves the problems of complex calculation and inaccurate detection in existing camera calibration methods, and achieves efficient and accurate camera calibration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING LUSTER LIGHTTECH
- Filing Date
- 2022-12-28
- Publication Date
- 2026-06-30
AI Technical Summary
Existing camera calibration methods are computationally complex, cannot adapt to different scenarios, and the detection results are not accurate enough.
Design a target with alternating bright and dark stripes, acquire target images using a target camera, extract the pixel lateral coordinates of the target stripes, establish a target calibration reference table, combine the marker stripes under the condition of overlapping fields of view of multiple cameras, merge the calibration reference table, reduce computational complexity and improve detection accuracy.
It reduces the computational complexity of the measurement process, improves the accuracy of the detection results, broadens the applicable scenarios for camera calibration, and enhances the measurement stability of the equipment.
Smart Images

Figure CN116188592B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of image detection technology, and in particular relates to a camera calibration method and a camera calibration device. Background Technology
[0002] In the field of industrial vision inspection, camera calibration is necessary to determine the relationship between the world coordinates of a point on the surface of a spatial object and the corresponding point in the image. Current conventional camera calibration methods are computationally complex and often require recalibration when switching to other objects or when the object's position shifts, making them unsuitable for different scenarios and resulting in inaccurate detection results. Summary of the Invention
[0003] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes a camera calibration method and a camera calibration device, which reduces the computational complexity of the measurement process and improves the accuracy of the final detection results.
[0004] Firstly, this application provides a camera calibration method, which includes:
[0005] The target image of the target captured by the target camera is obtained. The surface of the target includes multiple stripes arranged in parallel. The multiple stripes include bright stripes and dark stripes. The bright stripes and dark stripes are arranged alternately, and the arrangement direction of the multiple stripes is perpendicular to the scanning direction of the target camera.
[0006] Extract the pixel lateral coordinates of the target stripe in the target image from the plurality of stripes, wherein the target stripe includes at least one bright stripe and at least one dark stripe;
[0007] Based on the pixel horizontal coordinates corresponding to the target stripes and the physical coordinates corresponding to the target stripes, a target calibration lookup table corresponding to the target camera is established.
[0008] The target camera is calibrated based on the target calibration reference table.
[0009] According to the camera calibration method provided in the embodiments of this application, a target with alternating bright and dark stripes is designed, and the target image is acquired using a target camera. Then, the pixel horizontal coordinates of the target stripes are extracted. Based on the pixel horizontal coordinates and physical coordinates of the target stripes, a target calibration reference table is established for the target camera. The target camera is calibrated based on the target calibration reference table. No parameter fitting is required during the calibration process, which reduces the computational complexity in the subsequent measurement process and improves the accuracy of the final detection result.
[0010] One embodiment of the camera calibration method of this application, wherein the target camera includes a first camera and a second camera, and the fields of view of the first camera and the second camera partially overlap, the plurality of stripes further includes marker stripes, the arrangement direction of the marker stripes is perpendicular to the scanning direction of the target camera, and the width of the marker stripes is different from that of the bright stripes and the dark stripes; the step of acquiring the target image of the target target captured by the target camera includes:
[0011] Sub-target images of the target acquired by the first camera and the second camera are obtained respectively, and the marker stripes are located in the overlapping area of the fields of view of the first camera and the second camera.
[0012] According to one embodiment of the camera calibration method of this application, by setting marker stripes when the target camera includes a first camera and a second camera and the fields of view of the first camera and the second camera partially overlap, and acquiring sub-target images of the target target collected by each of the first camera and the second camera respectively, multi-camera joint calibration can be realized. This method is applicable to scenarios where the fields of view of multiple cameras partially overlap, thus broadening the applicable scenarios of camera calibration.
[0013] One embodiment of the camera calibration method of this application includes establishing a target calibration lookup table corresponding to the target camera based on the pixel lateral coordinates corresponding to the target stripes and the physical coordinates corresponding to the target stripes, comprising:
[0014] Based on the width of the marker stripe, the first position coordinates of the stripe center of the marker stripe in the first camera and the second position coordinates of the stripe center of the marker stripe in the second camera are obtained respectively.
[0015] Based on the first position coordinates, the horizontal coordinates of the pixels corresponding to the first camera are cropped to determine the first pixel sequence; based on the second position coordinates, the horizontal coordinates of the pixels corresponding to the second camera are cropped to determine the second pixel sequence.
[0016] Based on the first pixel sequence and the physical coordinates corresponding to the target stripe, a first calibration lookup table is established for the first camera; based on the second pixel sequence and the physical coordinates corresponding to the target stripe, a second calibration lookup table is established for the second camera.
[0017] The first calibration comparison table and the second calibration comparison table are combined to determine the target calibration comparison table.
[0018] According to one embodiment of the camera calibration method of this application, when the target camera includes a first camera and a second camera, and the fields of view of the first camera and the second camera partially overlap, a first calibration lookup table and a second calibration lookup table are merged to determine a target calibration lookup table. This allows the target images acquired by the first camera and the second camera to be directly stitched horizontally in actual measurement work without removing the overlapping area. Then, calculations are performed based on the target calibration lookup table, which reduces the measurement difficulty in multi-camera scenarios and broadens the applicable scenarios of camera calibration.
[0019] One embodiment of the camera calibration method of this application includes extracting the pixel lateral coordinates of the target stripe in the target image from the plurality of stripes, comprising:
[0020] Extract the pixel sequence of the first row of the target row in the target image, wherein the target row includes at least two rows;
[0021] The first row of pixel sequences is denoised to determine the second row of pixel sequences;
[0022] Local extreme points are extracted from the second row of pixel sequence, and a binomial fit is performed between the extreme points and the target pixel sequence points to determine the transition points corresponding to the target row; the target pixel sequence points are the pixel sequence points to the left and right of the extreme points;
[0023] Based on the jump point, the horizontal coordinate of the pixel is determined.
[0024] According to one embodiment of the camera calibration method of this application, the first row of pixel sequence of the target row in the target image is extracted, and the first row of pixel sequence is denoised to obtain the second row of pixel sequence. Then, local extreme points are extracted from the second row of pixel sequence, and binomial fitting is performed on the extreme points and the target pixel sequence points to determine the jump points corresponding to the target row. Finally, the horizontal coordinates of the pixels are determined, which reduces noise interference in the actual detection process and improves the accuracy of the detection results.
[0025] One embodiment of the camera calibration method of this application, wherein the width of the bright stripe and the width of the dark stripe satisfy a target function relationship; the step of establishing a target calibration lookup table corresponding to the target camera based on the pixel horizontal coordinates corresponding to the target stripe and the physical coordinates corresponding to the target stripe includes:
[0026] Based on the pixel horizontal coordinates corresponding to the target stripe, the width sequence of the target stripe is determined;
[0027] Based on the width sequence, determine the width fitting error corresponding to the target stripe;
[0028] If the width fitting error does not exceed the first target threshold, a target calibration reference table is established based on the pixel horizontal coordinates corresponding to the target stripe and the physical coordinates corresponding to the target stripe.
[0029] The first target threshold is determined based on the target function relationship.
[0030] According to one embodiment of the camera calibration method of this application, by fitting the width sequence of the target stripes and determining the width fitting error, a target calibration comparison table is established if the width fitting error does not exceed a first target threshold. This realizes self-detection of the calibration results. If the detection is unqualified, recalibration is required. If the detection is qualified, a target calibration comparison table is generated, which improves the calibration accuracy in actual operation and thus improves the accuracy of the final detection result.
[0031] One embodiment of the camera calibration method of this application, after establishing a target calibration lookup table corresponding to the target camera based on the pixel horizontal coordinates corresponding to the target stripes and the physical coordinates corresponding to the target stripes, the method further includes:
[0032] Acquire the verification image of the verification target captured by the target camera;
[0033] Based on the verification image, determine the pixel coordinate sequence of feature points in the verification image;
[0034] Based on the pixel coordinate sequence and the target calibration lookup table, determine the distance sequence of the feature points;
[0035] Based on the distance sequence and the standard distance, the calibration error is determined;
[0036] If the calibration error exceeds the second target threshold, the target calibration lookup table is corrected based on the secondary correction coefficient.
[0037] The secondary correction coefficients are determined based on the distance sequence.
[0038] According to one embodiment of the camera calibration method of this application, by calibrating the calibration target and performing secondary correction on the target calibration reference table when the calibration fails, timely correction can be performed based on the real-time calibration results, thereby improving the accuracy of the final measurement results and enhancing the measurement stability of the equipment.
[0039] Secondly, this application provides a camera calibration device, which includes:
[0040] The first processing module is used to acquire a target image of a target captured by a target camera. The surface of the target includes multiple stripes arranged in parallel. The multiple stripes include bright stripes and dark stripes. The bright stripes and dark stripes are arranged alternately, and the arrangement direction of the multiple stripes is perpendicular to the scanning direction of the target camera.
[0041] The second processing module is used to extract the pixel lateral coordinates of the target stripe in the target image among the plurality of stripes, wherein the target stripe includes at least one bright stripe and at least one dark stripe;
[0042] The third processing module is used to establish a target calibration reference table for the target camera based on the pixel horizontal coordinates corresponding to the target stripes and the physical coordinates corresponding to the target stripes.
[0043] The fourth processing module is used to calibrate the target camera based on the target calibration reference table.
[0044] According to one embodiment of the camera calibration device of this application, a target with alternating bright and dark stripes is designed, and the target image is acquired using a target camera. Then, the pixel lateral coordinates of the target stripes are extracted. Based on the pixel lateral coordinates and physical coordinates of the target stripes, a target calibration reference table corresponding to the target camera is established. No parameter fitting is required during the calibration process, which reduces the computational complexity of the subsequent measurement process and improves the accuracy of the final detection result.
[0045] Thirdly, this application 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 as described in the first aspect above.
[0046] Fourthly, this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the camera calibration method as described in the first aspect above.
[0047] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the camera calibration method as described in the first aspect above.
[0048] The above-described one or more technical solutions in the embodiments of this application have at least one of the following technical effects:
[0049] By designing a target with alternating bright and dark stripes and using a target camera to acquire target images, the pixel lateral coordinates of the target stripes are extracted. Based on the pixel lateral coordinates and physical coordinates of the target stripes, a target calibration reference table is established for the target camera. The target camera is then calibrated based on the target calibration reference table. No parameter fitting is required during the calibration process, which reduces the computational complexity of subsequent measurement processes and improves the accuracy of the final detection results.
[0050] Furthermore, by setting marker stripes when the target camera includes a first camera and a second camera, and the fields of view of the first camera and the second camera partially overlap, and by acquiring sub-target images of the target target collected by each of the first camera and the second camera respectively, multi-camera joint calibration can be achieved. This is applicable to scenarios where the fields of view of multiple cameras partially overlap, thus broadening the applicable scenarios for camera calibration.
[0051] Furthermore, by merging the first calibration reference table and the second calibration reference table when the target camera includes a first camera and a second camera, and the fields of view of the first camera and the second camera partially overlap, a target calibration reference table is determined. This allows the target images acquired by the first camera and the second camera to be directly stitched together laterally in actual measurement work without removing the overlapping area. Then, calculations are performed based on the target calibration reference table, reducing the measurement difficulty in multi-camera scenarios and broadening the applicable scenarios for camera calibration.
[0052] Furthermore, by extracting the first row of pixel sequences from the target image and performing noise reduction on the first row of pixel sequences to obtain the second row of pixel sequences, local extreme points are extracted from the second row of pixel sequences, and binomial fitting is performed on the extreme points and the target pixel sequence points to determine the jump points corresponding to the target row. Finally, the horizontal coordinates of the pixels are determined, which reduces noise interference in the actual detection process and improves the accuracy of the detection results.
[0053] Furthermore, by fitting the width sequence of the target stripes and determining the width fitting error, a target calibration comparison table is established if the width fitting error does not exceed the first target threshold. This enables self-testing of the calibration results. If the test fails, recalibration is required; if the test passes, a target calibration comparison table is generated, thereby improving the calibration accuracy in actual operation and ultimately enhancing the accuracy of the final test results.
[0054] Furthermore, by calibrating the target and performing secondary correction on the target calibration table in case of failure, timely correction can be made based on the real-time calibration results, improving the accuracy of the final measurement results and enhancing the measurement stability of the equipment.
[0055] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0056] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0057] Figure 1 This is one of the schematic flowcharts of the camera calibration method provided in the embodiments of this application;
[0058] Figure 2 This is a second schematic flowchart of the camera calibration method provided in the embodiments of this application;
[0059] Figure 3 This is a schematic diagram of the camera calibration device provided in the embodiments of this application;
[0060] Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0061] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0062] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0063] The following is combined Figure 1 and Figure 2 This application describes the camera calibration method.
[0064] It should be noted that the entity executing the camera calibration method can be a server, a camera calibration device, or a user's terminal, including but not limited to mobile terminals and non-mobile terminals.
[0065] For example, mobile terminals include, but are not limited to, mobile phones, PDA smart terminals, tablets, and in-vehicle smart terminals; non-mobile terminals include, but are not limited to, PCs.
[0066] like Figure 1 As shown, the camera calibration method includes steps 110, 120, 130 and 140.
[0067] Step 110: Obtain the target image of the target captured by the target camera. The surface of the target includes multiple stripes arranged in parallel. The multiple stripes include bright stripes and dark stripes, which are arranged alternately. The arrangement direction of the multiple stripes is perpendicular to the scanning direction of the target camera.
[0068] In this step, the target is set as a target with alternating bright and dark stripes.
[0069] The target image is an image captured by the target camera based on the target target.
[0070] The target image consists of multiple parallel stripes, including bright and dark stripes, arranged alternately. The stripes are oriented perpendicular to the scanning direction of the target camera. Figure 2 As shown in (a), this is a partial schematic diagram of the acquired target image, including 3 dark stripes and 2 bright stripes.
[0071] In this application, all bright stripes have the same width, and all dark stripes have the same width; the widths of the bright stripes and the dark stripes may be the same or different, and this application does not limit this.
[0072] In actual execution, a target can be designed with alternating bright and dark stripes. The pattern of the target is then placed within the field of view of the target camera, and the area of the target pattern is larger than the field of view of the target camera. The target camera is then used to capture the target image.
[0073] Step 120: Extract the pixel lateral coordinates of the target stripe in the target image from multiple stripes. The target stripe includes at least one bright stripe and at least one dark stripe.
[0074] In this step, the target stripe is a stripe that includes at least one bright stripe and at least one dark stripe.
[0075] The pixel horizontal coordinate is the horizontal coordinate of the pixel corresponding to the target stripe.
[0076] For example, the target stripe can be obtained by combining the edge vertical lines of adjacent stripes, or the target stripe can be obtained by combining the edge vertical lines of any bright stripe and any dark stripe. This application does not limit the scope of the target stripe.
[0077] The target stripes are at least two, and these at least two stripes include at least one bright stripe and at least one dark stripe, such as... Figure 2 As shown in (a), the target stripes are three stripes with alternating light and dark colors.
[0078] In actual execution, the horizontal coordinates of the target stripes in the target image are extracted from multiple stripes. These horizontal coordinates are then combined to form a horizontal coordinate sequence, which is represented as follows:
[0079] {x1,x2,x3,...,x i ,x i+1}
[0080] Where, x i This represents the horizontal pixel coordinate of the extracted i-th target stripe in the target image.
[0081] Step 130: Based on the pixel horizontal coordinates corresponding to the target stripes and the physical coordinates corresponding to the target stripes, establish a target calibration reference table for the target camera.
[0082] In this step, the physical coordinates corresponding to the target stripe are the actual coordinates of the target stripe in space.
[0083] The target calibration reference table is a reference table established based on the pixel horizontal coordinates corresponding to the target stripes and the physical coordinates corresponding to the target stripes. It is used to check whether there is a deviation between the pixel horizontal coordinates corresponding to the target stripes and the physical coordinates.
[0084] In actual implementation, such as Figure 2 As shown in (a), the edge vertical lines of adjacent stripes can be combined, or the edge vertical lines of any bright stripe and any dark stripe can be combined to obtain the target stripe. The midpoint of the bright stripe and the dark stripe in the target stripe is taken to obtain the position coordinate sequence of the center of each target stripe:
[0085] {u1,u2,u3,...,u i}
[0086] Among them, u i This shows the pixel horizontal coordinate of the center of the extracted i-th target stripe, u. i The calculation formula is For example, the formula for calculating u1 is: Where x1 is the horizontal pixel coordinate of the first extracted target stripe in the target image, and x2 is the horizontal pixel coordinate of the second extracted target stripe in the target image; the formula for calculating u2 is: And so on.
[0087] Based on the pixel lateral coordinates and physical coordinates corresponding to the target stripes, a target calibration lookup table for the target camera is established as follows:
[0088] {(X1,u1),(X2,u2),(X3,u3),…,(X i ,u i )}
[0089] Among them, u i This shows the pixel horizontal coordinate of the center of the extracted i-th target stripe, X. i Represents the physical coordinates of the center of the i-th target stripe.
[0090] Step 140: Calibrate the target camera based on the target calibration reference table.
[0091] In this step, the target camera is calibrated laterally based on the target calibration reference table.
[0092] In actual execution, the target camera is horizontally calibrated based on the target calibration reference table. After calibration, the horizontal coordinate I of the pixel is determined. calib The calculation formula is:
[0093]
[0094] Among them, I calib I represents the calibrated pixel horizontal coordinates. org Let X be the horizontal coordinate of the pixel to be calibrated. m Let X be the physical coordinate of the center of the m-th fringe. m+1 Let u be the physical coordinate of the center of the (m+1)th fringe. m Let u be the pixel horizontal coordinate of the center of the m-th stripe. m+1 Let X be the horizontal pixel coordinate of the center of the (m+1)th stripe. i Let X be the physical coordinate of the center of the i-th fringe. i+1 Let u be the physical coordinate of the center of the (i+1)th stripe. i Let u be the pixel horizontal coordinate of the center of the i-th stripe. i+1 Let be the horizontal pixel coordinate of the center of the (i+1)th stripe.
[0095] According to the camera calibration method provided in the embodiments of this application, a target with alternating bright and dark stripes is designed, and the target image is acquired using a target camera. Then, the pixel horizontal coordinates of the target stripes are extracted. Based on the pixel horizontal coordinates and physical coordinates of the target stripes, a target calibration reference table is established for the target camera. The target camera is then calibrated based on the target calibration reference table. No parameter fitting is required during the calibration process, which reduces the computational complexity in the subsequent measurement process and improves the accuracy of the final detection result.
[0096] In some embodiments, where the target camera includes a first camera and a second camera, and the fields of view of the first camera and the second camera partially overlap, the plurality of stripes also include marker stripes, the arrangement direction of the marker stripes being perpendicular to the scanning direction of the target camera, and the width of the marker stripes being different from that of the bright stripes and dark stripes; step 110 may include:
[0097] Sub-target images of the target acquired by each of the first and second cameras are obtained, with the marker stripes located in the overlapping area of the fields of view of the first and second cameras.
[0098] In this embodiment, the width of the marker stripe is different from the width of the bright stripe and the dark stripe, and the marker stripe is located in the overlapping area of the fields of view of the first camera and the second camera.
[0099] In actual execution, when the fields of view of the first camera and the second camera partially overlap, marker stripes are set in the target image, and then sub-target images of the target acquired by each of the first camera and the second camera are obtained respectively.
[0100] According to the camera calibration method provided in the embodiments of this application, by setting marker stripes when the target camera includes a first camera and a second camera, and the fields of view of the first camera and the second camera partially overlap, and by acquiring the sub-target images of the target target collected by each first camera and the second camera respectively, multi-camera joint calibration can be achieved. This method is applicable to scenarios where the fields of view of multiple cameras partially overlap, thus broadening the applicable scenarios of camera calibration.
[0101] In some embodiments, step 130 may include:
[0102] Based on the width of the marker stripe, the first position coordinates of the marker stripe center on the first camera and the second position coordinates of the marker stripe center on the second camera are obtained respectively.
[0103] The first pixel sequence is determined by cropping the horizontal coordinates of the pixels corresponding to the first camera based on the first position coordinates; the second pixel sequence is determined by cropping the horizontal coordinates of the pixels corresponding to the second camera based on the second position coordinates.
[0104] Based on the first pixel sequence and the physical coordinates corresponding to the target stripes, a first calibration lookup table is established for the first camera; based on the second pixel sequence and the physical coordinates corresponding to the target stripes, a second calibration lookup table is established for the second camera.
[0105] Combine the first calibration comparison table and the second calibration comparison table to determine the target calibration comparison table.
[0106] In actual execution, the marker stripes are located in the first camera and the second camera respectively, based on the width of the extracted marker stripes.
[0107] For example, the first camera can be located on the left to capture images of the target on the left, and the second camera can be located on the right to capture images of the target on the right.
[0108] The lateral coordinate sequences of the first camera and the second camera are represented as follows:
[0109] {u′1,u′2,u′3,...,u′ i ,...,u′ m}
[0110] {u″1,u″2,u″3,...,u″ j ,...,u″ n}
[0111] Where, u′ i The center of the marking stripe is located at the first position coordinate of the first camera, u″ j The center of the marking stripe is located at the second position coordinate of the second camera.
[0112] The first pixel sequence is determined by cropping the horizontal coordinates of the pixels corresponding to the first camera based on the first position coordinates; the second pixel sequence is determined by cropping the horizontal coordinates of the pixels corresponding to the second camera based on the second position coordinates.
[0113] Delete the first position coordinate u′ i The coordinate sequence on the right is used to establish the first calibration lookup table corresponding to the first camera; the second position coordinate u″ is deleted. j The coordinate sequence on the left is used to establish a second calibration reference table for the second camera.
[0114] By merging the first calibration comparison table and the second calibration comparison table, the target calibration comparison table is determined as follows:
[0115] {(X′1,u′1),(X′2,u′2),(X′3,u3),...,(X′ i ,u′ i ),(X′ i +X″ j ,u′ j ),...,(X′ i +X″ n ,u″ n )}
[0116] Among them, X i ′ Let u′ represent the physical coordinates of the center of the i-th marker fringe. i The center of the stripe is indicated by the coordinates of the first position of the first camera.
[0117] According to the camera calibration method provided in the embodiments of this application, when the target camera includes a first camera and a second camera, and the fields of view of the first camera and the second camera partially overlap, the first calibration reference table and the second calibration reference table are merged to determine the target calibration reference table. This allows the target images acquired by the first camera and the second camera to be directly stitched horizontally in actual measurement work without removing the overlapping area. Then, calculations are performed based on the target calibration reference table, which reduces the measurement difficulty in multi-camera scenarios and broadens the applicable scenarios of camera calibration.
[0118] like Figure 2 As shown, in some embodiments, the camera calibration method, step 120 may include:
[0119] Extract the pixel sequence of the first row of the target row from the target image; the target row includes at least two rows.
[0120] Denoise reduction is performed on the first row of pixel sequence to determine the second row of pixel sequence;
[0121] Local extreme points are extracted from the second row of pixel sequence, and a binomial fit is performed between the extreme points and the target pixel sequence points to determine the transition points corresponding to the target row; the target pixel sequence points are the pixel sequence points to the left and right of the extreme points.
[0122] The horizontal coordinates of the pixel are determined based on the jump point.
[0123] In this embodiment, the transition point is the point where the pixel grayscale changes.
[0124] Noise reduction can be achieved using Gaussian filtering, median filtering, or mean filtering, and can be based on user-defined methods.
[0125] In actual execution, the first row of pixel sequence of the target row in the target image is extracted, such as... Figure 2 As shown in (b), Gaussian filtering is used to denoise the sequence, resulting in the second row of pixel sequences, as follows. Figure 2 As shown in (c).
[0126] After noise reduction, first-order derivative filtering can be used to filter the second row of pixel sequences. The resulting pixel sequence after filtering is as follows: Figure 2 As shown in (d).
[0127] Based on the absolute threshold and local non-maximum methods, local extreme points are extracted from the second row of pixel sequence, and a binomial fitting is performed on the extreme points and the pixel sequence points to the left and right of the extreme points to obtain a quadratic equation. The extreme points of the quadratic equation are used as the transition points.
[0128] According to the camera calibration method provided in the embodiments of this application, the first row of pixel sequence of the target row in the target image is extracted, and the first row of pixel sequence is denoised to obtain the second row of pixel sequence. Then, local extreme points are extracted from the second row of pixel sequence, and binomial fitting is performed on the extreme points and the target pixel sequence points to determine the jump points corresponding to the target row. Finally, the horizontal coordinates of the pixels are determined, which reduces noise interference in the actual detection process and improves the accuracy of the detection results.
[0129] In some embodiments, the widths of the bright stripes and the widths of the dark stripes satisfy the objective function relationship. Step 130 may further include:
[0130] The width sequence of the target stripes is determined based on the horizontal coordinates of the pixels corresponding to the target stripes;
[0131] Based on the width sequence, determine the width fitting error corresponding to the target stripe;
[0132] If the width fitting error does not exceed the first target threshold, a target calibration reference table is established based on the pixel horizontal coordinates and physical coordinates corresponding to the target stripes.
[0133] The first target threshold is determined based on the objective function relationship.
[0134] In this embodiment, the objective function relationship can be that the width of the bright stripe is 1.5 times or 2 times the width of the dark stripe, or other corresponding multiple relationships. It can also be that the width of the bright stripe and the width of the dark stripe are in a linear function relationship or other function relationships. This application does not limit this.
[0135] The width sequence is a sequence composed of the widths of the target stripes.
[0136] Width fitting error is the error between the detected width sequence and the actual width sequence of the target stripe during the fitting process.
[0137] The first target threshold is a threshold determined based on the objective function relationship, used to check whether the width fitting error meets the standard.
[0138] In actual implementation, when the widths of bright and dark stripes satisfy the objective function relationship, and when the distortion effect is not significant, the width of the target stripes extracted from the target image also satisfies the objective function relationship f(d). This is based on the horizontal coordinate sequence {x1,x2,x3,...,x...} of the target stripes. i ,xi+1}, where x i Let represent the horizontal pixel coordinate of the extracted i-th target stripe in the target image. The width sequence of the target stripe is calculated as follows:
[0139] {d1,d2,d3,...,d i}
[0140] Where d1 represents the width of the extracted i-th target stripe.
[0141] Based on the width sequence of the target stripes, polynomial fitting methods such as the least squares method can be used to fit the width sequence; based on the width sequence fitting function The fitting error for the width sequence of the target stripes is calculated as follows:
[0142] {e1,e2,e3,...,e i}
[0143] Among them, e i This represents the fitting error of the width of the extracted i-th target stripe, and
[0144] In width fitting error e i If the target threshold is not exceeded, a target calibration reference table is established based on the pixel horizontal coordinates and physical coordinates corresponding to the target stripes.
[0145] In width fitting error e i If the first target threshold is exceeded, recalibration is performed.
[0146] In the case of extracting the edge of the erroneous stripe, there is at least one d. i It is half the width of a normal stripe; in the case of missing stripe edges, there is at least one d. i It is twice the width of a normal stripe.
[0147] According to the camera calibration method provided in the embodiments of this application, by fitting the width sequence of the target stripes and determining the width fitting error, a target calibration comparison table is established when the width fitting error does not exceed a first target threshold, thereby realizing self-detection of the calibration results. If the detection is unqualified, recalibration is required; if the detection is qualified, a target calibration comparison table is generated, which improves the calibration accuracy in actual operation and thus improves the accuracy of the final detection result.
[0148] In some embodiments, after step 130, the camera calibration method may further include:
[0149] Acquire the verification image of the verification target captured by the target camera;
[0150] Based on the verification image, determine the pixel coordinate sequence of feature points in the verification image;
[0151] Based on the pixel coordinate sequence and the target calibration lookup table, the distance sequence of feature points is determined;
[0152] The calibration error is determined based on the distance sequence and the standard distance;
[0153] If the calibration error exceeds the second target threshold, the target calibration reference table is corrected based on the secondary correction coefficient.
[0154] The secondary correction coefficients are determined based on the distance sequence.
[0155] In this embodiment, the calibration target is a target for calibration with alternating bright and dark stripes.
[0156] The verification image is an image acquired by the target camera based on the verification target.
[0157] The verification image consists of multiple stripes arranged in parallel, including bright stripes and dark stripes, which are arranged alternately, and the arrangement direction of the multiple stripes is perpendicular to the scanning direction of the target camera.
[0158] The feature point is the center point of the extracted target stripe.
[0159] A pixel coordinate sequence is a sequence composed of the horizontal coordinates of pixels of multiple feature points.
[0160] The distance sequence is a sequence of detection distances of feature points in the verification image.
[0161] The standard distance is the actual distance between feature points in the verification image, which is set based on the verification image.
[0162] The calibration error is the error between the detected distance and the actual distance of feature points in the calibration image.
[0163] The second target threshold is used to verify whether the calibration error meets the standard.
[0164] In actual execution, the calibration target can be attached to a blank area of the field of view to obtain the calibration image of the calibration target captured by the target camera. Then, the pixel coordinate sequence of feature points in the calibration image is extracted, and the distance between feature points is calculated. Several sets of feature point distance sequences in real-time calibration images are recorded in chronological order as follows:
[0165]
[0166] in, Let be the distance between the feature points at time i.
[0167] The formula for calculating the calibration error is:
[0168]
[0169] Where E is the calibration error, t std Indicates standard distance. Let be the distance between the feature points at time i.
[0170] If the calibration error E exceeds the second target threshold, the current calibration is unqualified and the target calibration comparison table needs to be corrected based on the secondary correction coefficient.
[0171] In some embodiments, the calibration error E includes at least one of tilt error and projection error.
[0172] In some embodiments, when the calibration error exceeds a second target threshold, correcting the target calibration lookup table based on the secondary correction coefficient may include:
[0173] Based on the type of calibration error, the calibration error is corrected, and the secondary correction coefficient is obtained;
[0174] Based on the secondary correction coefficients, a calibration reference table for the correction target is provided.
[0175] The following sections will explain the correction process from three different perspectives.
[0176] Firstly, the calibration error is the tilt error.
[0177] When the stripe arrangement direction of the calibration target is not perpendicular to the scanning direction of the target camera, a tilt error will occur during measurement, which can be corrected using the following formula:
[0178]
[0179] Where y is the calibration error before correction. Let θ represent the corrected calibration error, and c represent the tilt angle and fixed offset parameter. As shown in the formula, the tilt error can be expressed by a linear transformation.
[0180] Secondly, the calibration error is a projection error.
[0181] When the thickness of the calibration target differs from the actual measured material thickness, a projection error will occur during the measurement. This error can be corrected using the following formula:
[0182]
[0183] in, The calibration error after correction. The corrected calibration error is represented by D, where D is the object distance when calibrating with the calibration target, d is the thickness difference between the calibration target and the material, and c is the fixed offset parameter. As shown in the formula, the projection error can be represented by a linear transformation.
[0184] Third, calibration errors include tilt error and projection error.
[0185] Based on the formulas representing tilt error and projection error, a linear transformation formula can be used to correct the two errors mentioned above, thereby achieving secondary correction of the measurement results.
[0186] Based on the distance sequence of feature points in the verification image in, Let the distance to the feature point at time i be the equation. The error expression formula can then be fitted as:
[0187]
[0188] in, The calibration error after correction. The calibration error is the corrected value, where a and b are the second-order correction coefficients. The fitting error is expressed using the mean square error.
[0189] Based on the secondary correction coefficient, the physical coordinate X corresponding to the horizontal coordinate u of a pixel in the target image w It can be represented as:
[0190] X w = a·F(u)+b
[0191] Among them, X w Let u be the physical coordinate of the pixel in the target image, and a and b be the secondary correction coefficients.
[0192] According to the camera calibration method provided in the embodiments of this application, by calibrating the calibration target and performing secondary correction on the target calibration reference table in the case of unqualified calibration, timely correction can be performed based on the real-time calibration results, thereby improving the accuracy of the final measurement results and enhancing the measurement stability of the equipment.
[0193] The camera calibration apparatus provided in this application is described below. The camera calibration apparatus described below can be referred to in correspondence with the camera calibration method described above.
[0194] The camera calibration method provided in this application can be executed by a camera calibration device. This application uses the example of a camera calibration device executing the camera calibration method to illustrate the camera calibration device provided in this application.
[0195] This application also provides a camera calibration device.
[0196] like Figure 3 As shown, the camera calibration device includes: a first processing module 310, a second processing module 320, a third processing module 330, and a fourth processing module 340.
[0197] In this embodiment, the first processing module 310 is used to acquire the target image of the target captured by the target camera. The surface of the target includes multiple stripes arranged in parallel. The multiple stripes include bright stripes and dark stripes, which are arranged alternately. The arrangement direction of the multiple stripes is perpendicular to the scanning direction of the target camera.
[0198] The second processing module 320 is used to extract the pixel lateral coordinates of the target stripe in the target image among multiple stripes, wherein the target stripe includes at least one bright stripe and at least one dark stripe.
[0199] The third processing module 330 is used to establish a target calibration reference table for the target camera based on the pixel horizontal coordinates and physical coordinates corresponding to the target stripes.
[0200] The fourth processing module 340 is used to calibrate the target camera based on the target calibration reference table.
[0201] According to the camera calibration device provided in the embodiments of this application, a target with alternating bright and dark stripes is designed, and the target camera is used to acquire the target image. Then, the pixel horizontal coordinates of the target stripes are extracted. Based on the pixel horizontal coordinates and physical coordinates of the target stripes, a target calibration reference table is established for the target camera. The target camera is then calibrated based on the target calibration reference table. No parameter fitting is required during the calibration process, which reduces the computational complexity of the subsequent measurement process and improves the accuracy of the final detection result.
[0202] In some embodiments, where the target camera includes a first camera and a second camera, and the fields of view of the first camera and the second camera partially overlap, the plurality of stripes also include marker stripes, the arrangement direction of the marker stripes being perpendicular to the scanning direction of the target camera, and the width of the marker stripes being different from that of the bright stripes and dark stripes; the first processing module 310 can also be used for:
[0203] Sub-target images of the target acquired by each of the first and second cameras are obtained, with the marker stripes located in the overlapping area of the fields of view of the first and second cameras.
[0204] According to the camera calibration device provided in the embodiments of this application, by setting marker stripes when the target camera includes a first camera and a second camera, and the fields of view of the first camera and the second camera partially overlap, and by acquiring sub-target images of the target target collected by each first camera and the second camera respectively, multi-camera joint calibration can be achieved. It is applicable to scenarios where the fields of view of multiple cameras partially overlap, thus broadening the applicable scenarios of camera calibration.
[0205] In some embodiments, the second processing module 320 may also be used for:
[0206] Extract the pixel sequence of the first row of the target row from the target image; the target row includes at least two rows.
[0207] Denoise reduction is performed on the first row of pixel sequence to determine the second row of pixel sequence;
[0208] Local extreme points are extracted from the second row of pixel sequence, and a binomial fit is performed between the extreme points and the target pixel sequence points to determine the transition points corresponding to the target row; the target pixel sequence points are the pixel sequence points to the left and right of the extreme points.
[0209] The horizontal coordinates of the pixel are determined based on the jump point.
[0210] According to the camera calibration device provided in the embodiments of this application, the first row of pixel sequence of the target row in the target image is extracted, and the first row of pixel sequence is denoised to obtain the second row of pixel sequence. Then, local extreme points are extracted from the second row of pixel sequence, and binomial fitting is performed on the extreme points and the target pixel sequence points to determine the jump points corresponding to the target row. Finally, the horizontal coordinates of the pixels are determined, which reduces noise interference in the actual detection process and improves the accuracy of the detection results.
[0211] In some embodiments, the third processing module 330 can also be used for:
[0212] Based on the width of the marker stripe, the first position coordinates of the marker stripe center on the first camera and the second position coordinates of the marker stripe center on the second camera are obtained respectively.
[0213] The first pixel sequence is determined by cropping the horizontal coordinates of the pixels corresponding to the first camera based on the first position coordinates; the second pixel sequence is determined by cropping the horizontal coordinates of the pixels corresponding to the second camera based on the second position coordinates.
[0214] Based on the first pixel sequence and the physical coordinates corresponding to the target stripes, a first calibration lookup table is established for the first camera; based on the second pixel sequence and the physical coordinates corresponding to the target stripes, a second calibration lookup table is established for the second camera.
[0215] Combine the first calibration comparison table and the second calibration comparison table to determine the target calibration comparison table.
[0216] According to the camera calibration device provided in the embodiments of this application, when the target camera includes a first camera and a second camera, and the fields of view of the first camera and the second camera partially overlap, the first calibration reference table and the second calibration reference table are merged to determine the target calibration reference table. This allows the target images acquired by the first camera and the second camera to be directly stitched horizontally in actual measurement work without removing the overlapping area. Then, calculations are performed based on the target calibration reference table, which reduces the measurement difficulty in multi-camera scenarios and broadens the applicable scenarios of camera calibration.
[0217] In some embodiments, the widths of the bright stripes and the widths of the dark stripes satisfy an objective function relationship; the third processing module 330 can also be used for:
[0218] The width sequence of the target stripes is determined based on the horizontal coordinates of the pixels corresponding to the target stripes;
[0219] Based on the width sequence, determine the width fitting error corresponding to the target stripe;
[0220] If the width fitting error does not exceed the first target threshold, a target calibration reference table is established based on the pixel horizontal coordinates and physical coordinates corresponding to the target stripes.
[0221] The first target threshold is determined based on the objective function relationship.
[0222] According to the camera calibration device provided in the embodiments of this application, by fitting the width sequence of the target stripes and determining the width fitting error, a target calibration comparison table is established when the width fitting error does not exceed a first target threshold, thereby realizing self-detection of the calibration results. If the detection is unqualified, recalibration is required; if the detection is qualified, a target calibration comparison table is generated, which improves the calibration accuracy in actual operation and thus improves the accuracy of the final detection result.
[0223] In some embodiments, the device may further include a fifth processing module for acquiring a verification image of the verification target captured by the target camera;
[0224] Based on the verification image, determine the pixel coordinate sequence of feature points in the verification image;
[0225] Based on the pixel coordinate sequence and the target calibration lookup table, the distance sequence of feature points is determined;
[0226] The calibration error is determined based on the distance sequence and the standard distance;
[0227] If the calibration error exceeds the second target threshold, the target calibration reference table is corrected based on the secondary correction coefficient.
[0228] The secondary correction coefficients are determined based on the distance sequence.
[0229] According to the camera calibration device provided in the embodiments of this application, by calibrating the calibration target, and performing secondary correction on the target calibration reference table in the case of unqualified calibration, timely correction can be performed based on the real-time calibration results, thereby improving the accuracy of the final measurement results and enhancing the measurement stability of the equipment.
[0230] The camera calibration device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the scope of the device.
[0231] The camera calibration device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.
[0232] The camera calibration device provided in this application embodiment can achieve... Figures 1 to 2 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0233] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4As shown, the electronic device may include a processor 410, a communication interface 420, a memory 430, and a communication bus 440. The processor 410, communication interface 420, and memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a camera calibration method. This method includes: acquiring a target image of a target object captured by a target camera; the surface of the target object includes multiple stripes arranged in parallel, including bright stripes and dark stripes, which are arranged alternately, and the arrangement direction of the stripes is perpendicular to the scanning direction of the target camera; extracting the pixel lateral coordinates of the target stripes in the target image, where the target stripes include at least one bright stripe and at least one dark stripe; and establishing a target calibration lookup table corresponding to the target camera based on the pixel lateral coordinates and physical coordinates of the target stripes.
[0234] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0235] On the other hand, this application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer can execute the camera calibration method provided by the above methods. The method includes: acquiring a target image of a target captured by a target camera, wherein the surface of the target target includes multiple stripes arranged in parallel, the multiple stripes including bright stripes and dark stripes, the bright stripes and dark stripes being arranged alternately, and the arrangement direction of the multiple stripes being perpendicular to the scanning direction of the target camera; extracting the pixel lateral coordinates of the target stripe in the target image, wherein the target stripe includes at least one bright stripe and at least one dark stripe; and establishing a target calibration lookup table corresponding to the target camera based on the pixel lateral coordinates corresponding to the target stripe and the physical coordinates corresponding to the target stripe.
[0236] In another aspect, this application also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program is implemented to perform the camera calibration method provided by the methods described above. The method includes: acquiring a target image of a target captured by a target camera, wherein the surface of the target target includes multiple stripes arranged in parallel, the multiple stripes including bright stripes and dark stripes, the bright stripes and dark stripes being arranged alternately, and the arrangement direction of the multiple stripes being perpendicular to the scanning direction of the target camera; extracting the pixel lateral coordinates of the target stripe in the target image, the target stripe including at least one bright stripe and at least one dark stripe; and establishing a target calibration lookup table corresponding to the target camera based on the pixel lateral coordinates corresponding to the target stripe and the physical coordinates corresponding to the target stripe.
[0237] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0238] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0239] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A camera calibration method, characterized in that, include: The target image of the target captured by the target camera is obtained. The surface of the target includes multiple stripes arranged in parallel. The multiple stripes include bright stripes and dark stripes. The bright stripes and dark stripes are arranged alternately, and the arrangement direction of the multiple stripes is perpendicular to the scanning direction of the target camera. Extract the pixel lateral coordinates of the target stripe in the target image from the plurality of stripes, wherein the target stripe includes at least one bright stripe and at least one dark stripe; Based on the pixel horizontal coordinates corresponding to the target stripes and the physical coordinates corresponding to the target stripes, a target calibration lookup table corresponding to the target camera is established. The target camera is calibrated based on the aforementioned target calibration reference table; Extracting the pixel lateral coordinates of the target stripe in the target image from the plurality of stripes includes: Extract the pixel sequence of the first row of the target row in the target image, wherein the target row includes at least two rows; The first row of pixel sequences is denoised to determine the second row of pixel sequences; Local extreme points are extracted from the second row of pixel sequence, and a binomial fit is performed between the extreme points and the target pixel sequence points to determine the transition points corresponding to the target row; the target pixel sequence points are the pixel sequence points to the left and right of the extreme points; Based on the jump point, the horizontal coordinate of the pixel is determined.
2. The camera calibration method according to claim 1, characterized in that, When the target camera includes a first camera and a second camera, and the fields of view of the first camera and the second camera partially overlap, the plurality of stripes also include marker stripes, the arrangement direction of the marker stripes is perpendicular to the scanning direction of the target camera, and the width of the marker stripes is different from that of the bright stripes and the dark stripes; The acquisition of the target image of the target captured by the target camera includes: Sub-target images of the target acquired by the first camera and the second camera are obtained respectively, and the marker stripes are located in the overlapping area of the fields of view of the first camera and the second camera.
3. The camera calibration method according to claim 2, characterized in that, The step of establishing a target calibration lookup table for the target camera based on the pixel lateral coordinates corresponding to the target stripes and the physical coordinates corresponding to the target stripes includes: Based on the width of the marker stripe, the first position coordinates of the stripe center of the marker stripe in the first camera and the second position coordinates of the stripe center of the marker stripe in the second camera are obtained respectively. Based on the first position coordinates, the horizontal coordinates of the pixels corresponding to the first camera are cropped to determine the first pixel sequence; based on the second position coordinates, the horizontal coordinates of the pixels corresponding to the second camera are cropped to determine the second pixel sequence. Based on the first pixel sequence and the physical coordinates corresponding to the target stripe, a first calibration lookup table is established for the first camera; based on the second pixel sequence and the physical coordinates corresponding to the target stripe, a second calibration lookup table is established for the second camera. The first calibration comparison table and the second calibration comparison table are combined to determine the target calibration comparison table.
4. The camera calibration method according to any one of claims 1-3, characterized in that, The widths of the bright stripes and the widths of the dark stripes satisfy a target function relationship; the step of establishing a target calibration lookup table for the target camera based on the pixel horizontal coordinates corresponding to the target stripes and the physical coordinates corresponding to the target stripes includes: Based on the pixel horizontal coordinates corresponding to the target stripe, the width sequence of the target stripe is determined; Based on the width sequence, determine the width fitting error corresponding to the target stripe; If the width fitting error does not exceed the first target threshold, a target calibration reference table is established based on the pixel horizontal coordinates corresponding to the target stripe and the physical coordinates corresponding to the target stripe. The first target threshold is determined based on the target function relationship.
5. The camera calibration method according to any one of claims 1-3, characterized in that, After establishing the target calibration lookup table corresponding to the target camera based on the pixel horizontal coordinates corresponding to the target stripes and the physical coordinates corresponding to the target stripes, the method further includes: Acquire the verification image of the verification target captured by the target camera; Based on the verification image, determine the pixel coordinate sequence of feature points in the verification image; Based on the pixel coordinate sequence and the target calibration lookup table, determine the distance sequence of the feature points; Based on the distance sequence and the standard distance, the calibration error is determined; If the calibration error exceeds the second target threshold, the target calibration lookup table is corrected based on the secondary correction coefficient. The secondary correction coefficients are determined based on the distance sequence.
6. A camera calibration apparatus, applicable to camera calibration methods according to any one of claims 1-5, characterized in that, include: The first processing module is used to acquire a target image of a target captured by a target camera. The surface of the target includes multiple stripes arranged in parallel. The multiple stripes include bright stripes and dark stripes. The bright stripes and dark stripes are arranged alternately, and the arrangement direction of the multiple stripes is perpendicular to the scanning direction of the target camera. The second processing module is used to extract the pixel lateral coordinates of the target stripe in the target image among the plurality of stripes, wherein the target stripe includes at least one bright stripe and at least one dark stripe; The third processing module is used to establish a target calibration reference table for the target camera based on the pixel horizontal coordinates corresponding to the target stripes and the physical coordinates corresponding to the target stripes. The fourth processing module is used to calibrate the target camera based on the target calibration reference table.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the camera calibration method as described in any one of claims 1-5.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the camera calibration method as described in any one of claims 1-5.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the camera calibration method as described in any one of claims 1-5.