CCD camera calibration system, method, device, computing device, and storage medium
Patent Information
- Application Number
- KR1020237030659
- Authority / Receiving Office
- KR · KR
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-12-03
- Publication Date
- 2026-09-09
- Estimated Expiration
- 2041-12-03
Smart Images

Figure 112023099204430-PCT00007_ABST
Abstract
Description
Technology Field
[0001] The present application relates to the field of device calibration technology, and in particular to a CCD camera calibration system, method, apparatus, computing device, and storage medium. Background Technology
[0002] With the continuous development and construction of production lines, the number of transmission mechanisms on these lines is also increasing. To ensure the yield of mass-produced products, it is necessary to perform CCD detection on the products on the transmission mechanisms using CCD (Charge Coupled Device) cameras. To guarantee the validity of the detection data, it is necessary to calibrate the CCD cameras.
[0003] In the process of performing CCD detection on an existing transmission mechanism, the calibration method for the CCD camera generally involves attaching a detection label to a product and, when the product and the detection label move together, photographing the detection label and the product with the CCD camera to obtain the conversion matrix of the corresponding CCD camera.
[0004] However, due to product size errors, measurement errors are prone to occur in the conversion matrix obtained by the CCD camera from the product and detection label.
[0005] The embodiments of the present application provide a CCD camera calibration system, method, apparatus, computing device, and storage medium capable of solving the technical problem of measurement error existing in conventional CCD camera calibration methods.
[0006] In a first aspect, an embodiment of the present application provides a CCD camera calibration system, wherein the CCD camera calibration system comprises:
[0007] Transmission mechanism;
[0008] A calibration assembly installed on a transmission mechanism, wherein the calibration assembly has a plurality of calibration pattern units arranged in a longitudinal direction, and the calibration pattern unit includes a first calibration block, and the first calibration block includes a positioning mark and a plurality of uniformly arranged first calibration patterns (311);
[0009] A CCD camera for obtaining a first image by photographing the calibration assembly as the calibration assembly moves; and
[0010] It includes a processing module that is communicatably connected to the CCD camera and calculates a conversion matrix of internal and external parameters of the CCD camera according to the first image.
[0011] By installing the calibration assembly to move on the transmission mechanism and capturing the calibration pattern on the calibration assembly, calibration of the CCD camera can be implemented. Since calibration using an actual product can be avoided, the calibration result is prevented from being affected by product size errors, thereby improving the accuracy of the calibration result. At the same time, the calibration result includes the angle of motion of the calibration assembly, which can overcome the influence of inconsistencies between coordinate systems in static calibration methods.
[0012] In some embodiments, the CCD camera calibration system further includes a verification belt, and
[0013] The verification belt is used to replace the calibration assembly after obtaining the conversion matrix of the internal and external parameters of the CCD camera, and the verification belt has a plurality of stripes distributed at equal intervals.
[0014] After obtaining the calibration results, the accuracy of CCD camera calibration can be improved by installing a verification belt to verify the results.
[0015] In some embodiments, the verification belt is a white background film sheet, and the stripe is a black stripe.
[0016] By setting the background and stripe colors of the verification belt, stripes can be clearly identified in the image, thereby improving the accuracy of the verification process.
[0017] In some embodiments, the calibration assembly includes a calibration belt with a white background, and the color of the first calibration pattern is black.
[0018] By setting the background color of the calibration assembly and the color of the first calibration pattern, the first calibration pattern can be accurately identified, thereby improving the identification accuracy of the first calibration pattern.
[0019] In some embodiments, the first calibration pattern is circular.
[0020] By installing a uniformly distributed circular pattern on the calibration assembly, the accuracy and reliability of calibration and subsequent measurements can be improved.
[0021] In some embodiments, the calibration pattern unit further includes a second calibration block installed on one side of the first calibration block along the width direction of the calibration assembly.
[0022] A second calibration block can be identified in the image to quickly and roughly determine its location, and after identifying the second calibration block, an adjacent first calibration block can be identified to implement the calibration process.
[0023] In some embodiments, the calibration pattern unit includes a plurality of first calibration blocks arranged along the width direction of the calibration assembly, and
[0024] The above calibration assembly is separated into a plurality of sub-calibration assemblies after being segmented by the transmission mechanism, and each sub-calibration assembly includes at least one first calibration block.
[0025] A plurality of first calibration blocks are installed in the width direction of the calibration assembly, and after the transmission mechanism segments the calibration assembly, a CCD camera installed at the segmentation position can capture at least one complete first calibration block, thereby enabling calibration of the CCD camera after the segmentation position.
[0026] In a second aspect, an embodiment of the present application provides a CCD camera calibration method,
[0027] When the calibration assembly moves on the transmission mechanism at a first moving speed, the CCD camera captures the calibration assembly to acquire a first image, which is an image obtained;
[0028] Identifying feature points among each of the first calibration patterns belonging to the same first calibration block from the first image;
[0029] Determining the coordinate position in a calibration coordinate system of each feature point in the first calibration pattern belonging to the same first calibration block, - the calibration coordinate system is determined according to the position of the position determination mark in the first image;
[0030] Determining the spacing between two adjacent feature points according to the position of a feature point in each of the first calibration patterns belonging to the same first calibration block;
[0031] It includes obtaining a transformation matrix of the internal and external parameters of the CCD camera according to the above interval and the coordinate position in the calibration coordinate system of each feature point in the first image.
[0032] By installing the calibration assembly to move on the transmission mechanism to implement the calibration of the CCD camera, calibration using an actual product can be avoided, thereby preventing the calibration result from being affected by product size errors and improving the accuracy of the calibration result.
[0033] In some embodiments, after obtaining a transformation matrix of the internal and external parameters of the CCD camera according to the interval and the coordinate position in the calibration coordinate system of each feature point in the first image,
[0034] The above calibration assembly is replaced with a verification belt having a plurality of stripes distributed at equal intervals, and when the verification belt moves at a second moving speed, the CCD camera photographs the verification belt to acquire a second image, which is an image obtained;
[0035] Determining the measurement interval between adjacent stripes according to the position of the stripe in the second image and the transformation matrix; and
[0036] It further includes verifying the conversion matrix of the CCD camera according to the standard interval between the measurement interval and adjacent stripes.
[0037] After obtaining the calibration results, the accuracy of CCD camera calibration can be improved by installing a verification belt to verify the results.
[0038] In some embodiments, before acquiring the second image,
[0039] Calculating a distortion parameter fitting curve of the CCD camera according to the coordinate position of each feature point in the first image in the calibration coordinate system; and
[0040] It further includes determining the fitting precision of the distortion parameter fitting curve according to the coordinate position in the calibration coordinate system of each feature point in the first image and the distortion parameter fitting curve.
[0041] Acquiring the above second image is,
[0042] It includes acquiring a second image when the above fitting precision reaches a preset precision threshold.
[0043] Before verifying the transformation matrix, a distortion parameter fitting curve is generated based on the distortion parameter fitting at each position of the CCD camera to determine whether the fitting precision meets the requirements. If the fitting precision does not meet the requirements, the verification process is not performed further, thereby reducing the number of verification steps.
[0044] In some embodiments, determining the measurement interval between adjacent stripes according to the position of the stripe in the second image and the transformation matrix is,
[0045] Determining the coordinate position of each stripe's pixel in the calibration coordinate system according to the position of the stripe in the second image; and
[0046] It includes calculating the measurement interval between adjacent stripes based on the coordinate position of each stripe's pixel in the calibration coordinate system and the transformation matrix.
[0047] Based on the coordinate positions corresponding to the pixels of each stripe and the transformation matrix obtained after calibration, the measurement interval between adjacent stripes in the captured second image can be calculated, and the accuracy of the calibration result can be determined by comparing the measurement interval with the actual standard interval.
[0048] In some embodiments, verifying the transformation matrix of the CCD camera according to the standard interval between the measurement interval and adjacent stripes is,
[0049] Calculating the calibration error based on the standard interval and measurement interval between adjacent stripes;
[0050] Comparing each calibration error with a preset error threshold;
[0051] It includes determining that the transformation matrix has not passed verification if the number of calibration errors among each calibration error that is greater than a preset error threshold reaches a preset verification threshold.
[0052] When verifying the calibration results using a verification belt, an allowable error range for the calibration error is set. Since it can be determined that the transformation matrix has passed verification if it falls within this allowable error range, the validity of the calibration results can be guaranteed while avoiding an excessive number of calibrations.
[0053] In some embodiments, the calibration pattern unit further includes a second calibration block installed on one side of the first calibration block along the width direction of the calibration assembly, and
[0054] Before identifying feature points among each of the first calibration patterns belonging to the same first calibration block from the first image,
[0055] It includes determining the location of a first calibration block belonging to the same calibration pattern unit based on the information of the second calibration block in the first image.
[0056] When a second calibration block is set, the second calibration block can be identified in the image first to perform a rapid and approximate location determination, and after identifying the second calibration block, an adjacent first calibration block can be identified to implement a calibration process according to the first calibration block.
[0057] In some embodiments, the second calibration block is rectangular.
[0058] By setting the second calibration block as a rectangular pattern, it can be easily identified.
[0059] In some embodiments, the first calibration pattern is circular, and the feature point is centrifugal.
[0060] The first calibration pattern is set to a circle, allowing the centrifugal position to be determined quickly and accurately and used as a feature point. Compared to setting it to a different shape and fitting the feature point, the precision and stability of the feature point can be improved.
[0061] In a third aspect, an embodiment of the present application provides a CCD calibration device,
[0062] A shooting module configured to acquire a first image obtained by a CCD camera capturing the calibration assembly when the calibration assembly moves on a transmission mechanism at a first moving speed;
[0063] An identification module configured to identify feature points among each of the first calibration patterns belonging to the same first calibration block from the first image;
[0064] A position determination module configured to determine the coordinate position in a calibration coordinate system of each feature point in the first calibration pattern belonging to the same first calibration block, wherein the calibration coordinate system is determined according to the position of the position determination mark in the first image;
[0065] A calculation module configured to determine the spacing between two adjacent feature points according to the position of a feature point in each of the first calibration patterns belonging to the same first calibration block; and
[0066] It includes a calibration module configured to obtain a transformation matrix of internal and external parameters of the CCD camera according to the above interval and the coordinate position in the calibration coordinate system of each feature point in the first image.
[0067] In a fourth aspect, an embodiment of the present application provides a computing device, said computing device comprising a processor and a memory in which computer program instructions are stored, and
[0068] The above processor implements the CCD camera calibration method described above when executing the above computer program instructions.
[0069] In a fifth aspect, an embodiment of the present application provides a computer storage medium, said computer storage medium has computer program instructions stored therein, and the above-described CCD camera calibration method is implemented in which said computer program instructions are executed by a processor.
[0070] Compared to the prior art, the CCD camera calibration system according to the embodiment of the present application installs a calibration assembly at a position where a roll of fabric is mounted on a transmission mechanism, thereby allowing the calibration assembly to move on the conveyor belt of the transmission mechanism and controlling the movement of the calibration assembly on the transmission mechanism. The CCD camera captures a calibration pattern unit on the calibration assembly to obtain a first image including a positioning mark and a plurality of uniformly arranged first calibration patterns, and can calculate an internal and external parameter conversion matrix of the CCD camera based on the first image. By capturing the first calibration patterns uniformly arranged on the calibration assembly, a conversion matrix of the internal and external parameters of the CCD camera can be obtained based on the first image and the corresponding first calibration pattern. When performing calibration of the CCD camera, there is no need to install an actual product on the transmission mechanism, thereby preventing the calibration result from being affected by product size errors and improving the accuracy of the calibration result. Brief explanation of the drawing
[0071] To more clearly explain the technical solution of the embodiments of the present application, the drawings to be used in the embodiments of the present application are briefly introduced below. Of course, the drawings described below are merely some embodiments of the present application, and those skilled in the art can obtain other drawings based on the attached drawings without creative effort. FIG. 1 is a schematic diagram of the structure of a CCD camera calibration system according to one embodiment of the present application. Figure 2 is a schematic diagram of the structure of the calibration assembly in the embodiment of Figure 1. Figure 3 is a schematic diagram of the structure of the verification belt in the embodiment of Figure 1. FIG. 4 is a flowchart of a CCD camera calibration method according to one embodiment of the present application. FIG. 5 is a flowchart of a CCD camera calibration method according to another embodiment of the present application. FIG. 6 is a flowchart of a CCD camera calibration method according to another embodiment of the present application. FIG. 7 is a flowchart of a CCD camera calibration method according to another embodiment of the present application. FIG. 8 is a flowchart of a CCD camera calibration method according to another embodiment of the present application. FIG. 9 is a flowchart of a CCD camera calibration method according to another embodiment of the present application. FIG. 10 is a fitting graph of distortion parameters of a CCD camera in one embodiment of the present application. FIG. 11 is a schematic diagram of the structure of a CCD calibration device according to one embodiment of the present application. FIG. 12 is a schematic diagram of the hardware structure of a computing device according to one embodiment of the present application. In the case of drawings, they are not drawn to actual scale. Specific details for implementing the invention
[0072] Hereinafter, the features of various aspects of the present application and exemplary embodiments are described in detail. To make the purpose, technical solution, and advantages of the present application clearer, the present application is described in more detail in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely for illustrating the present application and are not intended to limit the present application. It will be apparent to those skilled in the art that the present application can be practiced without some of these specific details. The following description of embodiments is intended merely to provide a better understanding of the present application by illustrating examples of the present application.
[0073] In this specification, relational terms such as first and second are used solely to distinguish one entity or operation from another entity or operation and do not require or imply that any relationship or order exists between such entities or operations. Additionally, the terms “comprising,” “containing,” or any other variations thereof mean a non-exclusive inclusion in which a process, method, article, or device comprising a series of elements includes not only such elements but also other elements not explicitly listed, or further include elements unique to such process, method, article, or device. Unless further limited, an element defined by the expression “comprising ……” does not exclude the existence of a separate identical element in the process, method, article, or device comprising said element.
[0074] It should be noted that, in the absence of conflicts, the embodiments of the present application and the features among the embodiments may be combined with one another. Hereinafter, embodiments will be described in detail in conjunction with the attached drawings.
[0075] With the continuous development and construction of production lines, the number of fixed-point transmission mechanisms in production lines is also increasing. To ensure the yield of mass-produced products, CCD detection must be performed on the products using CCD cameras. To guarantee the validity of the detection data, it is necessary to calibrate the CCD cameras.
[0076] Conventional CCD camera calibration methods typically involve attaching a detection label to a product and capturing the product and label together with a CCD camera to obtain the corresponding conversion matrix. However, due to size variations in the product, measurement errors are prone to occur in the conversion matrix obtained by the CCD camera from the product and the detection label, resulting in significant errors in the calibration results.
[0077] To solve the aforementioned technical problems, embodiments of the present application provide a CCD camera calibration system, a method, an apparatus, a computing device, and a storage medium. First, a CCD camera calibration system according to an embodiment of the present application is introduced below.
[0078] FIG. 1 is a schematic diagram of the structure of a transmission mechanism and a CCD camera in a CCD camera calibration system according to one embodiment of the present application. The CCD camera calibration system includes a transmission mechanism, a calibration assembly, a CCD camera (20), and a processing module (not shown).
[0079] Referring to FIG. 2, a calibration assembly may be installed on a transmission mechanism. The calibration assembly is equipped with a plurality of calibration pattern units (30) arranged in the longitudinal direction, and the calibration pattern unit (30) includes a first calibration block (31), and the first calibration block (31) includes a plurality of first calibration patterns (311) uniformly arranged with a positioning mark.
[0080] The transmission mechanism may be a device for transporting products. For example, the transmission mechanism may be a die cutter or other transmission device, and a conveyor belt (10) is installed on the transmission mechanism. When the transmission mechanism is operated, the calibration assembly may move on the conveyor belt (10) of the transmission mechanism, and the CCD camera (20) may capture the calibration assembly as it moves on the conveyor belt (10) to obtain a corresponding first image.
[0081] The processing module is connected to communicate with the CCD camera (20), and the processing module can implement calibration of the CCD camera (20) by obtaining the first image after the CCD camera (20) obtains the first image by shooting, and by calculating a conversion matrix of internal and external parameters of the CCD camera (20) according to the first image.
[0082] After acquiring a first image, the processing module can identify a calibration pattern unit (30) from the first image and, according to a first calibration block (31) within the calibration pattern unit (30), can determine a corresponding position determination mark (312) and a plurality of uniformly arranged first calibration patterns (311). The processing module can determine a corresponding calibration coordinate system according to the position determination mark (312) and, by calculating based on the coordinate positions of the plurality of first calibration patterns (311) in the calibration coordinate system and pixels corresponding to each of the plurality of first calibration patterns (311), obtain a conversion matrix of internal and external parameters of the CCD camera (20).
[0083] In this embodiment, a calibration assembly can be installed on a transmission mechanism so that the calibration assembly moves on the conveyor belt (10) of the transmission mechanism, and a CCD camera (20) can be installed at a fixed position next to the transmission mechanism to photograph a fixed area on the transmission mechanism. When the calibration assembly moves to the shooting area of the CCD camera (20), the CCD camera (20) can photograph the calibration assembly to obtain a first image including a calibration pattern unit (30). The first image includes a first calibration block (31), and the first calibration block (31) includes a position determining mark (312) and a plurality of first calibration patterns (311). The position determining mark (312) can characterize the movement direction of the calibration assembly and the calibration coordinate system of the first calibration block (31), and the plurality of first calibration patterns (311) are uniformly arranged according to a preset arrangement method. The processing module can determine the calibration coordinate system according to the position determination mark (312), and can determine the correspondence relationship between the first image and the calibration coordinate system according to the pixels corresponding to the first image and the coordinate positions originally corresponding to the first calibration patterns (311), thereby allowing the conversion matrix of the internal and external parameters of the CCD camera (20) to be calculated and obtained. By photographing the first calibration patterns (311) uniformly arranged in the calibration assembly, the conversion matrix of the internal and external parameters of the CCD camera (20) can be obtained according to the preset coordinate positions of the first image and the corresponding first calibration patterns (311), so that the calibration of the CCD camera (20) can be implemented without setting the actual product in the transmission mechanism, thereby preventing the calibration result from being affected by product size error and improving the accuracy of the calibration result.
[0084] As illustrated in FIG. 1, it can be understood that multiple CCD cameras (20) can be installed at multiple different locations next to the transmission mechanism to photograph and detect different transmission areas on the transmission mechanism. By photographing a calibration assembly moving on the transmission mechanism, the angle of the motion direction of the calibration assembly can be included in the calibration result of the CCD cameras (20). Compared to a static calibration method, the effect of inconsistency between coordinate systems during static calibration can be overcome.
[0085] For example, the calibration assembly may be configured in the shape of a belt, that is, the calibration assembly may include a calibration belt. For example, if the product transmitted by the transmission mechanism is a roll of fabric, a calibration belt may be installed according to the roll of fabric. Specifically, the inner diameter of the calibration belt matches the inner diameter of the roll of fabric, which is the actual product of the transmission mechanism, and the length of the calibration assembly is greater than the belt travel length of the transmission mechanism so that the calibration belt can be placed at the position where the roll of fabric is placed on the transmission mechanism, and also move on the transmission mechanism to cover the entire belt travel length of the transmission mechanism. Additionally, since a plurality of calibration pattern units (30) arranged in the longitudinal direction are installed on the calibration belt, when the calibration belt moves to cover the belt movement length of the transmission mechanism, each CCD camera (20) at a different position can capture a first image including at least one complete calibration pattern unit (30) in its shooting area, and can implement calibration of the CCD camera (20), and if a plurality of cameras are installed, simultaneous calibration of the plurality of cameras can be implemented.
[0086] It can also be understood that the calibration assembly can be directly attached to the conveyor belt (10) of the transmission mechanism. When the conveyor belt (10) is in operation, the CCD camera (20) can photograph the calibration assembly attached to the surface of the conveyor belt (10).
[0087] The CCD camera (20) is generally a line scan camera, and when there is a large difference between the mounting angle of the line scan camera and the direction of product movement on the transmission mechanism, the processing module can determine the angle between the mounting position of the CCD camera (20) and the direction of product movement on the transmission mechanism according to each first calibration pattern (311) in the captured first image, so that calibration of the CCD camera (20) can still be implemented even when there is a large difference between the mounting angle of the CCD camera (20) and the direction of product movement on the transmission mechanism.
[0088] Referring to FIG. 3, in some embodiments, the calibration system of the CCD camera (20) described above may further include a verification belt. A plurality of stripes (41) distributed at equal intervals are installed on the verification belt. A calibration assembly is installed on a transmission mechanism and moved, and a first image is taken to calculate a conversion matrix of internal and external parameters of the CCD camera (20). Afterward, the calibration assembly can be replaced using the verification belt. When the verification belt moves on the transmission mechanism, the CCD camera (20) can take a picture of the stripes (41) of the verification belt, and based on the captured image, the measurement interval of adjacent stripes (41) can be calculated using the calculated conversion matrix of internal and external parameters. Since the standard interval of adjacent stripes (41) is pre-set when the verification belt is made, it is possible to determine whether the calculated conversion matrix of internal and external parameters passes verification based on the measurement interval obtained by the shooting calculation and the original standard interval. After passing verification, the corresponding CCD camera (20) completes the calibration process. A verification belt is installed on a transmission mechanism and moved, and a CCD camera (20) is controlled to photograph the stripes (41) of the verification belt. In the photographed image, the measurement interval of adjacent stripes (41) can be calculated based on the pixels between adjacent stripes (41) and the conversion matrix of internal and external parameters of the CCD camera (20) obtained through the calibration assembly. By comparing the measurement interval with the standard interval between stripes, the accuracy of the current CCD camera (20) calibration result can be determined, and the calibration of the CCD camera (20) can be verified.
[0089] In some embodiments, the verification belt described above may use a white background film sheet, and the stripe (41) on the verification belt may be a black stripe (41). After the CCD camera (20) photographs the verification belt and obtains the captured image, the white background and the black stripe (41) can be identified in the image, thereby verifying the calibration process of the CCD camera (20). It can be understood that the background color of the verification belt or the color of the stripe (41) may be set to a different color as long as the background and the stripe (41) can be clearly identified in the captured image. The length of the verification belt described above may be set to be greater than the rollover length of the transmission mechanism, and the verification belt must be installed so as to be attached to the surface of the conveyor belt (10) of the transmission mechanism.
[0090] In some embodiments, the calibration assembly described above may be a calibration belt with a white background, and the color of the positioning mark (312) and the first calibration pattern (311) within the first calibration block (31) of the calibration pattern unit (30) of the calibration assembly may be set to black. Likewise, if the colors of the background and the pattern of the calibration assembly are set to white and black, respectively, the background and the first calibration block (31) can be clearly distinguished in an image captured by the CCD camera (20), thereby enabling the calculation of the conversion matrix of the internal and external parameters of the CCD camera (20) according to the identified first calibration block (31).
[0091] In some embodiments, the first calibration pattern may be set as a circle, that is, the calibration pattern unit includes a positioning mark and a plurality of uniformly arranged circular patterns. By setting the circular patterns and capturing them with a CCD camera (20), the center of each circular pattern can be accurately fitted in the captured image, and CCD calibration can be performed according to the center of each circular pattern. Compared to identifying the calibration using other patterns, the accuracy and reliability of the calibration and post-calibration measurement can be improved.
[0092] The area of each calibration pattern unit (30) on the calibration assembly can be set to 100 mm² or more, and the shape of the calibration pattern unit (30) can be set to a square or a rectangle. Among the plurality of first calibration patterns (311) within the calibration pattern unit (30), the distance between adjacent first calibration patterns (311) can be set to 0.05 mm or more.
[0093] In some embodiments, each calibration pattern unit (30) of the above-described calibration assembly may further include a second calibration block (32), and the second calibration block (32) may be installed on one side of the first calibration block (31) along the width direction of the calibration assembly. That is, each calibration pattern unit (30) includes a first calibration block (31) and a second calibration block (32) installed side by side along the width direction of the calibration assembly. The second calibration block (32) may be set in a rectangular pattern. After capturing and obtaining a first image including the first calibration block (31) and the second calibration block (32), the direction of the coordinate system can be quickly determined through the second calibration block (32) to implement the approximate position determination of the coordinates. After determining the approximate position, the precise coordinate position can be determined through the position mark (312) of the first calibration block (31), and the transformation matrix of the internal and external parameters can be calculated according to the pixel position of each first calibration pattern (311) of the first calibration block (31).
[0094] In some embodiments, each calibration pattern unit (30) of the above-described calibration assembly may include a plurality of first calibration blocks (31), and the plurality of first calibration blocks (31) may be arranged along the width direction of the calibration assembly.
[0095] As illustrated in FIG. 1, the transmission mechanism can segment the product during operation. By installing a plurality of first calibration blocks (31) in the width direction on the calibration assembly, the transmission mechanism can segment the calibration assembly. After the calibration assembly is separated into a plurality of sub-calibration assemblies, each sub-calibration assembly on the belt rod of the transmission mechanism can include at least one first calibration block (31). Then, the CCD camera (20) installed after the segmentation position of the transmission mechanism can photograph the first calibration block (31) on the sub-calibration assembly, thereby enabling calibration of the CCD camera (20) installed after the segmentation position of the transmission mechanism.
[0096] It can be understood that when the transmission mechanism separates the calibration assembly into two sub-calibration assemblies, two first calibration blocks (31) can be installed along the width direction of the calibration assembly, the two first calibration blocks (31) can be symmetrical along the axis of the calibration assembly, and the distance between the two first calibration blocks (31) can be set to 20 mm or more.
[0097] In some embodiments, as illustrated in FIG. 2, each calibration pattern unit (30) may include two first calibration blocks (31) and one second calibration block (32), and the two first calibration blocks (31) and one second calibration block (32) may be arranged along the width direction of the calibration assembly, and the second calibration block (32) may be installed between the two first calibration blocks (31). When the calibration assembly passes through a segmented position of the transmission mechanism, if the transmission mechanism separates the calibration assembly into two sub-calibration assemblies, the second calibration block (32) may be separated into two parts located in each of the two sub-calibration assemblies. That is, each of the two sub-calibration assemblies may include one complete first calibration block (31) and a partial second calibration block (32). After the CCD camera (20) installed after the segmented position of the transmission mechanism captures the first calibration block (31) of the sub-calibration assembly to obtain a first image, the processing module can also identify a part of the second calibration block (32) of the first image to enable rapid position determination of coordinates.
[0098] Likewise, the stripes (41) in the verification belt described above can be set as stripes (41) arranged in the width direction, and when the verification belt is moved on the transmission mechanism and passes through the segmentation position of the transmission mechanism and then the verification belt is separated into a plurality of sub-verification belts, the CCD camera (20) after the segmentation position of the transmission mechanism can also photograph the stripes (41) on the sub-verification belts, thereby enabling the verification process of the CCD camera (20) for calibration.
[0099] FIG. 4 shows a flowchart of a CCD camera calibration method according to one embodiment of the present application. The CCD camera calibration method is applied to a CCD calibration device, and the CCD camera calibration method includes the following steps.
[0100] In S410, a first image is obtained, said first image is an image obtained by a CCD camera capturing the calibration assembly when the calibration assembly moves on a transmission mechanism at a first moving speed.
[0101] In S420, feature points among each of the first calibration patterns belonging to the same first calibration block are identified from the first image.
[0102] In S430, the coordinate position in the calibration coordinate system of each feature point in the first calibration pattern belonging to the same first calibration block is determined, wherein the calibration coordinate system is determined according to the position of the position determination mark in the first image.
[0103] In S440, the spacing between two adjacent feature points is determined according to the position of the feature point in each of the first calibration patterns belonging to the same first calibration block.
[0104] In S450, a transformation matrix of the internal and external parameters of the CCD camera is obtained according to the interval and the coordinate position in the calibration coordinate system of each feature point in the first image.
[0105] In this embodiment, the CCD calibration device can obtain a first image by controlling a CCD camera to photograph a calibration assembly. The device can identify feature points of each first calibration pattern within the same first calibration block, determine a calibration coordinate system based on a position determination mark within the same first calibration block, and then determine the corresponding position of each feature point in the calibration coordinate system. Since the arrangement method of each first calibration pattern within the same first calibration block is pre-set, the spacing between feature points of each first calibration pattern can also be determined according to the corresponding first calibration pattern. Depending on the position of the feature point in each first calibration pattern, the spacing between two adjacent feature points can be determined. In the first image obtained by photographing, depending on the coordinate position of the pixel corresponding to each first calibration pattern in the calibration coordinate system, the coordinate position of the pixel corresponding to each feature point in the calibration coordinate system can be determined, and thus the pixel distance between each feature point can be calculated. A transformation matrix of the internal and external parameters of the CCD camera can be calculated and obtained based on the spacing and pixel distance between each feature point. By capturing a first calibration pattern uniformly placed in a calibration assembly, a transformation matrix of the internal and external parameters of the CCD camera can be obtained based on the preset coordinate positions of the first image and the corresponding first calibration pattern. Since there is no need to install and move the actual product on the transmission mechanism when calibrating the CCD camera, the calibration result is prevented from being affected by product size errors, and the accuracy of the calibration result is improved.
[0106] In S410, the calibration assembly may be installed on a transmission mechanism and may move at a first moving speed on a moving belt of the transmission mechanism. The device may control a CCD camera to photograph the calibration assembly as it moves to obtain a first image.
[0107] In S420, a first image captured by a CCD camera includes at least one first calibration block, and each first calibration block on the calibration assembly includes a positioning mark and a plurality of first calibration patterns. After acquiring the first image, the device can identify each first calibration pattern within the same first calibration block from the first image and determine a corresponding feature point according to each first calibration pattern. The first calibration pattern may be a polygon, a circle, an annular shape, an ellipse, etc. For example, if the first calibration pattern is a triangle, the corresponding feature point may be the centroid, circumcenter, orthocenter, incenter, and excenter of the triangle. If the first calibration pattern is a circle, the corresponding feature point may be the centroid of the circle. The positioning mark may be a triangle pattern, and the device can determine the direction of the calibration coordinate system according to the pattern corresponding to the positioning mark in the first image.
[0108] In S430, the device can determine a feature point corresponding to each first calibration pattern within the same first calibration block, and then determine a calibration coordinate system in the first image according to the position of a position determination mark within the corresponding first calibration block in the first image. After determining the calibration coordinate system, the device can determine the coordinate position of each feature point in the calibration coordinate system according to the corresponding pixel of each feature point in the first image. Here, the coordinate position of the feature point in the calibration coordinate system refers to the pixel coordinate of the feature point.
[0109] In S440, the device can determine the coordinate positions of feature points in each first calibration pattern belonging to the same first calibration block in the calibration coordinate system, and then determine the spacing between two adjacent feature points.
[0110] In the calibration assembly described above, a plurality of first calibration patterns within the same first calibration block are pre-set, and it can be understood that by determining the coordinate position of each first calibration pattern in the calibration coordinate system, the spacing between any two first calibration patterns can be determined. For example, when a plurality of first calibration patterns are arranged in an M*N array within the same first calibration block, if it is determined that two adjacent first calibration patterns are located in the same row based on the coordinate position of each first calibration pattern in the calibration coordinate system, the spacing between two adjacent first calibration patterns can be determined as a column spacing. If it is determined that two adjacent first calibration patterns are located in the same column, the spacing between two adjacent first calibration patterns can be determined as a row spacing. Similarly, after determining the spacing between two adjacent first calibration patterns, the device can determine the spacing between two adjacent feature points based on the position of the feature points in the first calibration patterns. For example, if the first calibration pattern is circular and the feature point is centrifugal, for two adjacent circles in the same row, the distance between the two centrifugals is the sum of the distance between the two circles and the radii of the two circles.
[0111] In S450, the device can determine feature points corresponding to each first calibration pattern belonging to the same first calibration block in the first image, and then determine the pixel distance between each feature point according to the pixel coordinates corresponding to the feature point in the calibration coordinate system. The spacing between each feature point can be determined according to the arrangement method of each first calibration pattern. Based on the spacing between each feature point and the pixel distance between each feature point, a transformation matrix of the internal and external parameters of the CCD camera can be calculated.
[0112] As an optional embodiment, referring to FIG. 5, to verify the calculated transformation matrix, the following steps after S450 described above may be further included.
[0113] In S510, a second image is obtained, wherein the second image is obtained by the CCD camera photographing the verification belt when the calibration assembly is replaced with a verification belt and the verification belt moves at a second moving speed, and the verification belt has a plurality of stripes distributed at equal intervals installed thereon.
[0114] In S520, the measurement interval between adjacent stripes is determined according to the position of the stripe in the second image and the transformation matrix.
[0115] In S530, the transformation matrix of the CCD camera is verified according to the standard interval between the measurement interval and adjacent stripes.
[0116] In this embodiment, when the calibration assembly moves at a first speed in the transmission mechanism, the device can control a CCD camera to photograph the calibration assembly and calculate a conversion matrix of the internal and external parameters of the CCD camera based on the first captured image. After generating the conversion matrix of the internal and external parameters of the CCD camera, the calibration assembly on the transmission mechanism is replaced with a verification belt, and when the verification belt moves at a second speed in the transmission mechanism, the device can control a CCD camera to photograph the verification belt and perform verification based on the second captured image to check whether the conversion matrix of the CCD camera satisfies the precision requirements.
[0117] In S510, the device can control a CCD camera to photograph a calibration assembly on a transmission mechanism and then replace the calibration assembly with a verification belt, and a plurality of stripes distributed at equal intervals can be installed on the verification belt. When the verification belt moves at a second travel speed on the transmission mechanism, the device can control a CCD camera to photograph the verification belt and obtain a second image.
[0118] In order to ensure shooting accuracy when the CCD camera captures the calibration assembly and the verification belt, the first moving speed and the second moving speed can be set to be the same; that is, by setting the moving speeds of the calibration assembly and the verification belt in the transmission mechanism to be the same, pixel errors between the first image and the second image captured due to differences in the moving speeds of the calibration assembly and the verification belt in the transmission mechanism can be avoided. Here, the first moving speed and the second moving speed can be set to 3 m / min.
[0119] In S520, the device can acquire a second image, identify each stripe in the second image, and determine a pixel location corresponding to each stripe in the second image. Based on the pixel locations of two adjacent stripes, the pixel distance between two adjacent stripes can be determined, and the measurement interval between two adjacent stripes can be calculated using the transformation matrix obtained from the calibration process described above and the pixel distance between two adjacent stripes.
[0120] In S530, since multiple stripes on the verification belt are distributed at equal intervals and the spacing between adjacent stripes is a preset standard interval, the device can directly acquire the corresponding standard interval and compare the standard interval with the measurement interval to verify whether the conversion matrix of the internal and external parameters of the CCD camera meets the precision requirements.
[0121] As an optional embodiment, referring to FIG. 6, to determine the measurement interval of adjacent stripes, the above-described S520 may include the following steps.
[0122] In S610, the coordinate position of each stripe's pixel in the calibration coordinate system is determined according to the position of the stripe in the second image.
[0123] In S620, the measurement interval between adjacent stripes is calculated and obtained based on the coordinate position of each stripe's pixel in the calibration coordinate system and the transformation matrix.
[0124] In this embodiment, the device can determine the coordinate position of each stripe's pixel in the calibration coordinate system according to the position of the stripe in the second image, and can determine the pixel distance between adjacent stripes, i.e., the number of pixels, according to the coordinate position of each stripe's pixel, and can convert the pixel distance between adjacent stripes into a measurement interval between adjacent stripes through a conversion matrix obtained by the above-described CCD camera capturing the calibration assembly.
[0125] In S610, the device can identify stripes in the second image and then determine the coordinate positions of the pixels of each stripe in the calibration coordinate system according to the position of each stripe in the second image. The corresponding coordinate positions are the pixel coordinates corresponding to each stripe.
[0126] In S620, the device can determine the coordinate position of the pixel of each stripe in the calibration coordinate system, and then determine the pixel distance between adjacent stripes according to the coordinates of the pixel corresponding to each stripe. It can be understood that the pixel distance between adjacent stripes may be the pixel distance between two adjacent sides of the two stripes. The device can also determine a stripe feature point corresponding to each stripe, and the pixel distance between adjacent stripes may be the pixel distance between two adjacent stripe feature points. After determining the pixel distance between adjacent stripes, the measurement interval between adjacent stripes can be calculated based on the pixel distance between adjacent stripes according to the transformation matrix of the CCD camera.
[0127] As an optional embodiment, referring to FIG. 7, in order to verify whether the transformation matrix satisfies the requirements, the above-described S530 may include the following steps.
[0128] In S710, the calibration error is calculated based on the standard interval between adjacent stripes and the measurement interval.
[0129] In S720, each calibration error is compared with a preset error threshold.
[0130] In S730, if the number of calibration errors among each calibration error that is greater than a preset error threshold reaches a preset verification threshold, it is determined that the transformation matrix has failed verification.
[0131] In this embodiment, the device can obtain a calibration error based on the standard spacing and measurement interval of adjacent stripes, and can verify the conversion matrix obtained in this calibration based on the calibration error and a preset error threshold. If the conversion matrix passes the verification, the calibration process is terminated and the conversion matrix is saved. If the conversion matrix fails the verification, a verification failure message is sent to the user, and calibration is performed again on the CCD camera. By installing a verification belt to perform a second verification, the conversion matrix obtained through CCD camera calibration can be made to meet precision requirements.
[0132] In S710, the device can obtain the measurement interval and standard interval between each adjacent stripe, and then calculate the calibration error corresponding to each adjacent stripe. The calibration error may be the difference between the standard interval and the measurement interval.
[0133] In S720, the device can calculate the calibration error corresponding to each adjacent stripe, and then compare each calibration error with a preset error threshold to determine whether each calibration error is greater than the preset error threshold.
[0134] In S730, the device can sequentially compare multiple calibration errors with a preset error threshold and, whenever it is determined that a calibration error is greater than the preset error threshold, perform a count to statistically determine the number of calibration errors greater than the preset error threshold. When the count value reaches a preset verification threshold, it indicates that the product cannot be accurately calibrated because the corresponding transformation matrix has large errors at multiple different locations; therefore, the device can determine that the transformation matrix calculated in this calibration process failed verification.
[0135] After comparing the calibration error corresponding to all adjacent stripes with a preset error threshold, if the number of calibration errors greater than the preset error threshold does not reach a preset verification threshold, it indicates that the calibration accuracy of the transformation matrix is high, and thus the device can determine that the transformation matrix calculated in this calibration process has passed verification.
[0136] In an optional embodiment, the device may also determine whether the transformation matrix passes verification based on the number of consecutive calibration errors that are greater than a preset error threshold. For example, if a plurality of consecutive calibration errors are all greater than the preset error threshold, it may determine whether the consecutive number reaches a preset verification threshold. For example, if the preset error threshold is 0.05, it may determine whether there are at least four consecutive calibration errors greater than the preset error threshold, and if at least four consecutive calibration errors are all greater than 0.05, it may be determined that the transformation matrix has not passed verification.
[0137] As an optional embodiment, referring to FIG. 8, in order to reduce the number of verifications and increase verification efficiency, the following steps may be included prior to the above-described S510.
[0138] In S810, a distortion parameter fitting curve of the CCD camera is calculated according to the coordinate position of each feature point in the first image in the calibration coordinate system.
[0139] In S820, the fitting precision of the distortion parameter fitting curve is determined according to the coordinate position of each feature point in the first image in the calibration coordinate system and the distortion parameter fitting curve.
[0140] The above-described S510 may include the following steps.
[0141] In S830, when the fitting precision reaches a preset precision threshold, a second image is acquired.
[0142] In this embodiment, the device captures a calibration assembly using a CCD camera, calculates a transformation matrix of the CCD camera, calculates and generates a distortion parameter fitting curve of the CCD camera based on each feature point in the first image, and determines the fitting precision of the said distortion parameter fitting curve. If the fitting precision satisfies a preset requirement, the calibration assembly is replaced with a verification belt, and a second image is captured to perform verification. If the fitting precision of the distortion parameter fitting curve does not satisfy the preset requirement, it can be determined directly that the corresponding transformation matrix does not satisfy the calibration precision requirement without the need to replace the calibration assembly with a verification belt. At this time, the calibration assembly can be reinstalled on the transmission mechanism, and the first image can be captured again to perform calibration. Before verification through the verification belt, the transformation matrix can be directly selected based on the fitting precision of the CCD camera distortion parameter fitting curve. If the preset requirements are not met, it can be directly determined that the transformation matrix obtained in this calibration process does not meet the calibration precision requirements. Since there is no need to set up an additional verification belt for verification, the number of verifications can be reduced and verification efficiency improved.
[0143] In S810, the device can determine the coordinate position of each feature point in the calibration coordinate system and then determine the pixel coordinates corresponding to each feature point. Since the CCD camera is a line scan camera, different positions of the line scan camera correspond to different distortion parameters. The distortion parameter corresponding to each position of the line scan camera can be determined based on the pixel coordinates corresponding to each feature point and the pixel distance between adjacent feature points.
[0144] The device can generate multiple samples according to distortion parameters corresponding to different positions of the CCD camera, and by performing curve fitting based on the multiple samples, it can obtain a fitting curve of the position and distortion parameters, and the fitting curve is the distortion parameter fitting curve of the CCD camera.
[0145] In S820, after determining the distortion parameter fitting curve of the CCD camera, the fitting precision of the distortion parameter fitting curve can be determined based on the coordinate position of each feature point in the first image in the calibration coordinate system and the distortion parameter fitting curve. For example, the fitting precision of the distortion parameter fitting curve can be characterized using the goodness of fit. The statistical amount of the goodness of fit is a coefficient that can determine the distortion parameter fitting curve.
[0146] Here, the calculation method for the determinable coefficients is as follows.
[0147] Determine the sample data set as (x1, y1), (x2, y2), ..., (xn, yn).
[0148] Here, x1, x2, ...xn are different position coordinates of the CCD camera, and y1, y2, ...yn are distortion parameters corresponding to different position coordinates.
[0149] When obtaining the distortion parameter fitting curve of a CCD camera by curve fitting, the corresponding fitting predicted distortion parameter values for x1, x2, ..., xn are am.
[0150] The average value of the fitting prediction skew parameter is am
[0151] The residuals of the fitting prediction skew parameters are am.
[0152] Total sum of squares: am.
[0153] Sum of squared residuals: am.
[0154] The determinable coefficients are am.
[0155] That is, when characterizing the fitting precision of a distortion parameter fitting curve using the goodness of fit, the determinable coefficients of the distortion parameter fitting curve can be calculated based on the distortion parameter fitting curve and the samples corresponding to each feature point.
[0156] In S830, after calculating the fitting precision of the distortion parameter fitting curve, the fitting precision of the distortion parameter fitting curve can be compared with a preset precision threshold, and if the fitting precision reaches the preset precision threshold, it can be determined that the fitting degree of the distortion parameter fitting curve is high, and the calibration assembly can be replaced with a verification belt to perform a verification process for CCD camera calibration.
[0157] For example, when characterizing the fitting precision of a distortion parameter fitting curve using the fit value, a preset precision threshold can be set to 0.95, and after calculating the determinable coefficients of the distortion parameter fitting curve, it can be determined whether the determinable coefficients are greater than the preset precision threshold. If the determinable coefficients reach the preset precision threshold, the calibration assembly can be replaced with a verification belt, and the transformation matrix can be verified. If the determinable coefficients are smaller than the preset precision threshold, the verification process is not performed, and the CCD camera is recalibrated.
[0158] When multiple CCD cameras are installed next to a transmission mechanism, a distortion parameter fitting curve of the corresponding CCD camera is generated according to the distortion parameter at each position of each CCD camera, and the fitting precision can be calculated according to the fitting parameter fitting curve. As shown in FIG. 10, two CCD cameras are selected from the multiple CCD cameras, and the fitting precision of the distortion parameter fitting curves of the two CCD cameras is calculated to be 0.9836 and 0.9683, respectively. When a preset precision threshold is set to 0.95, since the fitting precision of the distortion parameter fitting curves corresponding to these two CCD cameras is greater than the preset precision threshold, it can be determined that the distortion parameter fitting curves of these two CCD cameras satisfy the precision requirements, and a verification belt can be additionally installed and the verification belt can be photographed with a CCD camera to perform verification.
[0159] As an optional embodiment, referring to FIG. 9, in order to implement rapid and approximate positioning, the calibration pattern unit described above may further include a second calibration block, and the second calibration block is installed on one side of the first calibration block along the width direction of the calibration assembly. Before S420, the following steps may be further included.
[0160] In S910, a first calibration block belonging to the same calibration pattern unit is positioned according to the information of the second calibration block in the first image.
[0161] In this embodiment, the device can acquire a first image, quickly identify the pattern of the second calibration block in the first image, and quickly determine the direction of the calibration coordinate system according to the pattern to implement the approximate position determination of the coordinates.
[0162] The second calibration block can be set as a rectangular pattern and the pattern color can be set to black. Compared to the first calibration block which includes a positioning mark and a plurality of first calibration patterns, the device can identify the second calibration block more quickly in the first image, thereby enabling rapid and approximate positioning.
[0163] As an optional embodiment, in a CCD camera calibration system, a plurality of CCD cameras may be installed at various locations next to a transmission mechanism, and when a calibration assembly is installed on a conveyor belt of the transmission mechanism and moves, images captured by the CCD cameras may be monitored. The operation of the transmission mechanism may be controlled to stop when all of the plurality of CCD cameras have captured a calibration pattern unit on the calibration assembly. At this time, images captured by each CCD camera may be checked individually, and it may be determined whether the image captured by the CCD contains a complete calibration pattern unit, and whether the background and the first calibration block can be identified from the image captured by the CCD. For example, the device may pre-set a range of grayscale difference between the background and the first calibration block. If the grayscale difference between the background and the first calibration block in the captured image satisfies the corresponding grayscale difference range, the device determines that the background and the first calibration block can be identified from the image, and thus can implement calibration of the CCD camera. If the difference between the background gradation and the gradation of the first calibration block in the captured image is too small, the background color of the calibration assembly or the pattern color of the first calibration block must be adjusted so that the difference between the background gradation and the gradation of the first calibration block satisfies the gradation difference range. For example, the gradation difference range may be set such that the difference between the background gradation and the gradation of the first calibration block is 30 or more, and the gradation of the first calibration block is lower than the background gradation.
[0164] The present application also provides a specific implementation method of a CCD calibration device correspondingly based on the CCD camera calibration method provided by the above-described embodiment. Reference may be made to the embodiments below.
[0165] First, referring to FIG. 11, a CCD calibration device (1100) according to an embodiment of the present application includes the following modules.
[0166] A shooting module (1101) configured to acquire a first image obtained by a CCD camera capturing the calibration assembly when the calibration assembly moves on a transmission mechanism at a first moving speed;
[0167] An identification module (1102) configured to identify feature points among each of the first calibration patterns belonging to the same first calibration block from the first image;
[0168] A position determination module (1103) configured to determine the coordinate position in a calibration coordinate system of each feature point in the first calibration pattern belonging to the same first calibration block, wherein the calibration coordinate system is determined according to the position of the position determination mark in the first image;
[0169] A calculation module (1104) configured to determine the spacing between two adjacent feature points according to the position of a feature point in each of the first calibration patterns belonging to the same first calibration block; and
[0170] A calibration module (1105) configured to obtain a transformation matrix of internal and external parameters of the CCD camera according to the above interval and the coordinate position of each feature point in the first image in the calibration coordinate system.
[0171] In this embodiment, the device can obtain a first image by controlling a CCD camera to photograph a calibration assembly. The device can identify feature points of each first calibration pattern within the same first calibration block, determine a calibration coordinate system based on a position determination mark within the same first calibration block, and then determine the position corresponding to each feature point in the calibration coordinate system. Since the spacing between each first calibration pattern within the same first calibration block is pre-set, the spacing between feature points of each first calibration pattern can also be pre-determined. Depending on the position of the feature point in each first calibration pattern, the spacing between two adjacent feature points can be determined. In the first image obtained by photographing, the coordinate position of the pixel corresponding to each first calibration pattern in the calibration coordinate system can be determined based on the coordinate position of the pixel corresponding to each feature point in the calibration coordinate system, and thus the pixel distance between each feature point can be calculated. Based on the spacing between each feature point and the pixel distance, the transformation matrix of the internal and external parameters of the CCD camera can be calculated. By capturing a first calibration pattern uniformly distributed in a calibration assembly, a conversion matrix of internal and external parameters of a CCD camera can be obtained according to the preset coordinate positions of the first image and the corresponding first calibration pattern. Since there is no need to install and move an actual product on a transmission mechanism when calibrating the CCD camera, the calibration result is prevented from being affected by product size errors, thereby improving the accuracy of the calibration result.
[0172] As an implementation method of the present application, in order to verify the calculated conversion matrix, the above-described CCD calibration device (1100) may further include the following module.
[0173] A second shooting module configured to acquire a second image, wherein the second image is an image obtained by the CCD camera capturing the verification belt when the calibration assembly is replaced by a verification belt and the verification belt moves at a second moving speed, and wherein a plurality of stripes distributed at equal intervals are installed on the verification belt;
[0174] A second calculation module configured to determine the measurement interval between adjacent stripes according to the position of the stripe in the second image and the transformation matrix; and
[0175] A verification module configured to verify the conversion matrix of the CCD camera according to the standard interval between the above measurement interval and adjacent stripes.
[0176] As an implementation method of the present application, to determine the measurement interval of adjacent stripes, the second calculation module described above may further include the following unit.
[0177] A coordinate unit configured to determine the coordinate position of a pixel of each stripe in the calibration coordinate system according to the position of the stripe in the second image; and
[0178] A calculation unit configured to calculate the measurement interval between adjacent stripes according to the pixel coordinate position of each stripe in the above calibration coordinate system and the above transformation matrix.
[0179] As an implementation method of the present application, in order to verify whether the transformation matrix satisfies the requirements, the verification module described above may further include the following unit.
[0180] An error unit configured to calculate a calibration error based on the standard interval and measurement interval between adjacent stripes;
[0181] A comparison unit configured to compare each calibration error with a preset error threshold; and
[0182] A verification unit configured to determine that the transformation matrix has failed verification when the number of calibration errors among each calibration error that is greater than a preset error threshold reaches a preset verification threshold.
[0183] As an implementation method of the present application, in order to reduce the number of verifications and increase verification efficiency, the CCD calibration device (1100) may further include the following module.
[0184] A fitting module configured to calculate a distortion parameter fitting curve of the CCD camera according to the coordinate position of each feature point in the first image in the calibration coordinate system; and
[0185] A precision module configured to determine the fitting precision of the distortion parameter fitting curve according to the coordinate position in the calibration coordinate system of each feature point in the first image and the distortion parameter fitting curve.
[0186] The aforementioned second shooting module is also configured to acquire a second image when the fitting precision reaches a preset precision threshold.
[0187] As an embodiment of the present application, in order to achieve rapid and approximate position determination, the calibration pattern unit may further include a second calibration block, the second calibration block is installed on one side of the first calibration block along the width direction of the calibration assembly, and the identification module (1102) is also configured to position the first calibration block belonging to the same calibration pattern unit according to the information of the second calibration block in the first image.
[0188] The CCD calibration device (1000) according to the embodiment of the present application can implement each step of the method embodiment of FIGS. 4 to 9, and is not described repeatedly here to avoid duplication.
[0189] FIG. 12 shows a schematic diagram of the hardware structure of a computing device according to an embodiment of the present application.
[0190] The computing device may include a processor (1201) and a memory (1202) in which computer program instructions are stored.
[0191] Specifically, the processor (1201) described above may include a central processing unit (CPU) or an application-specific integrated circuit (ASIC), or may be composed of one or more integrated circuits capable of implementing embodiments of the present application.
[0192] The memory (1202) may include a large amount of memory for data or commands. As an example, not limited to, the memory (1202) may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory (1202) may include a removable medium or a non-removable (or fixed) medium. Where appropriate, the memory (1202) may be located inside or outside the integrated gateway disaster prevention device. In a specific embodiment, the memory (1202) is a non-volatile solid-state memory.
[0193] Memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical / type memory storage devices. Accordingly, memory generally comprises one or more types (non-transient) computer-readable storage media (e.g., memory devices) on which software containing computer-executable instructions is encoded, and when said software is executed (e.g. by one or more processors), it may be operated to perform the operation described with reference to the method according to one aspect of the present disclosure.
[0194] The processor (1201) implements a CCD camera calibration method of any one of the embodiments described above by reading and executing computer program instructions stored in memory (1202).
[0195] In one example, the computing device may further include a communication interface (1203) and a bus (1210). Here, as shown in FIG. 12, the processor (1201), memory (1202), and communication interface (1203) are connected via the bus (1210) to communicate with each other.
[0196] The communication interface (1203) is primarily used to implement communication between each module, device, unit and / or device in the embodiments of the present application.
[0197] The bus (1210) includes hardware, software, or both that connect components of a computing device to one another. As examples, but not limited to, the bus includes an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an unlimited bandwidth interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, the bus (1210) may include one or more buses. Although the embodiments of this application describe and exemplify a specific bus, this application may consider any suitable bus or interconnection.
[0198] Based on the above-described embodiment, the computing device can implement the CCD camera calibration method and apparatus described in conjunction with FIGS. 1 to 6.
[0199] In addition, in conjunction with the CCD camera calibration method of the above-described embodiment, the embodiment of the present application may provide a computer storage medium for implementing the same. Computer program instructions are stored in the said computer storage medium, and when said computer program instructions are executed by a processor, any one of the above-described embodiments' CCD camera calibration methods can be implemented and the same technical effect obtained; therefore, to avoid duplication, it is not described repeatedly here. Here, the above-described computer-readable storage medium may include non-transient computer-readable storage media such as Read Only Memory (abbreviated as ROM), Random Access Memory (abbreviated as RAM), magnetic disks, or optical disks, but is not limited thereto.
[0200] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the drawings. For the sake of brevity, a detailed description of known methods is omitted herein. In the embodiments described above, several specific steps have been described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated, and those skilled in the art may make various changes, modifications, and additions, or change the order of the steps, after understanding the intent of the present application.
[0201] The functional blocks illustrated in the structural block diagram above may be implemented in hardware, software, firmware, or a combination thereof. When implemented in hardware, they may be, for example, electronic circuits, application-specific integrated circuits (ASICs), suitable firmware, plug-ins, function cards, etc. When implemented in software, the elements of the application are program or code segments for performing necessary tasks. The program or code segments may be stored on a machine-readable medium. The “machine-readable medium” may include any medium capable of storing information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, etc. The code segments may be downloaded via a computer network such as the Internet or an intranet.
[0202] It should be noted that the exemplary embodiments described in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the steps described above; that is, the steps may be performed in the order mentioned in the embodiments, or differently from the order of the embodiments, or multiple steps may be performed simultaneously.
[0203] Each aspect of the present disclosure has been described above with reference to flowcharts and / or block diagrams of methods, apparatuses, and computer program products according to embodiments of the present disclosure. It should be understood that each block of a flowchart and / or block diagram, and combinations of each block of a flowchart and / or block diagram, may be implemented by computer program instructions. Such computer program instructions are provided to a processor of a general-purpose computer, a dedicated computer, or other programmable data processing device to generate a machine, thereby enabling such instructions executed by the processor of the computer or other programmable data processing device to implement a specified function / operation of one or more blocks of a flowchart and / or block diagram. Such a processor may be, but is not limited to, a general-purpose processor, a dedicated processor, a special application processor, or a field-programmable logic circuit. It should also be understood that each block of a block diagram and / or flowchart, and combinations of blocks of a block diagram and / or flowchart, may be implemented by dedicated hardware that performs a specified function or operation, or by a combination of dedicated hardware and computer instructions.
[0204] The above is merely a specific embodiment of the present application, and for the convenience and brevity of explanation, the specific working process of the system, module, and unit described above is not repeated here, as it is obvious to those skilled in the art that the corresponding process of the method embodiment described above can be referenced. The scope of protection of the present application is not limited thereto, and those skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and it should be understood that all such modifications or substitutions are included within the scope of protection of the present application.
Claims
Claim 1 A CCD camera calibration system comprises: a transmission mechanism; a calibration assembly installed on the transmission mechanism, wherein the calibration assembly is equipped with a plurality of calibration pattern units arranged in a longitudinal direction, and the calibration pattern unit includes a first calibration block, and the first calibration block includes a positioning mark and a plurality of uniformly arranged first calibration patterns; a CCD camera for obtaining a first image by photographing the calibration assembly when the calibration assembly moves; and a processing module connected to communicate with the CCD camera and for calculating a conversion matrix of internal and external parameters of the CCD camera according to the first image. A CCD camera calibration system comprising a verification belt having a plurality of stripes distributed at equal intervals, which is used to replace the calibration assembly after obtaining a conversion matrix of internal and external parameters of the CCD camera, and which is also used to acquire a second image by photographing the verification belt as the verification belt moves after the calibration assembly is replaced by the verification belt, and the processing module is also used to determine a measurement interval between adjacent stripes according to the position of the stripes in the second image and the conversion matrix, and to verify the conversion matrix of the CCD camera according to the measurement interval and the standard interval between adjacent stripes. Claim 2 A CCD camera calibration system according to claim 1, wherein the verification belt is a white background film sheet and the stripe is a black stripe. Claim 3 A CCD camera calibration system according to claim 1, wherein the calibration assembly includes a calibration belt with a white background, and the color of the first calibration pattern is black. Claim 4 In paragraph 3, the first calibration pattern is circular, in a CCD camera calibration system. Claim 5 A CCD camera calibration system according to claim 1, wherein the calibration pattern unit further comprises a second calibration block installed on one side of the first calibration block along the width direction of the calibration assembly. Claim 6 A CCD camera calibration system according to claim 1, wherein the calibration pattern unit comprises a plurality of first calibration blocks arranged along the width direction of the calibration assembly, and the calibration assembly is separated into a plurality of sub-calibration assemblies after being segmented by the transmission mechanism, and each sub-calibration assembly comprises at least one first calibration block. Claim 7 A method for calibrating a CCD camera comprises: acquiring a first image, which is an image obtained by a CCD camera capturing the calibration assembly when the calibration assembly moves on a transmission mechanism at a first moving speed, wherein the calibration assembly is equipped with a plurality of calibration pattern units arranged in a longitudinal direction, and the calibration pattern unit includes a first calibration block, and the first calibration block includes a position determination mark and a plurality of uniformly arranged first calibration patterns; identifying a feature point among each of the first calibration patterns belonging to the same first calibration block from the first image; determining the coordinate position of the feature point among each of the first calibration patterns belonging to the same first calibration block in a calibration coordinate system, wherein the calibration coordinate system is determined according to the position of the position determination mark in the first image; and determining the spacing between two adjacent feature points according to the position of the feature point among each of the first calibration patterns belonging to the same first calibration block. A CCD camera calibration method comprising: obtaining a transformation matrix of internal and external parameters of the CCD camera according to the interval and the coordinate position of each feature point in the first image in the calibration coordinate system; replacing the calibration assembly with a verification belt having a plurality of stripes distributed at equal intervals, and acquiring a second image which is an image obtained by the CCD camera photographing the verification belt when the verification belt moves at a second moving speed; determining a measurement interval between adjacent stripes according to the position of the stripes in the second image and the transformation matrix; and verifying the transformation matrix of the CCD camera according to the measurement interval and the standard interval between adjacent stripes. Claim 8 A CCD camera calibration method according to claim 7, further comprising: calculating a distortion parameter fitting curve of the CCD camera according to the coordinate position of each feature point in the first image in the calibration coordinate system before acquiring the second image; and determining the fitting precision of the distortion parameter fitting curve according to the coordinate position of each feature point in the first image in the calibration coordinate system and the distortion parameter fitting curve; wherein acquiring the second image includes acquiring the second image when the fitting precision reaches a preset precision threshold. Claim 9 A CCD camera calibration method according to claim 7, wherein determining the measurement interval between adjacent stripes according to the position of the stripe in the second image and the transformation matrix comprises: determining the coordinate position of each stripe's pixel in the calibration coordinate system according to the position of the stripe in the second image; and calculating the measurement interval between adjacent stripes according to the coordinate position of each stripe's pixel in the calibration coordinate system and the transformation matrix. Claim 10 A method for calibrating a CCD camera according to claim 7, wherein verifying the conversion matrix of the CCD camera according to the standard interval between adjacent stripes and the measurement interval comprises: calculating a calibration error according to the standard interval between adjacent stripes and the measurement interval; comparing each calibration error with a preset error threshold; and determining that the conversion matrix has not passed verification if the number of calibration errors among each calibration error that is greater than the preset error threshold reaches a preset verification threshold. Claim 11 A CCD camera calibration method according to claim 7, wherein the calibration pattern unit further comprises a second calibration block installed on one side of the first calibration block along the width direction of the calibration assembly, and, before identifying feature points among the first calibration patterns belonging to the same first calibration block from the first image, the first calibration block belonging to the same calibration pattern unit is positioned according to information of the second calibration block in the first image. Claim 12 A CCD camera calibration method according to claim 11, wherein the second calibration block is rectangular. Claim 13 A CCD camera calibration method according to claim 7, wherein the first calibration pattern is circular and the feature point is centrifugal. Claim 14 A CCD calibration device comprises: a first shooting module configured to acquire a first image obtained by a CCD camera capturing the calibration assembly when the calibration assembly moves on a transmission mechanism at a first moving speed, wherein the calibration assembly has a plurality of calibration pattern units arranged in a longitudinal direction, and the calibration pattern unit includes a first calibration block, and the first calibration block includes a positioning mark and a plurality of uniformly arranged first calibration patterns; an identification module configured to identify a feature point among each of the first calibration patterns belonging to the same first calibration block from the first image; a positioning module configured to determine the coordinate position in a calibration coordinate system of a feature point among each of the first calibration patterns belonging to the same first calibration block, wherein the calibration coordinate system is determined according to the position of the positioning mark in the first image; and a position of a feature point among each of the first calibration patterns belonging to the same first calibration block. Accordingly, a first calculation module configured to determine the spacing between two adjacent feature points; a calibration module configured to obtain a transformation matrix of internal and external parameters of the CCD camera according to the spacing and the coordinate position of each feature point in the first image in a calibration coordinate system; and a second shooting module configured to acquire a second image, wherein the second image is an image obtained by the CCD camera photographing the verification belt when the calibration assembly is replaced with a verification belt and the verification belt moves at a second moving speed, and the verification belt has a plurality of stripes distributed at equal intervals installed thereon.A CCD calibration device comprising: a second calculation module configured to determine a measurement interval between adjacent stripes according to the position of the stripe in the second image and the transformation matrix; and a verification module configured to verify the transformation matrix of the CCD camera according to the measurement interval and the standard interval between adjacent stripes. Claim 15 A computing device comprising a processor and a memory in which computer program instructions are stored, wherein the processor implements a CCD camera calibration method according to any one of claims 7 to 13 when executing the computer program instructions. Claim 16 A computer storage medium having computer program instructions stored therein, and a CCD camera calibration method according to any one of claims 7 to 13 implemented when said computer program instructions are executed by a processor. Claim 17 delete Claim 18 delete
Citation Information
Patent Citations
Camera high-precision calibration plate for multi-linear camera detection system and method for realizing calibration
CN106982370A
Online offset correction method and device for robot hand-eye calibration
CN108818536A
High-precision hand-eye calibration method for garbage sorting robot
CN113506349A