CCD camera calibration system, method, apparatus, computing device and storage medium
By moving the calibration components with calibration patterns in the transmission mechanism and using a CCD camera to capture the pattern, the camera's conversion matrix is calculated, and the measurement error problem caused by product size error in the prior art is solved, thereby improving the accuracy of calibration results.
Patent Information
- Application Number
- JP2023555177
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-12-03
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2041-12-03
AI Technical Summary
In the existing CCD camera calibration methods, measurement errors are easily caused due to product size errors, which affects the accuracy of calibration results.
Using a calibration assembly including a first calibration block and a calibration mode unit, the calibration assembly is moved in the transmission mechanism and a calibration pattern above it is photographed by a CCD camera, the internal and external parameter conversion matrix of the camera is calculated.
The calibration using actual products is avoided, the impact of product size errors is reduced, the accuracy of calibration results is improved, and the incompatibility effect in static calibration methods is eliminated.
Smart Images

Figure 0007653536000007 
Figure 0007653536000008 
Figure 0007653536000009
Abstract
Description
[Technical 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] At present, with the development of production lines, the number of transmission mechanisms in the production lines is also constantly increasing. In order to ensure the yield of mass-produced products, it is necessary to use a CCD (Charge Coupled Device) camera to perform CCD detection on the products in the transmission mechanism. In order to ensure the validity of the detection data, it is necessary to calibrate the CCD camera.
[0003] In the process of CCD detection using a conventional transmission mechanism, the calibration method of the CCD camera generally involves attaching a check tag to a product, and using the CCD camera to photograph the check tag and the product when the product and the check tag are moved together, to obtain the transformation matrix of the CCD camera.
[0004] However, since there is an error in the dimensions of the product, the transformation matrix of the CCD camera obtained from the product and the check tag is prone to measurement errors. Summary of the Invention
[0005] SUMMARY OF THE DISCLOSURE The embodiments of the present application provide a CCD camera calibration system, method, apparatus, computing device and storage medium, which can solve the technical problem that the conventional CCD camera calibration method has measurement errors.
[0006] In a first aspect, embodiments of the present application provide a CCD camera calibration system, the CCD camera calibration system comprising: A transmission mechanism; a calibration assembly mounted on the transmission mechanism, the calibration assembly including a plurality of calibration pattern units arranged along a length direction, each of the calibration pattern units including a first calibration block including a positioning mark and a plurality of uniformly arranged first calibration patterns; a CCD camera for photographing the calibration assembly to obtain a first image as the calibration assembly moves; and a processing module communicatively connected to the CCD camera for calculating a transformation matrix of the internal and external parameters of the CCD camera based on the first image.
[0007] The calibration assembly is installed to move on the transmission mechanism, and the calibration pattern on the calibration assembly is photographed, so that the calibration is avoided by using the actual product, and the calibration is realized by the CCD camera, so that the calibration result is prevented from being affected by the dimensional error of the product, and the accuracy of the calibration result is improved. At the same time, the calibration result includes the included angle of the moving direction of the calibration assembly, so that the non-overlapping effect between the coordinate systems in the static calibration method can be eliminated.
[0008] In some embodiments, the CCD camera calibration system further comprises: The apparatus further comprises a verification belt, on which a plurality of stripes distributed at equal pitches are provided, for replacing the calibration assembly after obtaining the transformation matrix of the internal and external parameters of the CCD camera.
[0009] After obtaining the calibration results, a verification belt can be installed to verify the calibration results, thereby improving the accuracy of the CCD camera calibration.
[0010] In some embodiments, the verification belt is a white base film sheet and the stripes are black stripes.
[0011] By setting the color of the verification belt base and stripes, the stripes can be clearly identified from the image and the accuracy of the verification process can be improved.
[0012] In some embodiments, the calibration assembly comprises a calibration belt, the calibration belt having a white base, and the first calibration pattern is black in color.
[0013] By setting the base color of the calibration assembly and the color of the first calibration pattern, the first calibration pattern can be accurately identified, and the accuracy of identification of the first calibration pattern can be improved.
[0014] In some embodiments, the first calibration pattern is circular.
[0015] Providing a uniformly arranged circular pattern on the calibration assembly can improve the accuracy and reliability of the calibration and subsequent measurements.
[0016] In some embodiments, the calibration pattern unit further includes a second calibration block disposed on one side of the first calibration block along a width direction of the calibration assembly.
[0017] First, in order to quickly perform rough positioning, a second calibration block is identified from the image, and after identifying the second calibration block, an adjacent first calibration block is identified, thereby realizing the calibration process.
[0018] In some embodiments, the calibration pattern unit includes a plurality of first calibration blocks arranged along a width direction of the calibration assembly; The calibration assembly is divided into stripes on the transmission mechanism and then separated into a plurality of sub-calibration assemblies, each of which includes at least one first calibration block.
[0019] By installing multiple first calibration blocks in the width direction of the calibration assembly, after the transmission mechanism divides the calibration assembly, the CCD camera after being installed at the dividing position can also photograph at least one complete first calibration block, thereby realizing CCD camera calibration after the dividing position.
[0020] In a second aspect, an embodiment of the present application provides a CCD camera calibration method, the CCD camera calibration method comprising: acquiring a first image of the calibration assembly by a CCD camera when the calibration assembly moves to a transmission mechanism at a first moving speed; identifying feature points in each of the first calibration patterns that belong to the same first calibration block from the first image; Identifying coordinate positions in a calibration coordinate system, which is specified by the positions of the positioning marks in the first image, of feature points in each of the first calibration patterns belonging to the same first calibration block; Identifying a pitch between two adjacent feature points based on positions of the feature points in each of the first calibration patterns belonging to the same first calibration block; and obtaining a transformation matrix of intrinsic and extrinsic parameters of the CCD camera using the pitch and a coordinate position in a calibration coordinate system of each feature point in the first image.
[0021] By installing the calibration assembly so that it moves to the transmission mechanism, it is possible to avoid performing calibration using an actual product and realize calibration of the CCD camera, thereby preventing the calibration results from being affected by dimensional errors of the product and improving the accuracy of the calibration results.
[0022] In some embodiments, after obtaining a transformation matrix of the intrinsic and extrinsic parameters of the CCD camera according to the pitch and the coordinate position of each feature point in the first image in the calibration coordinate system, further: replacing the calibration assembly with a verification belt, and when the verification belt moves at a second moving speed, the CCD camera acquires a second image, which is an image obtained by photographing the verification belt having a plurality of stripes distributed at equal pitches; determining a measured pitch between adjacent fringes according to the positions of the fringes in the second image and the transformation matrix; and verifying a transformation matrix of the CCD camera with the measurement pitch and a standard pitch between adjacent fringes.
[0023] After obtaining the calibration results, a verification belt can be installed to verify the calibration results, thereby improving the accuracy of the CCD camera calibration.
[0024] In some embodiments, prior to acquiring the second image, further comprising: Calculating a distortion parameter fitting curve of the CCD camera according to a coordinate position of each feature point in the first image in a calibration coordinate system; determining a fitting accuracy of the distortion parameter fitting curve by using a coordinate position in a calibration coordinate system of each feature point in the first image and the distortion parameter fitting curve; Obtaining the second image includes: When the fitting accuracy reaches a predetermined accuracy threshold, a second image is acquired.
[0025] Before verifying the transformation matrix, a distortion parameter fitting curve is further generated by fitting according to the distortion parameters of each position of the CCD camera, and it is judged whether the fitting accuracy meets the requirements. If the fitting accuracy does not meet the requirements, the verification process is not performed and the number of verifications can be reduced.
[0026] In some embodiments, determining a measured pitch between adjacent stripes according to the positions of the stripes in the second image and the transformation matrix comprises: determining a coordinate location of a pixel of each stripe in the calibration coordinate system according to the location of the stripes in the second image; Calculating a measured pitch between adjacent fringes using the coordinate position of a pixel of each fringe in the calibration coordinate system and the transformation matrix.
[0027] According to the corresponding coordinate positions of the pixels of each stripe and the transformation matrix obtained after calibration, the measured pitch between adjacent stripes in the captured second image can be calculated, and the measured pitch can be compared with the actual standard pitch to determine the accuracy of the calibration result.
[0028] In some embodiments, verifying the transformation matrix of the CCD camera with the measurement pitch and a standard pitch between adjacent fringes comprises: Calculating a calibration error according to a standard pitch and a measured pitch between adjacent fringes; comparing each calibration error with a predetermined error threshold; and determining that the transformation matrix has failed validation if a number of calibration errors greater than a predetermined error threshold for each calibration error reaches a predetermined validation threshold.
[0029] When verifying the calibration results using a verification belt, an error tolerance range for the calibration error can be set and the transformation matrix within that range can be identified as passing verification, thereby ensuring the validity of the calibration results while avoiding excessive calibrations.
[0030] In some embodiments, the calibration pattern unit further includes a second calibration block disposed on one side of the first calibration block along a width direction of the calibration assembly; before identifying feature points in each of the first calibration patterns that belong to the same first calibration block from the first image; The method includes positioning a first calibration block belonging to the same calibration pattern unit using information about the second calibration block in the first image.
[0031] A second calibration block is set, and the second calibration block is first identified from the image for quick and rough positioning, and after identifying the second calibration block, the adjacent first calibration block is identified, and the calibration process can be realized by the first calibration block.
[0032] In some embodiments, the second calibration block is rectangular.
[0033] The second calibration blocks can be arranged in a rectangular pattern to facilitate easy identification.
[0034] In some embodiments, the first calibration pattern is circular and the feature point is the circle center.
[0035] The first calibration pattern is set in a circular shape, so that the position of the circle center can be quickly and accurately specified and used as a feature point, which can improve the accuracy and stability of the feature points compared to setting other shapes and fitting the feature points.
[0036] In a third aspect, an embodiment of the present application provides a CCD calibration device, the CCD calibration device comprising: an imaging module that captures a first image of the calibration assembly by a CCD camera when the calibration assembly moves to the transmission mechanism at a first moving speed; an identification module for identifying feature points in each of the first calibration patterns that belong to the same first calibration block from the first image; a module for determining the coordinate positions of feature points in each of the first calibration patterns belonging to the same first calibration block in a calibration coordinate system determined by the positions of the positioning marks in the first image; a calculation module that determines a pitch between two adjacent feature points based on positions of the feature points in each of the first calibration patterns that belong to the same first calibration block; and a calibration module that obtains a transformation matrix of the intrinsic and extrinsic parameters of the CCD camera based on the pitch and a coordinate position in a calibration coordinate system of each feature point in the first image.
[0037] In a fourth aspect, embodiments of the present application provide a computing device, the computing device comprising a processor and a memory storing computer program instructions, When the processor executes the computer program instructions, the above-mentioned CCD camera calibration method is realized.
[0038] In a fifth aspect, an embodiment of the present application provides a computer storage medium having computer program instructions stored thereon, the computer program instructions, when executed by a processor, realizing the aforementioned CCD camera calibration method.
[0039] Compared with the prior art, the CCD camera calibration system provided by the embodiment of the present application installs a calibration assembly at a position where the original web is placed in the transmission mechanism, so that the calibration assembly can move on the conveyor of the transmission mechanism and the calibration assembly can be controlled to move to the transmission mechanism, the CCD camera photographs the calibration pattern unit in the calibration assembly to obtain a first image including a positioning mark and a plurality of uniformly arranged first calibration patterns, and the first image can be used to calculate a transformation matrix of the internal and external parameters of the CCD camera. By photographing the uniformly arranged first calibration patterns in the calibration assembly, the first image and the first calibration patterns can be used to obtain a transformation matrix of the internal and external parameters of the CCD camera, so that it is not necessary to install and move an actual product in the transmission mechanism when calibrating the CCD camera, and it is possible to avoid the calibration result being affected by the dimensional error of the product, and to improve the accuracy of the calibration result.
[0040] In order to more clearly explain the technical solutions of the embodiments of the present application, the following will briefly describe the drawings necessary for the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can obtain other drawings from these drawings without any creative efforts. [Brief description of the drawings]
[0041] [Figure 1] FIG. 1 is a structural schematic diagram of a CCD camera calibration system provided by one embodiment of the present application. [Diagram 2] FIG. 2 is a structural schematic diagram of a calibration assembly in the embodiment of FIG. 1. [Diagram 3] FIG. 2 is a schematic diagram showing the structure of a verification belt in the embodiment of FIG. 1. [Figure 4] 1 is a flowchart of a CCD camera calibration method provided by one embodiment of the present application. [Diagram 5] 4 is a flowchart of a CCD camera calibration method provided by another embodiment of the present application. [Figure 6] 4 is a flowchart of a CCD camera calibration method provided by another embodiment of the present application. [Figure 7] 4 is a flowchart of a CCD camera calibration method provided by yet another embodiment of the present application. [Figure 8] 4 is a flowchart of a CCD camera calibration method provided by yet another embodiment of the present application. [Figure 9] 4 is a flowchart of a CCD camera calibration method provided by yet another embodiment of the present application. [Figure 10] 1 is a distortion parameter fitting graph of a CCD camera in one embodiment of the present application. [Figure 11] FIG. 2 is a structural schematic diagram of a CCD calibration device provided by one embodiment of the present application; [Figure 12] FIG. 2 is a hardware configuration diagram of a computing device provided in accordance with one embodiment of the present application.
[0042] In the drawings, the drawings are not drawn to scale. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0043] The following describes in detail the characteristics and exemplary embodiments of each aspect of the present application, and in order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be described in more detail with reference to the drawings and specific embodiments. It should be understood that the specific embodiments described herein are for the purpose of explaining the present application, and do not limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is merely for the purpose of providing an example of the present application to better understand the present application.
[0044] It should be noted that, in this specification, relational terms such as first and second are used to distinguish one entity or operation from another and do not necessarily require or imply that any such actual relationship or order exists between those entities or operations. Also, the terms "comprises," "includes," or any other variant thereof are intended to cover a non-exclusive inclusion, whereby a process, method, article, or device that includes a set of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent in such process, method, article, or device. In the absence of more limitations, limiting an element with the phrase "comprises" does not exclude the presence of other identical elements in the process, method, article, or device that includes that element.
[0045] In addition, the embodiments and features of the embodiments in the present application may be combined with each other if not inconsistent.
[0046] At present, with the development of production lines, the number of pointing transmission mechanisms in production lines is also constantly increasing. In order to ensure the yield of mass-produced products, it is necessary to use CCD cameras to perform CCD detection on products. In order to ensure the validity of the detection data, it is necessary to calibrate the CCD camera.
[0047] In the conventional CCD camera calibration method, a check tag is generally attached to a product, and when the product and the check tag are moved together, the CCD camera takes pictures of the check tag and the product to obtain the transformation matrix of the CCD camera. However, since there is an error in the dimensions of the product, the transformation matrix of the CCD camera obtained from the product and the check tag is likely to have a measurement error, and the calibration result has a large error.
[0048] In order to solve the above technical problems, the embodiments of the present application provide a CCD camera calibration system, a method, an apparatus, a computing device and a storage medium. The CCD camera calibration system provided by the embodiments of the present application will be described below.
[0049] 1 shows a schematic structural diagram of a transmission mechanism and a CCD camera in a CCD camera calibration system provided by 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).
[0050] 2, the calibration assembly may be installed on the transmission mechanism. The calibration assembly includes a plurality of calibration pattern units 30 arranged along a longitudinal direction, and the calibration pattern unit 30 includes a first calibration block 31, which includes a positioning indicia and a plurality of uniformly arranged first calibration patterns 311.
[0051] The transmission mechanism may be a device for transmitting a product. For example, the transmission mechanism may be a die cutter or other transmission device, and a belt conveyor 10 is installed in the transmission mechanism. When the transmission mechanism runs, the calibration assembly can move on the belt conveyor 10 of the transmission mechanism, and the CCD camera 20 can photograph the calibration assembly when the calibration assembly moves on the belt conveyor 10 to obtain a corresponding first image.
[0052] The processing module is communicatively connected to the CCD camera 20, and the processing module acquires a first image after the CCD camera 20 captures the first image, and calculates a transformation matrix of the internal and external parameters of the CCD camera 20 using the first image, thereby achieving calibration of the CCD camera 20.
[0053] After acquiring the first image, the processing module can identify the calibration pattern unit 30 from the first image, and specify the corresponding positioning mark 312 and the multiple uniformly arranged first calibration patterns 311 by the first calibration block 31 in the calibration pattern unit 30. The processing module can specify the corresponding calibration coordinate system by the positioning mark 312, and obtain a transformation matrix of the internal and external parameters of the CCD camera 20 by calculating the coordinate positions of the multiple first calibration patterns 311 in the calibration coordinate system and the pixels corresponding to each of the multiple first calibration patterns 311.
[0054] In this embodiment, a calibration assembly is installed in the transmission mechanism, so that the calibration assembly moves on the belt conveyor 10 of the transmission mechanism, and the CCD camera 20 is installed at a fixed position near the transmission mechanism and photographs a fixed area in the transmission mechanism, and when the calibration assembly moves to the photographing area of the CCD camera 20, the CCD camera 20 can photograph the calibration assembly to obtain a first image including the calibration pattern unit 30. The first image includes a first calibration block 31, which includes a positioning mark 312 and a plurality of first calibration patterns 311, the positioning mark 312 can represent the moving 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 distributed according to a predetermined arrangement manner. The processing module can specify a calibration coordinate system by the positioning mark 312, and specify a correspondence between the first image and the calibration coordinate system by corresponding pixels of the first calibration patterns 311 in the first image and the original corresponding coordinate positions of the first calibration patterns 311, thereby calculating a transformation matrix of the internal and external parameters of the CCD camera 20. By photographing the first calibration patterns 311 uniformly arranged in the calibration assembly, the transformation matrix of the internal and external parameters of the CCD camera 20 can be obtained by the first image and the predetermined coordinate positions of the first calibration patterns 311, and the calibration of the CCD camera 20 can be realized without the need to install an actual product in the transmission mechanism, and the calibration result can be avoided from being affected by the dimensional error of the product, and the accuracy of the calibration result can be improved.
[0055] As shown in Fig. 1, it can be understood that by installing multiple CCD cameras 20 at multiple different positions near the transmission mechanism, it is possible to capture and detect different transmission areas in the transmission mechanism. The multiple CCD cameras 20 capture the calibration assembly moving in the transmission mechanism, so that the calibration result of the CCD cameras 20 can include the included angle of the movement direction of the calibration assembly. Compared with the static calibration method, the effect of non-overlapping between each coordinate system in the static calibration can be eliminated.
[0056] For example, the calibration assembly may be installed in a belt shape, that is, the calibration assembly may include a calibration belt. For example, when the product transmitted by the transmission mechanism is a raw roll, the calibration belt may be installed according to the raw roll, specifically, the inner diameter of the calibration belt is consistent with the inner diameter of the raw roll of the actual product in the transmission mechanism, and the length of the calibration assembly is greater than the length of the running belt of the transmission mechanism, so that the calibration belt is placed at the position where the raw roll is placed in the transmission mechanism, and moves with the transmission mechanism to cover the entire running belt of the transmission mechanism. In addition, since a plurality of calibration pattern units 30 arranged along the longitudinal direction are installed on the calibration belt, when the calibration belt moves until it covers the running belt of the transmission mechanism, each CCD camera 20 at a different position will capture a first image including at least one complete calibration pattern unit 30 in its shooting area, thereby realizing the calibration of the CCD camera 20, and when a plurality of cameras are installed, it is possible to realize that a plurality of cameras are simultaneously calibrated.
[0057] As can be understood, the calibration assembly can also be directly attached to the belt conveyor 10 of the transmission mechanism. When the belt conveyor 10 is moving, the CCD camera 20 can capture the calibration assembly attached to the surface of the belt conveyor 10.
[0058] In addition, the CCD camera 20 is generally a line scan camera, and when there is a large difference between the installation angle of the line scan camera and the movement direction of the product in the transmission mechanism, the processing module further identifies the included angle between the mounting position of the CCD camera 20 and the movement direction of the product in the transmission mechanism by each of the first calibration patterns 311 in the captured first image, thereby enabling calibration of the CCD camera 20 to be realized even when there is a large difference between the installation angle of the CCD camera 20 and the movement direction of the product in the transmission mechanism.
[0059] As shown in Fig. 3, in some embodiments, the calibration system of the CCD camera 20 can further include a verification belt. A plurality of stripes 41 distributed at equal pitches are installed on the verification belt, and the calibration assembly is installed and moved on the transmission mechanism, and a first image is taken to calculate the transformation matrix of the internal and external parameters of the CCD camera 20, and then the calibration assembly can be replaced with the verification belt. When the verification belt moves to the transmission mechanism, the CCD camera 20 takes the stripes 41 on the verification belt, and the measurement pitch of the adjacent stripes 41 can be calculated by adopting the calculated transformation matrix of the internal and external parameters according to the image obtained by taking the image. Since the standard pitch of the adjacent stripes 41 is preset when the verification belt is created, it can be determined whether the transformation matrix of the internal and external parameters calculated by the measurement pitch obtained by taking the image and the conventional standard pitch passes verification. After passing verification, the CCD camera 20 completes the calibration process. The verification belt is installed to move to the transmission mechanism, and the CCD camera 20 is controlled to photograph the stripes 41 on the verification belt.The measured pitch of the adjacent stripes 41 is calculated based on the pixels between adjacent stripes 41 in the captured image and the transformation matrix of the internal and external parameters of the CCD camera 20 calculated by the calibration assembly.By comparing the measured pitch with the standard pitch between stripes, the accuracy of the current calibration result of the CCD camera 20 can be determined, and the calibration of the CCD camera 20 can be verified.
[0060] In some embodiments, the verification belt may adopt a film sheet with a white base, and the stripes 41 on the verification belt may be black stripes 41. After the CCD camera 20 photographs the verification belt to obtain a photographed image, it can identify the white base and the black stripes 41 in the image, and realize the verification of the calibration process of the CCD camera 20. As can be understood, the base color or the color of the stripes 41 of the verification belt may be further set to other colors, as long as the base and the stripes 41 can be clearly identified in the photographed image. The length of the verification belt may be set to be greater than the running belt length of the transmission mechanism, and the verification belt needs to be installed by being attached to the surface of the belt conveyor 10 of the transmission mechanism.
[0061] In some embodiments, the calibration assembly may be a white-based calibration belt, and the colors of the positioning marks 312 and the first calibration pattern 311 in the first calibration block 31 in the calibration pattern unit 30 of the calibration assembly may be set to black. Similarly, by setting the colors of the base and pattern of the calibration assembly to white and black, respectively, the base and the first calibration block 31 can be clearly distinguished from the image captured by the CCD camera 20, and the calculation of the transformation matrix of the internal and external parameters of the CCD camera 20 can be realized by the identified first calibration block 31.
[0062] In some embodiments, the first calibration pattern may be arranged in a circular shape, that is, the calibration pattern unit includes a positioning mark and a plurality of uniformly arranged circular patterns. By setting the circular patterns and photographing them with the CCD camera 20, the center of each circular pattern can be accurately fitted from the photographed image, and CCD calibration can be performed according to the center of each circular pattern. Compared with using other patterns to perform calibration identification, the accuracy and reliability of calibration and measurement after calibration can be improved.
[0063] The area of each calibration pattern unit 30 in the calibration assembly is 100 mm 2 The shape of the calibration pattern unit 30 may be set to be square or rectangular. The distance between adjacent first calibration patterns 311 in the plurality of first calibration patterns 311 in the calibration pattern unit 30 may be set to be 0.05 mm or more.
[0064] In some embodiments, each calibration pattern unit 30 in the calibration assembly further includes a second calibration block 32, and the second calibration block 32 may be disposed on the side of the first calibration block 31 along the width direction of the calibration assembly. That is, each calibration pattern unit 30 includes the first calibration block 31 and the second calibration block 32 arranged side by side along the width direction of the calibration assembly. The second calibration block 32 may be disposed in a rectangular pattern. After a first image including the first calibration block 31 and the second calibration block 32 is captured, the second calibration block 32 can quickly identify the direction of the coordinate system and realize rough positioning of the coordinates. After the rough positioning is performed, the positioning mark 312 in the first calibration block 31 can realize accurate positioning of the coordinates, and the transformation matrix of the internal and external parameters can be calculated according to the pixel position of each first calibration pattern 311 in the first calibration block 31.
[0065] In some embodiments, each calibration pattern unit 30 in the calibration assembly includes 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.
[0066] 1, the transmission mechanism may divide the product during operation, and by installing a plurality of first calibration blocks 31 along the width direction of the calibration assembly, when the transmission mechanism divides the calibration assembly into stripes, after the calibration assembly is separated into a plurality of sub-calibration assemblies, the sub-calibration assemblies in each belt of the transmission mechanism include at least one first calibration block 31. After being installed at the stripe-shaped division positions of the transmission mechanism, the CCD cameras 20 each photograph the first calibration blocks 31 in the sub-calibration assemblies, thereby achieving calibration of the CCD cameras 20 after being installed at the stripe-shaped division positions of the transmission mechanism.
[0067] As can be understood, 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 are 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.
[0068] In some embodiments, as shown in FIG. 2, each calibration pattern unit 30 includes two first calibration blocks 31 and one second calibration block 32, and the two first calibration blocks 31 and the one second calibration block 32 may be arranged along the width direction of the calibration assembly, and the second calibration block 32 may be located between the two first calibration blocks 31. When the calibration assembly passes through the stripe-shaped dividing position of the transmission mechanism, the transmission mechanism separates the calibration assembly into two sub-calibration assemblies, and the second calibration block 32 may be separated into two parts and located in the two sub-calibration assemblies, respectively. That is, each of the two sub-calibration assemblies may include one complete first calibration block 31 and a part of the second calibration block 32. After the CCD camera 20 is placed at the stripe-shaped dividing position of the transmission mechanism, it photographs the first calibration block 31 in the sub-calibration assembly to obtain a first image, and the processing module further identifies a part of the second calibration block 32 in the first image, thereby realizing rapid positioning of the coordinates.
[0069] Similarly, the stripes 41 on the above-mentioned verification belt may be arranged as stripes 41 arranged along the width direction, and when the verification belt runs through the transmission mechanism and is separated into multiple sub-verification belts after passing through the stripe-shaped dividing position of the transmission mechanism, the CCD camera 20 after being installed at the stripe-shaped dividing position of the transmission mechanism can similarly photograph the stripes 41 on the sub-verification belt, thereby realizing the verification process of the calibration of the CCD camera 20.
[0070] 4 shows a flow chart of a CCD camera calibration method provided by 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 CCD camera captures a first image, which is an image obtained by photographing the calibration assembly when the calibration assembly moves to the transmission mechanism at a first moving speed (S410); identifying feature points in each of the first calibration patterns that belong to the same first calibration block from the first image; S430, determining the coordinate positions of feature points in each of the first calibration patterns belonging to the same first calibration block in a calibration coordinate system determined by the positions of the positioning marks in the first image; S440: specifying a pitch between two adjacent feature points based on positions of feature points in each of the first calibration patterns belonging to the same first calibration block; and obtaining a transformation matrix of the intrinsic and extrinsic parameters of the CCD camera according to the pitch and the coordinate position of each feature point in the first image in the calibration coordinate system (S450).
[0071] In this embodiment, the CCD calibration device can control the CCD camera to photograph the calibration assembly to obtain a first image, and the device can identify the feature points of each of the first calibration patterns in the same first calibration block, and determine the calibration coordinate system by the positioning marks in the same first calibration block, and then determine the corresponding positions of each of the feature points in the calibration coordinate system. Since the arrangement manner of each of the first calibration patterns in the same first calibration block is preset, the pitch between the feature points of each of the first calibration patterns can be determined by the corresponding first calibration pattern. The pitch between every two adjacent feature points can be determined by the position of the feature points in each of the first calibration patterns. In the first image obtained by photographing, the coordinate positions of the pixels corresponding to each of the first calibration patterns in the calibration coordinate system are determined by the coordinate positions of the pixels corresponding to each of the feature points in the calibration coordinate system, so that the pixel distance between each of the feature points can be calculated. The transformation matrix of the internal and external parameters of the CCD camera can be calculated by the pitch and pixel distance between each of the feature points. By photographing a first calibration pattern uniformly arranged on the calibration assembly, a transformation matrix of the internal and external parameters of the CCD camera is obtained by using the first image and the predetermined coordinate positions of the first calibration pattern. When calibrating the CCD camera, there is no need to install and move an actual product on the transmission mechanism, which prevents the calibration results from being affected by dimensional errors of the product and improves the accuracy of the calibration results.
[0072] In S410, the calibration assembly is installed on the transmission mechanism and can be moved on the running belt of the transmission mechanism at a first moving speed. The apparatus can obtain a first image by controlling the CCD camera to photograph the calibration assembly when the CCD camera moves to the calibration assembly.
[0073] In S420, the first image captured by the CCD camera includes at least one first calibration block, and each first calibration block in 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 in the same first calibration block from the first image, and specify its corresponding feature point by 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, etc. If the first calibration pattern is a circle, the corresponding feature point may be the circle center of the circle. The positioning mark may be a triangular pattern, and the device can position the direction of the calibration coordinate system by a pattern corresponding to the positioning mark in the first image.
[0074] In S430, the device can specify a calibration coordinate system in the first image by the position of the positioning mark in the first calibration block after specifying the feature points corresponding to each first calibration pattern in the same first calibration block. After specifying the calibration coordinate system, the device can specify a coordinate position of each feature point in the calibration coordinate system by 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.
[0075] In S440, the apparatus can determine the coordinate positions in the calibration coordinate system of feature points in each first calibration pattern belonging to the same first calibration block, and then determine the pitch between every two adjacent feature points.
[0076] As can be understood, in the above calibration assembly, a plurality of first calibration patterns in the same first calibration block are set in advance, and after identifying the coordinate position of each first calibration pattern in the calibration coordinate system, the pitch between any two first calibration patterns can be identified. For example, when a plurality of first calibration patterns are arranged in an M×N matrix in the same first calibration block, if the two adjacent first calibration patterns are identified to be in the same row according to the coordinate position of each first calibration pattern in the calibration coordinate system, the pitch between the two adjacent first calibration patterns can be identified to be the row pitch. If the two adjacent first calibration patterns are identified to be in the same column, the pitch between the two adjacent first calibration patterns can be identified to be the row pitch. Similarly, after identifying the pitch between the two adjacent first calibration patterns, the device can identify the pitch between the two adjacent feature points according to the position of the feature points in the first calibration patterns. For example, if the first calibration pattern is a circle and the feature points are the circle centers, then for two adjacent circles in the same row, the distance between the two circle centers is the sum of the distance between the two circles and the radii of the two circles.
[0077] In S450, the device identifies feature points corresponding to each first calibration pattern belonging to the same first calibration block in the first image, and then identifies pixel distances between each feature point according to corresponding pixel coordinates in the calibration coordinate system of the feature points. The pitch between each feature point can be identified according to the arrangement manner of each first calibration pattern. The transformation matrix of the internal and external parameters of the CCD camera can be calculated according to the pitch between each feature point and the pixel distance between each feature point.
[0078] As an optional embodiment, referring to FIG. 5, to verify the calculated transformation matrix, after the above S450, the following can be further included:
[0079] In S510, the calibration assembly is replaced by a verification belt having a plurality of equally-pitched stripes, and when the verification belt moves at a second moving speed, a second image is obtained, which is an image obtained by the CCD camera photographing the verification belt.
[0080] At S520, a measured pitch between adjacent fringes is determined according to the fringe positions in the second image and the transformation matrix.
[0081] In S530, the transformation matrix of the CCD camera is verified by the measured pitch and the standard pitch between adjacent fringes.
[0082] In this embodiment, when the calibration assembly moves to the transmission mechanism at a first moving speed, the device controls the CCD camera to photograph the calibration assembly, and calculates the transformation matrix of the internal and external parameters of the CCD camera through the first image captured. After generating the transformation matrix of the internal and external parameters of the CCD camera, the calibration assembly in the transmission mechanism is replaced with a verification belt, and when the verification belt moves to the transmission mechanism at a second moving speed, the device controls the CCD camera to photograph the verification belt, and verifies the transformation matrix of the CCD camera by the second image captured, thereby verifying whether the transformation matrix meets the accuracy requirements.
[0083] In S510, the apparatus can control the CCD camera to photograph the calibration assembly in the transmission mechanism, and then replace the calibration assembly with a verification belt having a plurality of stripes distributed at equal pitches. When the verification belt moves at a second moving speed in the transmission mechanism, the apparatus can control the CCD camera to photograph the verification belt to obtain a second image.
[0084] As can be seen, in order to ensure the shooting accuracy when the CCD camera shoots the calibration assembly and the verification belt, the first moving speed and the second moving speed are set to be the same, that is, the moving speeds of the calibration assembly and the verification belt in the transmission mechanism are set to be the same, so that the pixel error in the first image and the second image shot due to the different 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 3m / min.
[0085] In S520, after acquiring the second image, the device can identify each stripe from the second image and determine the corresponding pixel position of each stripe in the second image. The pixel distance between the two adjacent stripes can be determined according to the pixel positions of the two adjacent stripes, and the measured pitch between the two adjacent stripes can be calculated according to the transformation matrix obtained in the calibration process and the pixel distance between the two adjacent stripes.
[0086] In S530, since the multiple stripes on the verification belt are distributed at equal pitches and the pitch between adjacent stripes is a predetermined standard pitch, the device can directly obtain the standard pitch and compare the standard pitch with the measured pitch to verify whether the transformation matrix of the internal and external parameters of the CCD camera meets the accuracy requirements.
[0087] As an alternative embodiment, referring to FIG. 6, to identify the measurement pitch of adjacent fringes, S520 above may include: determining a coordinate position of a pixel of each stripe in the calibration coordinate system according to the position of the stripes in the second image; and calculating a measured pitch between adjacent stripes using the transformation matrix and a coordinate position of a pixel of each stripe in the calibration coordinate system (S620).
[0088] In this embodiment, the device identifies the coordinate position of the pixel of each stripe in the calibration coordinate system based on the position of the stripe in the second image, identifies the pixel distance between adjacent stripes, i.e., the number of pixels, based on the coordinate position of the pixel of each stripe, and can convert the pixel distance between adjacent stripes into a measured pitch between adjacent stripes using a transformation matrix obtained by the CCD camera photographing the calibration assembly.
[0089] In S610, after identifying the stripes in the second image, the device can determine the coordinate location of the pixel of each stripe in the calibration coordinate system according to the location of each stripe in the second image, where the coordinate location is the pixel coordinate to which each stripe corresponds.
[0090] In S620, the device can determine the pixel distance between adjacent stripes according to the pixel coordinates corresponding to each stripe after determining the coordinate position of the pixel of each stripe in the calibration coordinate system. As can be understood, the pixel distance between adjacent stripes can be the pixel distance between two adjacent sides of two stripes. The device can further determine the stripe feature points corresponding to each stripe, and the pixel distance between adjacent stripes can be the pixel distance between two adjacent stripe feature points. After determining the pixel distance between adjacent stripes, the measurement pitch between adjacent stripes can be calculated according to the pixel distance between adjacent stripes according to the transformation matrix of the CCD camera.
[0091] As an alternative embodiment, referring to FIG. 7, in order to verify whether the transformation matrix meets the requirements, the above S530 may include: S710 calculating a calibration error according to a standard pitch and a measured pitch between adjacent fringes; S720 comparing each calibration error with a preset error threshold; and determining at S730 that the transformation matrix has not passed validation if the number of calibration errors greater than a predetermined error threshold for each calibration error reaches a predetermined validation threshold. In this embodiment, the device can obtain the calibration error according to the standard pitch and the measured pitch of the adjacent stripes, and verify the calibrated transformation matrix according to the calibration error and a preset error threshold. If the transformation matrix passes the verification, the calibration process is terminated and the transformation matrix is stored. If the transformation matrix does not pass the verification, a verification failure message is sent to the user, and the CCD camera is recalibrated. By providing a verification belt to perform secondary verification, the transformation matrix obtained by the calibration of the CCD camera can meet the accuracy requirements.
[0092] In S710, after obtaining the measured pitch and the standard pitch between each adjacent stripe, the apparatus can calculate a corresponding calibration error for each adjacent stripe, where the calibration error may be a difference between the standard pitch and the measured pitch.
[0093] In S720, after calculating the corresponding calibration error of each adjacent stripe, the apparatus can compare each calibration error with a predetermined error threshold, and determine whether each calibration error is greater than the predetermined error threshold.
[0094] In S730, the device sequentially compares the calibration errors with a preset error threshold, and then counts each time a calibration error is determined to be greater than the preset error threshold, thereby totaling the number of calibration errors greater than the preset error threshold. When the count value reaches a preset verification threshold, the transformation matrix has large errors in multiple different positions, and the product cannot be accurately calibrated. In this case, the device can determine that the transformation matrix calculated in this calibration process has not passed verification.
[0095] As can be understood, after comparing the corresponding calibration errors of all adjacent stripes with the predetermined error threshold, if the number of calibration errors greater than the predetermined error threshold has not reached the predetermined verification threshold, it indicates that the calibration accuracy of the transformation matrix is high, and in this case, the device can determine that the transformation matrix calculated in this calibration process has passed verification.
[0096] In one alternative embodiment, the device can further determine whether the transformation matrix passes verification according to the number of consecutive calibration errors that are greater than a predetermined error threshold. For example, when a plurality of consecutive calibration errors are all greater than a predetermined error threshold, it can determine whether the consecutive number reaches a predetermined verification threshold. For example, when the predetermined error threshold is 0.05, it can determine whether there are at least four consecutive calibration errors that are all greater than the predetermined error threshold, and when there are at least four consecutive calibration errors that are all greater than 0.05, it can determine that the transformation matrix does not pass verification.
[0097] As an alternative embodiment, referring to FIG. 8, in order to reduce the number of verifications and improve the verification efficiency, before the above S510, Calculating a distortion parameter fitting curve of the CCD camera according to the coordinate positions of each feature point in the calibration coordinate system in the first image (S810); The method may further include determining a fitting accuracy of the distortion parameter fitting curve using a coordinate position of each feature point in a calibration coordinate system in the first image and the distortion parameter fitting curve (S820).
[0098] The above S510 is The method may include S830 of acquiring a second image when the fitting accuracy reaches a predetermined accuracy threshold.
[0099] In this embodiment, the device can take a picture of the calibration assembly by the CCD camera and calculate the transformation matrix of the CCD camera, and then calculate and generate the distortion parameter fitting curve of the CCD camera according to each feature point in the first image, and judge the fitting accuracy of the distortion parameter fitting curve. If the fitting accuracy meets the predetermined requirement, the calibration assembly is replaced with a verification belt to take a second image for verification. If the fitting accuracy of the distortion parameter fitting curve does not meet the predetermined requirement, it is not necessary to replace the calibration assembly with the verification belt, and it is directly determined that the transformation matrix does not meet the calibration accuracy requirement. In this case, the calibration assembly can be installed again on the transmission mechanism and the first image can be taken again for calibration. Before the verification is performed by the verification belt, the transformation matrix is directly screened according to the fitting accuracy of the CCD camera distortion parameter fitting curve, and if it does not meet the predetermined requirement, it is directly determined that the transformation matrix obtained in this calibration process does not meet the calibration accuracy requirement, and it is not necessary to perform verification by adding a verification belt, so that the number of verifications can be reduced and the verification efficiency can be improved.
[0100] In S810, the device can determine the coordinate position of each feature point in the calibration coordinate system, and then determine the corresponding pixel coordinate of each feature point. Since the CCD camera is a line scan camera, different positions of the online scan camera correspond to different distortion parameters. According to the corresponding pixel coordinate of each feature point and the pixel distance between adjacent feature points, the distortion parameters corresponding to each position of the line scan camera can be determined.
[0101] The apparatus generates a plurality of samples according to distortion parameters corresponding to different positions of the CCD camera, and performs curve fitting according to the plurality of samples to obtain a fitting curve of the position and the distortion parameters, and the fitting curve is the distortion parameter fitting curve of the CCD camera.
[0102] In S820, after the distortion parameter fitting curve of the CCD camera is determined, the fitting accuracy of the distortion parameter fitting curve can be determined by the coordinate position of each feature point in the calibration coordinate system in the first image and the distortion parameter fitting curve. For example, the fitting accuracy of the distortion parameter fitting curve can be represented by the goodness of fit. The statistic of the goodness of fit is the coefficient of determination of the distortion parameter fitting curve.
[0103] Here, the method for calculating the coefficient of determination is as follows.
[0104] Identify the sample data set as (x1, y1), (x2, y2), · · ·, (xn, yn).
[0105] Here, x1, x2,..., xn are different position coordinates of the CCD camera, and y1, y2,..., yn are distortion parameters corresponding to the different position coordinates.
[0106] By curve fitting, the distortion parameter fitting curve of the CCD camera is obtained. For x1, x2, . . . , xn, the corresponding fitting predicted distortion parameter values are JPEG0007653536000001.jpg1952.
[0107] The average value of the fitting predicted distortion parameters is JPEG0007653536000002.jpg1876.
[0108] The residuals of the fitted predicted distortion parameters are JPEG0007653536000003.jpg1736.
[0109] The total sum of squares is JPEG0007653536000004.jpg1871.
[0110] The residual sum of squares is JPEG0007653536000005.jpg1867.
[0111] The coefficient of determination is JPEG0007653536000006.jpg2260.
[0112] That is, if the degree of fit is adopted to represent the fitting accuracy of the distortion parameter fitting curve, the determination coefficient of the distortion parameter fitting curve can be calculated according to the distortion parameter fitting curve and the corresponding samples of each feature point.
[0113] In S830, after calculating the fitting accuracy of the distortion parameter fitting curve, the fitting accuracy of the distortion parameter fitting curve is compared with a predetermined accuracy threshold. If the fitting accuracy reaches the predetermined accuracy threshold, the fitting degree of the distortion parameter fitting curve is determined to be high, and the calibration assembly can be replaced with a verification belt to perform the verification process of CCD camera calibration.
[0114] For example, when the degree of fit is adopted to represent the fitting accuracy of the distortion parameter fitting curve, the predetermined accuracy threshold can be set to 0.95, and after calculating the coefficient of determination of the distortion parameter fitting curve, it can be determined whether the coefficient of determination is greater than the predetermined accuracy threshold. If the coefficient of determination reaches the predetermined accuracy threshold, the calibration assembly can be replaced with a verification belt to verify the transformation matrix. If the coefficient of determination is less than the predetermined accuracy threshold, the verification process is not performed, and the CCD camera can be recalibrated.
[0115] When multiple CCD cameras are installed near the transmission mechanism, the distortion parameters of each CCD camera can be fitted to generate the distortion parameter fitting curve of the CCD camera, and the fitting accuracy can be calculated by the distortion parameter fitting curve. As shown in Fig. 10, two CCD cameras are selected from the multiple CCD cameras, and the fitting accuracy of the distortion parameter fitting curves of the two CCD cameras is calculated to be 0.9836 and 0.9683, respectively. When the preset accuracy threshold is set to 0.95, if the fitting accuracy of the corresponding distortion parameter fitting curves of these two CCD cameras is greater than the preset accuracy threshold, it is determined that the distortion parameter fitting curves of these two CCD cameras meet the accuracy requirements, and a verification belt can be further installed and the verification belt can be photographed by a CCD camera for verification.
[0116] As an alternative embodiment, referring to FIG. 9, in order to realize quick and rough positioning, the calibration pattern unit further includes a second calibration block, and the second calibration block is disposed on one side of the first calibration block along the width direction of the calibration assembly. Before S420, further The method may include S910 of positioning a first calibration block belonging to the same calibration pattern unit based on information of the second calibration block in the first image.
[0117] In this embodiment, after acquiring a first image, the apparatus can quickly identify the pattern of the second calibration block from the first image, and quickly determine the orientation of the calibration coordinate system through the pattern, thereby realizing rough positioning of the coordinates.
[0118] The second calibration block is set to a rectangular pattern, the pattern color is set to black, and compared to the first calibration block which includes a positioning mark and a plurality of first calibration patterns, the apparatus can more quickly identify the second calibration block from the first image and achieve quick and rough positioning.
[0119] As an alternative embodiment, in the CCD camera calibration system, a plurality of CCD cameras may be installed at a plurality of positions near the transmission mechanism, and when the calibration assembly is installed on the conveyor of the transmission mechanism and moved, the images captured by the CCD cameras can be monitored, and when all of the CCD cameras capture the calibration pattern units in the calibration assembly, the transmission mechanism can be controlled to stop moving, and in this case, the images captured by each CCD camera can be examined, and it can be determined whether the image captured by the CCD includes a complete calibration pattern unit and whether the base and the first calibration block can be identified from the image captured by the CCD. For example, the device can set a gradation difference value range between the base and the first calibration block in advance, and when the difference value between the gradation of the base and the gradation of the first calibration block in the captured image satisfies the gradation difference value range, the device can identify the base and the first calibration block from the image and determine that the calibration of the CCD camera can be realized. If the grayscale difference value between the base grayscale and the first calibration block in the captured image is too small, it is necessary to adjust the base color of the calibration assembly or the pattern color of the first calibration block so that the difference value between the base grayscale and the grayscale of the first calibration block satisfies a grayscale difference value range. For example, the grayscale difference value range may be set so that the difference value between the base grayscale and the grayscale of the first calibration block is 30 or more, and the grayscale of the first calibration block is lower than the base grayscale.
[0120] Based on the CCD camera calibration method provided by the above embodiment, the present application correspondingly further provides a specific embodiment of a CCD calibration device. Please refer to the following embodiment.
[0121] First, as shown in FIG. 11, the CCD calibration device 1100 provided by the embodiment of the present application includes: an imaging module 1101 for acquiring a first image, which is an image obtained by imaging the calibration assembly with a CCD camera when the calibration assembly moves to the transmission mechanism at a first moving speed; an identification module 1102 for identifying feature points in each of the first calibration patterns that belong to the same first calibration block from the first image; a positioning module 1103 for determining the coordinate positions of feature points in each of the first calibration patterns belonging to the same first calibration block in a calibration coordinate system determined by the positions of the positioning marks in the first image; a calculation module 1104 for determining a pitch between two adjacent feature points according to positions of the feature points in each of the first calibration patterns belonging to the same first calibration block; and a calibration module 1105 for obtaining a transformation matrix of the intrinsic and extrinsic parameters of the CCD camera by the pitch and the coordinate position of each feature point in the calibration coordinate system in the first image.
[0122] In this embodiment, the device controls the CCD camera to photograph the calibration assembly to obtain a first image, the device identifies the feature points of each first calibration pattern in the same first calibration block, and the calibration coordinate system is specified by the positioning mark in the same first calibration block, and then the corresponding position of each feature point in the calibration coordinate system can be specified. Since the pitch between each first calibration pattern in the same first calibration block is preset, the pitch between the feature points of each first calibration pattern may be specified in advance. The pitch between each two adjacent feature points can be specified by the position of the feature points in each first calibration pattern. In the first image obtained by photographing, the pixel distance between each feature point can be calculated by specifying the coordinate position of the corresponding pixel of each first calibration pattern in the calibration coordinate system by the coordinate position of the corresponding pixel of each first calibration pattern in the calibration coordinate system. The transformation matrix of the internal and external parameters of the CCD camera can be calculated by the pitch and pixel distance between each feature point. By photographing a first calibration pattern uniformly arranged on the calibration assembly, a transformation matrix of the internal and external parameters of the CCD camera is obtained by the first image and the predetermined coordinate position of the first calibration pattern. When calibrating the CCD camera, there is no need to install and move an actual product on the transmission mechanism, which prevents the calibration results from being affected by dimensional errors of the product and improves the accuracy of the calibration results.
[0123] In one embodiment of the present application, in order to verify the calculated transformation matrix, the CCD calibration device 1100 further includes: a second photographing module for acquiring a second image of the verification belt, the second image being 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, on which a plurality of stripes are disposed at equal pitches, moves at a second moving speed; a second calculation module for determining a measured pitch between adjacent fringes according to the positions of the fringes in the second image and the transformation matrix; and a verification module for verifying a transformation matrix of the CCD camera according to the measurement pitch and a standard pitch between adjacent fringes.
[0124] In one embodiment of the present application, to determine the measured pitch of adjacent fringes, the second calculation module further comprises: a coordinate unit for identifying a coordinate position of a pixel of each stripe in the calibration coordinate system according to the position of the stripes in the second image; and a calculation unit for calculating a measured pitch between adjacent stripes according to a coordinate position of a pixel of each stripe in the calibration coordinate system and the transformation matrix.
[0125] In one embodiment of the present application, in order to verify whether the transformation matrix meets the requirements, the verification module further comprises: an error unit for calculating a calibration error according to a standard pitch and a measured pitch between adjacent fringes; a comparison unit for comparing each calibration error with a predetermined error threshold; and a verification unit for determining that the transformation matrix has failed verification if a number of calibration errors greater than a predetermined error threshold for each calibration error reaches a predetermined verification threshold.
[0126] In one embodiment of the present application, in order to reduce the number of times of verification and improve the verification efficiency, the CCD calibration device 1100 further includes: a fitting module for calculating a distortion parameter fitting curve of the CCD camera according to a coordinate position of each feature point in the first image in a calibration coordinate system; an accuracy module for determining a fitting accuracy of the distortion parameter fitting curve according to a coordinate position of each feature point in the first image in a calibration coordinate system and the distortion parameter fitting curve; The imaging device may further include the second imaging module that acquires a second image when the fitting accuracy reaches a predetermined accuracy threshold.
[0127] In one embodiment of the present application, in order to achieve quick and rough positioning, the calibration pattern unit further includes a second calibration block, which is installed on one side of the first calibration block along the width direction of the calibration assembly, and the identification module 1102 is further used to position the first calibration block belonging to the same calibration pattern unit based on information of the second calibration block in the first image.
[0128] Although the CCD calibration apparatus 1000 provided in the embodiment of the present application can implement each step in the method embodiment of FIGS. 4 to 9, the description thereof will be omitted here to avoid duplication.
[0129] FIG. 12 shows a hardware structure schematic diagram of a computing device provided by an embodiment of the present application.
[0130] The computing device may include a processor 1201 and a memory 1202 that stores computer program instructions.
[0131] In particular, the processor 1201 may include a Central Processing Unit (CPU) or an Application Specific Integrated Circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0132] Memory 1202 may include mass memory used for data and instructions. For example, but not limited to, memory 1202 may include a hard disk drive (HDD), a floppy disk drive, 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. Where appropriate, memory 1202 may include removable or non-removable (or fixed) media. Where appropriate, memory 1202 may be located internal or external to the integrated gateway disaster recovery device. In certain embodiments, memory 1202 is a non-volatile solid-state memory.
[0133] 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 / tangible memory storage devices. Thus, in general, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoding software that includes computer-executable instructions, and when that software is executed (e.g., by one or more processors), it can operate to perform the operations described in the methods according to one aspect of the present disclosure.
[0134] The processor 1201 reads and executes computer program instructions stored in the memory 1202 to realize any one of the CCD camera calibration methods in the above embodiments.
[0135] 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, the memory 1202, and the communication interface 1203 are connected by the bus 1210 and complete communication between them.
[0136] The communication interface 1203 is mainly used to realize communication between each module, apparatus, unit and / or device in the embodiment of the present application.
[0137] Bus 1210 may include hardware, software, or both, and may couple components of a computing device together. For example, a bus may include, but is not limited to, 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 Infinite Bandwidth Interconnect, a Low Pin-in Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Accessory (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or any other suitable bus, or a combination of two or more thereof. In appropriate circumstances, bus 1210 may include one or more buses. Although embodiments herein have been illustrated and described with particular buses, the present application contemplates any suitable bus or interconnect.
[0138] The computing device can implement the CCD camera calibration method and apparatus described with reference to FIGS. 1 to 6 according to the above embodiments.
[0139] In addition to the CCD camera calibration method in the above embodiment, the embodiment of the present invention can be realized by providing a computer storage medium. The computer storage medium stores computer program instructions. When the computer program instructions are executed by a processor, the CCD camera calibration method in any one of the above embodiments can be realized and the same technical effect can be achieved, but in order to avoid duplication, the description will be omitted here. Wherein, the computer readable storage medium can include a non-transitory computer readable storage medium, such as, but not limited to, a read only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0140] It should be noted 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, detailed descriptions of known methods are omitted here. In the above embodiments, some specific steps are 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 between steps after understanding the spirit of the present application.
[0141] The functional blocks shown in the above-mentioned block diagrams can be realized as hardware, software, firmware, or a combination thereof. In the case of a hardware implementation, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), appropriate firmware, a plug-in, a function card, or the like. In the case of a software implementation, the elements of the present application are programs or code segments for performing the necessary tasks. The programs or code segments may be stored in a machine-readable medium, or may be transmitted by a data signal carried on a carrier wave to a transmission medium or a communication link. The "machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, and the like. The code segments may be downloaded via a computer network such as the Internet, an intranet, or the like.
[0142] It should be noted that the exemplary embodiments mentioned herein describe some methods or systems based on a sequence of steps or devices, however, the present application is not limited to the order of steps mentioned above, i.e. steps can be performed in the order mentioned in the embodiments, out of the order in the embodiments, or some steps can be performed simultaneously.
[0143] The above describes the various aspects of the present disclosure with reference to flowcharts and / or block diagrams of methods, devices, and computer program products according to the embodiments of the present disclosure. It should be understood that each block in the flowcharts and / or block diagrams, and combinations of each block in the flowcharts and / or block diagrams, may be realized by computer program instructions. These computer program instructions are provided to a processor of a general purpose computer, a special purpose computer, or other programmable data processing device, thereby generating an apparatus, such that the instructions executed by the processor of the computer or other programmable data processing device realize the functions / operations specified in one or more blocks in the flowcharts and / or block diagrams. Such a processor may be, but is not limited to, a general purpose processor, a special purpose processor, a special application processor, or a field programmable logic circuit. It should be understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be realized by dedicated hardware that performs the specified functions or operations, or by a combination of dedicated hardware and computer instructions.
[0144] As described above, the present application is merely a specific embodiment of the present application, and those skilled in the art will understand that the specific operation processes of the above-described systems, modules and units can refer to the corresponding processes in the above-described method examples for convenience and brevity, but the description will be omitted here. It should be understood that the scope of protection of the present application is not limited thereto, and those skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and all of these modifications or replacements should be included in the scope of protection of the present application.
Claims
1. A transmission mechanism; a calibration assembly mounted on the transmission mechanism, the calibration assembly including a plurality of calibration pattern units arranged along a length direction, each of the calibration pattern units including a first calibration block including a positioning mark and a plurality of uniformly arranged first calibration patterns; a CCD camera for photographing the calibration assembly to obtain a first image as the calibration assembly moves; a processing module communicatively connected to the CCD camera and calculating a transformation matrix of an internal and external parameter of the CCD camera according to the first image; 1. A CCD camera calibration system comprising:
2. Further, a verification belt having a plurality of stripes distributed at equal pitches is provided for replacing the calibration assembly after obtaining the transformation matrix of the internal and external parameters of the CCD camera; 2. The CCD camera calibration system according to claim 1.
3. the verification belt is a white base film sheet and the stripes are black stripes; 3. The CCD camera calibration system according to claim 2.
4. the calibration assembly includes a calibration belt, the calibration belt having a white base, and the first calibration pattern having a black color; 2. The CCD camera calibration system according to claim 1.
5. the first calibration pattern is circular; 5. The CCD camera calibration system according to claim 4.
6. the calibration pattern unit further includes a second calibration block disposed on one side of the first calibration block along a width direction of the calibration assembly; 2. The CCD camera calibration system according to claim 1.
7. the calibration pattern unit includes a plurality of first calibration blocks arranged along a width direction of the calibration assembly, the calibration assembly is divided into a stripe shape on the transmission mechanism, and then separated into a plurality of sub-calibration assemblies, each of which includes at least one first calibration block; 2. The CCD camera calibration system according to claim 1.
8. When the calibration assembly moves to a transmission mechanism at a first moving speed, a CCD camera acquires a first image, which is an image obtained by photographing the calibration assembly, the calibration assembly is installed on the transmission mechanism, and the calibration assembly is provided with a plurality of calibration pattern units arranged along a length direction, each of the plurality of calibration pattern units having a first calibration block including a positioning mark and a plurality of uniformly arranged first calibration patterns; identifying feature points in each of the first calibration patterns that belong to the same first calibration block from the first image; Identifying coordinate positions in a calibration coordinate system, which is specified by the positions of the positioning marks in the first image, of feature points in each of the first calibration patterns belonging to the same first calibration block; specifying a pitch between two adjacent feature points based on positions of the feature points in each of the first calibration patterns belonging to the same first calibration block; and obtaining a transformation matrix of intrinsic and extrinsic parameters of the CCD camera by the pitch and a coordinate position of each feature point in the first image in a calibration coordinate system. A method for calibrating a CCD camera.
9. A transformation matrix of the internal and external parameters of the CCD camera is obtained by the pitch and the coordinate position of each feature point in the first image in the calibration coordinate system, and then: replacing the calibration assembly with a verification belt, and when the verification belt moves at a second moving speed, the CCD camera acquires a second image, which is an image obtained by photographing the verification belt on which a plurality of stripes are disposed at equal pitches; determining a measured pitch between adjacent fringes according to the positions of the fringes in the second image and the transformation matrix; and verifying a transformation matrix of the CCD camera with the measurement pitch and a standard pitch between adjacent fringes.
9. The method for calibrating a CCD camera according to claim 8.
10. and prior to acquiring the second image, Calculating a distortion parameter fitting curve of the CCD camera according to a coordinate position in a calibration coordinate system of each feature point in the first image; determining a fitting accuracy of the distortion parameter fitting curve by using a coordinate position in a calibration coordinate system of each feature point in the first image and the distortion parameter fitting curve; Obtaining the second image includes: acquiring a second image when the fitting accuracy reaches a predetermined accuracy threshold; 10. The method for calibrating a CCD camera according to claim 9.
11. Determining a measured pitch between adjacent fringes according to the positions of the fringes in the second image and the transformation matrix includes: determining a coordinate location of a pixel of each stripe in the calibration coordinate system according to the location of the stripes in the second image; calculating a measured pitch between adjacent stripes using the coordinate position of a pixel of each stripe in the calibration coordinate system and the transformation matrix; 10. The method for calibrating a CCD camera according to claim 9.
12. Verifying a transformation matrix of the CCD camera with the measurement pitch and a standard pitch between adjacent fringes, Calculating a calibration error according to a standard pitch and a measured pitch between adjacent fringes; comparing each calibration error with a predetermined error threshold; and determining that the transformation matrix has failed validation when a number of calibration errors greater than a predetermined error threshold for each calibration error reaches a predetermined validation threshold.
10. The method for calibrating a CCD camera according to claim 9.
13. the calibration pattern unit further includes a second calibration block disposed on one side of the first calibration block along a width direction of the calibration assembly, before identifying feature points in each of the first calibration patterns that belong to the same first calibration block from the first image; positioning a first calibration block belonging to the same calibration pattern unit based on information of the second calibration block in the first image; 9. The method for calibrating a CCD camera according to claim 8.
14. the second calibration block is rectangular; 14. The method for calibrating a CCD camera according to claim 13.
15. the first calibration pattern is circular, and the feature point is a circle center.
9. The method for calibrating a CCD camera according to claim 8.
16. a photographing module for photographing the calibration assembly with a CCD camera when the calibration assembly moves to a transmission mechanism at a first moving speed, the calibration assembly being installed on the transmission mechanism, the calibration assembly being provided with a plurality of calibration pattern units arranged along a length direction, each of the plurality of calibration pattern units including a first calibration block including a positioning mark and a plurality of uniformly arranged first calibration patterns; an identification module for identifying feature points in each of the first calibration patterns that belong to the same first calibration block from the first image; a module for determining the coordinate positions of feature points in each of the first calibration patterns belonging to the same first calibration block in a calibration coordinate system determined by the positions of the positioning marks in the first image; a calculation module that determines a pitch between two adjacent feature points based on positions of the feature points in each of the first calibration patterns that belong to the same first calibration block; a calibration module for obtaining a transformation matrix of an internal and external parameter of the CCD camera by the pitch and a coordinate position of each feature point in the first image in a calibration coordinate system; 1. A CCD calibration device comprising:
17. a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the CCD camera calibration method according to any one of claims 8 to 15. A computing device comprising:
18. having computer program instructions stored therein; The computer program instructions, when executed by a processor, implement the CCD camera calibration method according to any one of claims 8 to 15. A computer storage medium comprising:
Citation Information
Patent Citations
High-precision hand-eye calibration method for garbage sorting robot
CN113506349A
Systems and methods for multi-camera placement
US20190364206A1