WO2023097647A1 - Ccd相机标定系统、方法、装置、计算设备及存储介质 - Google Patents

Ccd相机标定系统、方法、装置、计算设备及存储介质 Download PDF

Info

Publication number
WO2023097647A1
WO2023097647A1 PCT/CN2021/135305 CN2021135305W WO2023097647A1 WO 2023097647 A1 WO2023097647 A1 WO 2023097647A1 CN 2021135305 W CN2021135305 W CN 2021135305W WO 2023097647 A1 WO2023097647 A1 WO 2023097647A1
Authority
WO
WIPO (PCT)
Prior art keywords
calibration
ccd camera
image
block
verification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2021/135305
Other languages
English (en)
French (fr)
Inventor
邱桂加
黄靖华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Contemporary Amperex Technology Co Ltd
Original Assignee
Contemporary Amperex Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Contemporary Amperex Technology Co Ltd filed Critical Contemporary Amperex Technology Co Ltd
Priority to CN202180096855.7A priority Critical patent/CN117157670B/zh
Priority to EP21966074.3A priority patent/EP4296952A4/en
Priority to JP2023555177A priority patent/JP7653536B2/ja
Priority to KR1020237030659A priority patent/KR20230144591A/ko
Priority to PCT/CN2021/135305 priority patent/WO2023097647A1/zh
Publication of WO2023097647A1 publication Critical patent/WO2023097647A1/zh
Priority to US18/412,624 priority patent/US20240153141A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/002Diagnosis, testing or measuring for television systems or their details for television cameras
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/33Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
    • G06T7/337Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods involving reference images or patches
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/70SSIS architectures; Circuits associated therewith
    • H04N25/71Charge-coupled device [CCD] sensors; Charge-transfer registers specially adapted for CCD sensors
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30204Marker
    • G06T2207/30208Marker matrix

Definitions

  • the present application relates to the technical field of equipment calibration, in particular to a CCD camera calibration system, method, device, computing equipment and storage medium.
  • the calibration method for the CCD camera is usually to attach a detection label on the product, and when the product and the detection label move together, the CCD camera photographs the detection label and the product to obtain the CCD The transformation matrix of the camera.
  • the embodiment of the present application provides a CCD camera calibration system, method, device, computing equipment and storage medium, which can solve the technical problem of measurement errors in the existing CCD camera calibration methods.
  • the embodiment of the present application provides a CCD camera calibration system, and the CCD camera calibration system includes:
  • a calibration assembly the calibration assembly is arranged on the transmission mechanism, the calibration assembly is provided with a plurality of calibration pattern units arranged along the length direction, the calibration pattern unit includes a first calibration block, and the first calibration block It includes positioning marks and a plurality of evenly arranged first calibration graphics;
  • a CCD camera the CCD camera is used to photograph the calibration component to obtain a first image when the calibration component is running;
  • a processing module the processing module is communicatively connected with the CCD camera, and the processing module is used to calculate a transformation matrix of internal and external parameters of the CCD camera according to the first image.
  • the calibration component By setting the calibration component to run on the transmission mechanism and shooting the calibration graphics on the calibration component, the calibration of the CCD camera can be realized, and the actual product can be avoided for calibration, thereby avoiding the calibration result being affected by the product size error and improving the quality of the product. Accuracy of calibration results.
  • the calibration result includes the included angle of the movement direction of the calibration components, which can overcome the influence of misalignment between the various coordinate systems in the static calibration method.
  • the CCD camera calibration system also includes:
  • the verification tape is used to replace the calibration component after obtaining the transformation matrix of the internal and external parameters of the CCD camera, and the verification tape is provided with a plurality of stripes distributed at equal intervals.
  • the calibration results can be verified by setting a verification belt, which can improve the accuracy of the CCD camera calibration.
  • the verification tape is a film sheet with a white base, and the stripes are black stripes.
  • the calibration component includes a calibration tape, the calibration tape is a white base, and the color of the first calibration graphic is black.
  • the first calibration graphic By setting the base color of the calibration component and the color of the first calibration graphic, the first calibration graphic can be accurately identified and the recognition accuracy of the first calibration graphic can be improved.
  • the first calibration figure is a circle.
  • the accuracy and reliability of calibration and subsequent measurement can be improved by providing uniformly arranged circular patterns on the calibration component.
  • the marking pattern unit further includes a second marking block, and the second marking block is disposed on one side of the first marking block along the width direction of the marking assembly.
  • the second calibration block is identified from the image to quickly and roughly locate, and after the second calibration block is identified, the adjacent first calibration block can be identified, thereby realizing the calibration process.
  • the marking pattern unit includes a plurality of first marking blocks, and the multiple first marking blocks are arranged along the width direction of the marking assembly;
  • the calibration assembly is configured to be separated into a plurality of sub-calibration sub-assemblies after the transmission mechanism is divided into strips, and each sub-calibration sub-assembly includes at least one first calibration block.
  • a plurality of first calibration blocks are arranged in the width direction of the calibration assembly, so that after the transmission mechanism slitting the calibration assembly, the CCD camera arranged after the slitting position can also photograph at least one complete first calibration block, In this way, the calibration of the CCD camera after the striping position is realized.
  • the embodiment of the present application provides a method for calibrating a CCD camera, the method for calibrating a CCD camera includes:
  • the first image is an image obtained by shooting the calibration assembly when the calibration assembly is running on the transmission mechanism at a first operating speed by the CCD camera;
  • the calibration coordinate system is based on the position of the positioning mark in the first image Sure;
  • the transformation matrix of the internal and external parameters of the CCD camera after obtaining the transformation matrix of the internal and external parameters of the CCD camera according to the distance and the coordinate positions of each feature point in the first image in the calibration coordinate system, it also includes:
  • the second image is an image obtained by the CCD camera shooting the verification tape when the calibration component is replaced with a verification tape and the verification tape is running at a second operating speed, and the verification tape A plurality of stripes distributed at equal intervals are arranged on it;
  • the transformation matrix of the CCD camera is verified according to the measured spacing and the standard spacing between adjacent stripes.
  • the calibration results can be verified by setting a verification belt, which can improve the accuracy of the CCD camera calibration.
  • before acquiring the second image it also includes:
  • the acquisition of the second image includes:
  • the determining the measurement distance between adjacent stripes according to the position of the stripes in the second image and the transformation matrix includes:
  • the measurement distance between adjacent stripes is calculated.
  • the measurement distance between adjacent stripes in the captured second image can be calculated, and the calibration can be determined by comparing the measurement distance with the actual standard distance The precision of the result.
  • the verification of the transformation matrix of the CCD camera according to the measured distance and the standard distance between adjacent stripes includes:
  • the calibration pattern unit further includes a second calibration block, and the second calibration block is arranged on one side of the first calibration block along the width direction of the calibration component;
  • the first marking block belonging to the same marking pattern unit is located according to the information of the second marking block in the first image.
  • the second marking block is a rectangle.
  • the second marking block is arranged in a rectangular pattern to facilitate identification.
  • the first calibration figure is a circle
  • the feature point is the center of the circle
  • the first calibration graphic is set as a circle, which can quickly and accurately determine the position of the center of the circle and use it as a feature point. Compared with setting other shapes and fitting feature points, it can improve the accuracy and stability of feature points,
  • the embodiment of the present application provides a CCD calibration device, and the CCD calibration device includes:
  • the photographing module is used to obtain a first image, and the first image is an image obtained by photographing the calibration assembly when the CCD camera operates on the transmission mechanism at a first operating speed;
  • An identification module configured to identify feature points in each of the first calibration figures belonging to the same first calibration block from the first image
  • a positioning module configured to determine the coordinate positions of the feature points in each of the first calibration graphics belonging to the same first calibration block in the calibration coordinate system, and the calibration coordinate system is located in the first calibration coordinate system according to the positioning mark a position determination in the image;
  • a calculation module configured to determine the distance between two adjacent feature points according to the positions of the feature points in each of the first calibration figures belonging to the same first calibration block;
  • the calibration module is configured to obtain a transformation matrix of internal and external parameters of the CCD camera according to the distance and the coordinate positions of each feature point in the first image in the calibration coordinate system.
  • an embodiment of the present application provides a computing device, the computing device including: a processor and a memory storing computer program instructions;
  • an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above-mentioned CCD camera calibration method is implemented.
  • the CCD camera calibration system sets the calibration component at the position where the coil is placed on the transmission mechanism, so that the calibration component can run on the conveyor belt of the transmission mechanism and control the calibration component on the transmission mechanism.
  • the CCD camera can obtain the first image containing the positioning mark and a plurality of evenly arranged first calibration graphics by photographing the calibration pattern unit on the calibration component, and the transformation of the internal and external parameters of the CCD camera can be calculated according to the first image matrix.
  • the transformation matrix of the internal and external parameters of the CCD camera can be obtained according to the first image and the first calibration graphics.
  • Fig. 1 is a schematic structural diagram of a CCD camera calibration system provided by an embodiment of the present application
  • Fig. 2 is a schematic structural view of the calibration assembly in the embodiment of Fig. 1;
  • Fig. 3 is a schematic structural view of the verification tape in the embodiment of Fig. 1;
  • Fig. 4 is a schematic flow chart of a CCD camera calibration method provided by an embodiment of the present application.
  • FIG. 5 is a schematic flow chart of a CCD camera calibration method provided by another embodiment of the present application.
  • FIG. 6 is a schematic flow chart of a CCD camera calibration method provided in another embodiment of the present application.
  • Fig. 7 is a schematic flow chart of a CCD camera calibration method provided by another embodiment of the present application.
  • Fig. 8 is a schematic flow chart of a CCD camera calibration method provided by another embodiment of the present application.
  • Fig. 9 is a schematic flow chart of a CCD camera calibration method provided by another embodiment of the present application.
  • FIG. 10 is a fitting curve diagram of distortion parameters of a CCD camera in an embodiment of the present application.
  • FIG. 11 is a schematic structural view of a CCD calibration device provided by an embodiment of the present application.
  • Fig. 12 is a schematic diagram of a hardware structure of a computing device provided by an embodiment of the present application. ;
  • the existing CCD camera calibration method is usually to attach a detection label on the product, and when the product and the detection label move together, the detection label and the product are photographed by the CCD camera to obtain the transformation matrix of the CCD camera.
  • the transformation matrix obtained by the CCD camera based on the product and the detection label is prone to measurement errors, resulting in large errors in the calibration results.
  • the embodiments of the present application provide a CCD camera calibration system, method, device, computing equipment and storage medium. Firstly, the CCD camera calibration system provided by the embodiment of the present application will be introduced below.
  • FIG. 1 shows a schematic structural diagram of a transmission mechanism and a CCD camera in a CCD camera calibration system provided by an embodiment of the present application.
  • the CCD camera calibration system includes a transmission mechanism, a calibration component, a CCD camera 20 and a processing module (not shown).
  • the calibration component can be disposed on the transmission mechanism.
  • the marking assembly is provided with a plurality of marking pattern units 30 arranged along the length direction, and the marking pattern unit 30 includes a first marking block 31, which includes positioning representations and a plurality of uniformly arranged first marking figures 311.
  • a transport mechanism may be a device used to transport products.
  • the transmission mechanism may be a die-cutting machine or other transmission equipment, and the transmission mechanism is provided with a conveyor belt 10 .
  • the calibration assembly can run on the conveyor belt 10 of the transmission mechanism, and the CCD camera 20 can photograph the calibration assembly when the calibration assembly is running on the conveyor belt 10 to obtain a corresponding first image.
  • the processing module is connected in communication with the CCD camera 20, and the processing module can obtain the first image after the first image is captured by the CCD camera 20, and calculate the transformation matrix of the internal and external parameters of the CCD camera 20 according to the first image, thereby realizing the CCD camera 20. calibration.
  • the processing module After the processing module acquires the first image, it can recognize the calibration pattern unit 30 from the first image, and according to the first calibration block 31 in the calibration pattern unit 30, it can determine the corresponding positioning mark 312 and a plurality of evenly arranged first Calibration graph 311 .
  • the processing module can determine the corresponding calibration coordinate system according to the positioning mark 312, and calculate according to the coordinate positions of the multiple first calibration graphics 311 in the calibration coordinate system and the pixels corresponding to the multiple first calibration graphics 311 respectively, so as to obtain the CCD camera 20 transformation matrix of internal and external parameters.
  • the calibration assembly can be made to run on the conveyor belt 10 of the transmission mechanism, and the CCD camera 20 can be arranged at a fixed position next to the transmission mechanism, and the fixed area on the transmission mechanism can be monitored.
  • Shooting when the calibration component runs to the shooting area of the CCD camera 20 , the CCD camera 20 can shoot the calibration component to obtain a first image including the calibration pattern unit 30 .
  • the first image includes a first calibration block 31, and the first calibration block 31 includes a positioning mark 312 and a plurality of first calibration graphics 311, and the positioning mark 312 can represent the running direction of the calibration component and the calibration coordinate system of the first calibration block 31 , the multiple first calibration graphics 311 are evenly arranged according to a preset arrangement.
  • the processing module can determine the calibration coordinate system according to the positioning mark 312, and can determine the first image and the calibration coordinate system according to the pixels corresponding to the multiple first calibration graphics 311 in the first image and the coordinate positions originally corresponding to the multiple first calibration graphics 311 Corresponding relationship, so as to calculate the transformation matrix of the internal and external parameters of the CCD camera 20.
  • the transformation matrix of the internal and external parameters of the CCD camera 20 can be obtained according to the first image and the preset coordinate position of the first calibration graphics 311, without the need to set the actual parameters on the transmission mechanism.
  • the product can realize the calibration of the CCD camera 20, which avoids the influence of the calibration result by the size error of the product, and improves the accuracy of the calibration result.
  • a plurality of CCD cameras 20 can be installed at different positions beside the transmission mechanism to photograph and detect different transmission areas on the transmission mechanism.
  • Multiple CCD cameras 20 can make the calibration results of the CCD cameras 20 include the included angle of the movement direction of the calibration components by photographing the calibration components running on the transmission mechanism. Compared with the static calibration method, it can also overcome the influence of misalignment between the various coordinate systems under static calibration.
  • the marking component may be configured as a band, ie the marking component may comprise a marking band.
  • the calibration tape can be set according to the coil material. Specifically, the inner diameter of the calibration tape is consistent with the inner diameter of the actual product coil material of the transmission mechanism, and the length of the calibration component is longer than the transmission mechanism. The length of the tape so that the calibration tape can be placed in the conveyor where the coil is placed and run on the conveyor to cover the entire run of the conveyor.
  • the marking tape is provided with a plurality of marking pattern units 30 arranged along the lengthwise direction, when the marking tape runs to cover the transport mechanism, the CCD camera 20 in each different position can be photographed in its shooting area containing at least A complete calibration of the first image of the pattern unit 30 and the calibration of the CCD camera 20 can be achieved, and when multiple cameras are provided, simultaneous calibration of multiple cameras can be achieved.
  • the calibration component can also be directly attached to the conveyor belt 10 of the transmission mechanism.
  • the CCD camera 20 can take pictures of the calibration components attached to the surface of the conveyor belt 10 .
  • the CCD camera 20 is usually a line-scan camera, and when there is a large difference between the installation angle of the line-scan camera and the direction in which the product runs on the transmission mechanism, the processing module can also use each first image in the captured first image. Calibrate the figure 311 to determine the angle between the installation position of the CCD camera 20 and the product running direction of the transmission mechanism, so that when there is a large difference between the installation angle of the CCD camera 20 and the direction of product movement on the transmission mechanism, the calibration of the CCD camera 20 can still be realized .
  • the calibration system for the CCD camera 20 may further include a verification tape.
  • the verification tape is provided with a plurality of stripes 41 distributed at equal intervals.
  • the verification tape can be used to replace the calibration Assemblies, when the verification tape is running on the transmission mechanism, the CCD camera 20 can photograph the stripes 41 on the verification tape, and calculate the measurement of the adjacent stripes 41 by using the calculated transformation matrix of internal and external parameters according to the captured image spacing.
  • the standard spacing of adjacent stripes 41 is preset when making the verification tape, it can be determined whether the calculated transformation matrix of internal and external parameters has passed the verification according to the measurement spacing obtained by shooting calculation and the original standard spacing.
  • the CCD camera 20 completes the calibration process.
  • the transformation matrix of the parameters can calculate the measurement distance of adjacent stripes 41, and compare the measurement distance with the standard distance between the stripes to determine the accuracy of the calibration result of the CCD camera 20, so that the calibration of the CCD camera 20 can be carried out. verify.
  • the above-mentioned verification tape may be made of a film with a white base, and the stripes 41 on the verification tape may be black stripes 41 .
  • the CCD camera 20 captures the image of the verification tape, it can identify the white base and black stripes 41 in the image, thereby realizing the verification of the calibration process of the CCD camera 20 .
  • the base color of the verification tape or the color of the stripes 41 can also be set to other colors, so that the base and the stripes 41 can be clearly identified in the captured image.
  • the length of the verification belt can be set to be greater than the length of the passing roller of the transmission mechanism, and the verification belt needs to be attached to the surface of the conveyor belt 10 of the transmission mechanism.
  • the above-mentioned marking component can be a white-based marking tape, and the color of the positioning mark 312 and the first marking pattern 311 in the first marking block 31 of the marking pattern unit 30 on the marking component can be set to black.
  • setting the base and graphic colors of the marking component to white and black, respectively, can make the base and the first marking block 31 clearly distinguishable in the image captured by the CCD camera 20, so that according to the identified first marking Block 31 implements the calculation of the transformation matrix of the extrinsic and extrinsic parameters of the CCD camera 20 .
  • the first calibration pattern may be set as a circle, that is, the calibration pattern unit includes a positioning mark and a plurality of evenly arranged circular patterns.
  • each calibration pattern unit 30 on the calibration component can be set to not less than 100mm2, and the shape of the calibration pattern unit 30 can be set as a square or a rectangle.
  • the distance between adjacent first calibration patterns 311 may be set to be no less than 0.05mm.
  • each marking pattern unit 30 in the above marking assembly may further include a second marking block 32, and the second marking block 32 may be disposed on one side of the first marking block 31 along the width direction of the marking assembly. That is, each marking pattern unit 30 includes a first marking block 31 and a second marking block 32 arranged side by side along the width direction of the marking assembly. The second marking blocks 32 may be arranged in a rectangular pattern. After the first image including the first calibration block 31 and the second calibration block 32 is captured, the direction of the coordinate system can be quickly determined through the second calibration block 32 to achieve a rough positioning of the coordinates. After rough positioning, precise coordinate positioning can be achieved through the positioning marks 312 in the first calibration block 31 , and the transformation matrix of internal and external parameters can be calculated according to the pixel positions of each first calibration graphic 311 in the first calibration block 31 .
  • each marking pattern unit 30 in the above-mentioned marking assembly may include a plurality of first marking blocks 31, and the multiple first marking blocks 31 may be arranged along the width direction of the marking assembly.
  • the transmission mechanism may slitting the product during operation.
  • the transmission mechanism can slitting the calibration assembly, so that After the calibration component is separated into multiple sub-calibration components, each sub-calibration component on each belt of the transmission mechanism contains at least one first calibration block 31 .
  • the CCD camera 20 arranged after the striping position of the transmission mechanism can photograph the first calibration block 31 on the sub-calibration assembly, thereby realizing the calibration of the CCD camera 20 after the striping position of the transmission mechanism.
  • two first calibration blocks 31 can be arranged along the width direction of the calibration assembly, and the two first calibration blocks 31 can be symmetrical along the axis of the calibration assembly , the distance between the two first calibration blocks 31 can be set to be no less than 20 mm.
  • each marking pattern unit 30 may include two first marking blocks 31 and one second marking block 32, two first marking blocks 31 and one second marking block 32
  • the marking components can be arranged along the width direction, and the second marking block 32 can be arranged between the two first marking blocks 31 .
  • the second calibration block 32 can be separated into two parts, which are respectively located on the two sub-calibration assemblies. That is, the two sub-calibration components may respectively include a complete first calibration block 31 and a part of the second calibration block 32 .
  • the processing module can also identify part of the second marking block 32 in the first image , in order to realize the fast positioning of the coordinates.
  • the stripes 41 in the above-mentioned verification tape can be arranged as stripes 41 arranged along the width direction.
  • the verification tape runs on the transmission mechanism, the verification tape is separated into a plurality of sub-verifications after passing through the slitting position of the transmission mechanism.
  • the CCD camera 20 after the striping position of the transmission mechanism can also photograph the stripes 41 on the sub-verification tape, so as to realize the verification process of the CCD camera 20 calibration.
  • FIG. 4 shows a schematic flowchart of a calibration method for a CCD camera provided by an embodiment of the present application.
  • the CCD camera calibration method is applied to the CCD calibration device, and the CCD camera calibration method includes:
  • the CCD calibration device can control the CCD camera to take pictures of the calibration components to obtain the first image. After determining the calibration coordinate system, determine the corresponding position of each feature point in the calibration coordinate system. Since the arrangement of each first calibration pattern in the same first calibration block is preset, the distance between the feature points of each first calibration pattern can also be determined according to the corresponding first calibration pattern. According to the positions of the feature points in each first calibration graph, the distance between every two adjacent feature points can be determined. In the captured first image, according to the coordinate position of the pixel corresponding to each first calibration figure in the calibration coordinate system, the coordinate position of the pixel corresponding to each feature point in the calibration coordinate system can be determined, thereby calculating each feature point The distance between pixels.
  • the transformation matrix of the internal and external parameters of the CCD camera can be calculated.
  • the transformation matrix of the internal and external parameters of the CCD camera can be obtained according to the first image and the preset coordinate position of the first calibration graphics.
  • the calibration component may be set on the transmission mechanism, and run at a first running speed on the belt of the transmission mechanism.
  • the device can control the CCD camera to shoot the calibration component when the calibration component is running, so as to obtain the first image.
  • the first image captured by the CCD camera includes at least one first marking block, and each first marking block on the marking assembly includes a positioning mark and a plurality of first marking figures.
  • the device may identify each first calibration pattern in the same first calibration block from the first image, and determine its corresponding feature point according to each first calibration pattern.
  • the first calibration figure can be polygon, circle, ring, ellipse and so on.
  • the corresponding feature points can be the center of gravity, circumcenter, orthocenter, center and side center of the triangle; when the first calibration figure is a circle, the corresponding feature points can be the center of the circle .
  • the positioning mark can be a triangular pattern, and the device can locate the direction of the calibration coordinate system according to the pattern corresponding to the positioning mark in the first image.
  • the device after the device determines the feature points corresponding to each first calibration pattern in the same first calibration block, it can determine the calibration in the first image according to the position of the positioning mark in the first calibration block in the first image. Coordinate System. After determining the calibration coordinate system, the device may 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. Wherein, the coordinate position of the feature point in the calibration coordinate system refers to the pixel coordinate of the feature point.
  • the device may determine the distance between every two adjacent feature points after determining the coordinate positions of the feature points in the calibration coordinate system in each of the first calibration graphics belonging to the same first calibration block.
  • multiple first calibration figures in the same first calibration block are preset, and after determining the coordinate position of each first calibration figure in the calibration coordinate system, any The spacing between the two first calibration graphics. For example, if a plurality of first calibration figures are arranged in an M*N array in the same first calibration block, two adjacent first calibration figures are determined according to the coordinate position of each first calibration figure in the calibration coordinate system. When the calibration graphics are located in the same row, the distance between two adjacent first calibration graphics can be determined as the column spacing. When it is determined that the two adjacent first calibration patterns are located in the same column, the distance between the two adjacent first calibration patterns can be determined as the row spacing.
  • the device may determine the distance between two adjacent feature points according to the positions of the feature points in the first calibration graphics. For example, when the first calibration figure is a circle and the feature point is the center of the circle, for two adjacent circles in the same row, the distance between the two circle centers is the distance between the two circles and the distance between the two circles sum of radii.
  • the device can determine the pixel distance between each feature point according to the corresponding pixel coordinates in the feature point calibration coordinate system . According to the arrangement of each first calibration graphic, the distance between each feature point can be determined. According to the spacing between each feature point and the pixel distance between each feature point, the transformation matrix of the internal and external parameters of the CCD camera can be calculated.
  • the second image is an image obtained by shooting the verification tape by the CCD camera when the calibration component is replaced with a verification tape and the verification tape is running at a second operating speed, the
  • the verification belt is provided with a plurality of stripes distributed at equal intervals;
  • the device when the calibration component is running on the transmission mechanism at the first speed, the device can control the CCD camera to take pictures of the calibration component, and calculate the transformation matrix of the internal and external parameters of the CCD camera according to the first captured image.
  • the calibration component on the transmission mechanism can be replaced with a verification tape, and when the verification tape is running on the transmission mechanism at the second operating speed, the CCD camera is controlled to photograph the verification tape, and The verification is carried out according to the second image taken to verify whether the transformation matrix of the CCD camera meets the accuracy requirement.
  • the calibration component can be replaced with a verification tape, and a plurality of stripes distributed at equal intervals can be arranged on the verification tape.
  • the device can control the CCD camera to photograph the verification tape to obtain a second image.
  • the first running speed and the second running speed can be set to be the same, that is, the running speed of the calibration component and the verification tape on the transmission mechanism is the same In order to avoid pixel errors in the captured first image and the second image caused by the different running speeds of the calibration component and the verification belt on the transmission mechanism.
  • the first running speed and the second running speed can be set to 3m/min.
  • the apparatus may identify each stripe from the second image, and determine the corresponding pixel position of each stripe in the second image.
  • the pixel distance between two adjacent stripes can be determined according to the pixel positions of two adjacent stripes. Through the transformation matrix obtained in the above calibration process and the pixel distance between two adjacent stripes, it can be calculated The measured spacing between two adjacent stripes.
  • the device can directly obtain the standard interval, and compare the standard interval with the measured interval, To verify whether the transformation matrix of the internal and external parameters of the CCD camera meets the accuracy requirements.
  • the above S520 may include:
  • the device can determine the coordinate position of the pixel of each stripe 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 according to the coordinate position of the pixel of each stripe, That is, the number of pixels, through the transformation matrix obtained by the above-mentioned CCD camera shooting calibration component, the pixel distance between adjacent stripes can be converted into the measurement distance between adjacent stripes.
  • the device may determine the coordinate position of the pixel of each stripe in the calibration coordinate system according to the position of each stripe in the second image.
  • the coordinate position is the pixel coordinate corresponding to each stripe.
  • the device may determine the pixel distance between adjacent stripes according to the pixel coordinates 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 two stripes. The device may also determine the stripe feature points corresponding to each stripe, and the pixel distance between adjacent stripes may also be the pixel distance between two adjacent stripe feature points. After determining the pixel distance between adjacent stripes, according to the transformation matrix of the CCD camera, the measurement distance between adjacent stripes can be calculated according to the pixel distance between adjacent stripes.
  • the above S530 may include:
  • the device can obtain the calibration error according to the standard spacing and measurement spacing of adjacent stripes, and can verify the transformation matrix obtained by this calibration according to the calibration error and the preset error threshold. If the transformation matrix passes the verification, the calibration process is ended and the transformation matrix is stored. If the transformation matrix fails to pass the verification, a verification failure message will be sent to the user, and the CCD camera will be calibrated again. By setting the verification belt for secondary verification, the transformation matrix obtained by the calibration of the CCD camera can meet the accuracy requirements.
  • the device After the device acquires the measured spacing and the standard spacing between each adjacent stripe, it can calculate the calibration error corresponding to each adjacent stripe.
  • the calibration error may be the difference between the standard distance and the measured distance.
  • the device may compare each calibration error with a preset error threshold, and determine whether each calibration error is greater than the preset error threshold.
  • the device sequentially compares the multiple calibration errors with the preset error threshold, it can count each time a calibration error is determined to be greater than the preset error threshold, so as to count the number of calibration errors greater than the preset error threshold .
  • the count value reaches the preset verification threshold, it means that the transformation matrix has large errors in multiple different positions, and the product cannot be calibrated accurately, and the device can determine that the transformation matrix calculated during the calibration process has not passed the verification.
  • the device can confirm that the transformation matrix calculated in this calibration process has passed the verification.
  • the device may also judge whether the transformation matrix passes the verification according to the number of calibration errors that are continuously greater than a preset error threshold. For example, when multiple consecutive calibration errors are greater than the preset error threshold, it may be determined whether the consecutive numbers reach the preset verification threshold. For example, when the preset error threshold is 0.05, it can be determined whether there are at least 4 consecutive calibration errors greater than the preset error threshold, and if there are at least 4 consecutive calibration errors greater than 0.05, it can be determined that the transformation matrix has not passed the verification.
  • the above S510 may include:
  • the device after the device captures the calibration component with the CCD camera and calculates the transformation matrix of the CCD camera, it can also calculate and generate the distortion parameter fitting curve of the CCD camera according to each feature point in the first image, and judge the distortion Fitting accuracy of the parametric fitted curve.
  • the calibration component is replaced with a verification tape and a second image is taken for verification. If the fitting accuracy of the distortion parameter fitting curve does not meet the preset requirements, there is no need to replace the calibration component with a verification tape, and it can be directly determined that the transformation matrix does not meet the calibration accuracy requirements.
  • the calibration component can be reset on the transmission mechanism, and the first image can be taken again for calibration. Before verification through the verification tape, the transformation matrix can be screened directly according to the fitting accuracy of the CCD camera distortion parameter fitting curve. Calibration accuracy requirements do not require an additional verification belt for verification, thereby reducing the number of verifications and improving verification efficiency.
  • the device After the device determines the coordinate position of each feature point in the calibration coordinate system, it can 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. According to the pixel coordinates corresponding to 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.
  • the device can generate multiple samples according to the distortion parameters corresponding to different positions in the CCD camera, and perform curve fitting according to the multiple samples to obtain the fitting curve between the position and the distortion parameters, which is the CCD camera's Distortion parameter fit curve.
  • the fitting accuracy of the distortion parameter fitting curve can be determined according to the coordinate positions of each feature point in the calibration coordinate system in the first image and the distortion parameter fitting curve.
  • the goodness of fit can be used to characterize the fitting accuracy of the distortion parameter fitting curve.
  • the goodness-of-fit statistic is the coefficient of determination of the distortion parameter fitting curve.
  • x1, x2, ... xn are coordinates of different positions of the CCD camera, respectively, and y1, y2, ... yn are distortion parameters corresponding to coordinates of different positions.
  • the distortion parameter fitting curve of the CCD camera is obtained by curve fitting.
  • the corresponding fitting prediction distortion parameter values are:
  • the coefficient of determination of the distortion parameter fitting curve can be calculated according to the distortion parameter fitting curve and samples corresponding to each feature point.
  • the fitting accuracy of the distortion parameter fitting curve can be compared with the preset accuracy threshold, and when the fitting accuracy reaches the preset accuracy threshold, it can be determined that The fitting degree of the distortion parameter fitting curve is relatively high, and the calibration component is replaced with a verification tape to carry out the verification process of CCD camera calibration.
  • the preset accuracy threshold can be set to 0.95. After calculating the coefficient of determination of the distortion parameter fitting curve, it can be judged whether the coefficient of determination is greater than Preset accuracy threshold. When the coefficient of determination reaches a preset accuracy threshold, the calibration component can be replaced with a verification tape and the transformation matrix can be verified. If the coefficient of determination is less than the preset accuracy threshold, the verification process is not performed, and the CCD camera is re-calibrated.
  • the distortion parameter fitting curve of the CCD camera can be generated according to the distortion parameter fitting of each position in each CCD camera, and the fitting accuracy can be calculated according to the fitting parameter fitting curve .
  • two CCD cameras are selected from multiple CCD cameras, and the fitting accuracy of the distortion parameter fitting curves of the two CCD cameras are respectively calculated to be 0.9836 and 0.9683.
  • the preset accuracy threshold is set to 0.95, the fitting accuracy of the distortion parameter fitting curves corresponding to the two CCD cameras is greater than the preset accuracy threshold, then it can be determined that the distortion parameter fitting curves of the two CCD cameras meet the accuracy requirements , you can further set the verification belt and take pictures of the verification belt through the CCD camera for verification.
  • the above-mentioned calibration pattern unit may also include a second calibration block, and the second calibration block is arranged on the first calibration block along the width direction of the calibration assembly.
  • One side; before S420, may also include:
  • the device can quickly recognize the pattern of the second calibration block from the first image, and quickly determine the direction of the calibration coordinate system according to the pattern, so as to realize the rough positioning of the coordinates .
  • the second calibration block can be set as a rectangular pattern, and the color of the pattern can be set as black. Compared with the first calibration block including positioning marks and multiple first calibration graphics, the device can more quickly identify the first calibration block from the first image. Two calibration blocks, so as to achieve fast and rough positioning.
  • multiple positions next to the transmission mechanism can be respectively provided with multiple CCD cameras.
  • the transmission mechanism can be controlled to stop running. At this time, the images captured by each CCD camera can be viewed separately, and it can be judged that the CCD has captured the image. Whether the image contains a complete calibration pattern unit, and whether the image captured by the CCD can identify the substrate and the first calibration block. For example, the device can pre-set the grayscale difference range between the base and the first calibration block.
  • the device can identify the substrate and the first calibration block from the image, thereby realizing the calibration of the CCD camera. If the difference between the grayscale of the base and the grayscale of the first calibration block in the captured image is too small, it is necessary to adjust the base color of the calibration component or the pattern color of the first calibration block so that the grayscale of the base is consistent with the first calibration block.
  • the difference between the gray levels satisfies the gray level difference range.
  • the grayscale difference range may be set such that the difference between the grayscale of the base and the grayscale of the first calibration block is greater than 30, and the grayscale of the first calibration block is lower than the grayscale of the base.
  • the present application also provides a specific implementation of a CCD calibration device. See the examples below.
  • the CCD calibration device 1100 provided in the embodiment of the present application includes the following modules:
  • An identification module 1102 configured to identify feature points in each of the first calibration graphics belonging to the same first calibration block from the first image
  • the positioning module 1103 is configured to determine the coordinate positions of the feature points in each of the first calibration graphics belonging to the same first calibration block in the calibration coordinate system, and the calibration coordinate system is based on the positioning mark in the position determination in the first image;
  • a calculation module 1104 configured to determine the distance between two adjacent feature points according to the positions of the feature points in each of the first calibration figures belonging to the same first calibration block;
  • the calibration module 1105 is configured to obtain a transformation matrix of internal and external parameters of the CCD camera according to the distance and the coordinate positions of each feature point in the first image in the calibration coordinate system.
  • the device can control the CCD camera to shoot the calibration components to obtain the first image, the device can identify the feature points of each first calibration pattern in the same first calibration block, and based on the same first calibration block in the After the positioning mark determines the calibration coordinate system, determine the corresponding position of each feature point in the calibration coordinate system. Since the distance between each first calibration pattern in the same first calibration block is preset, the distance between the feature points of each first calibration pattern can also be predetermined. According to the positions of the feature points in each first calibration graph, the distance between every two adjacent feature points can be determined.
  • the coordinate position of the pixel corresponding to each feature point in the calibration coordinate system can be determined, thereby calculating each feature point The distance between pixels.
  • the transformation matrix of the internal and external parameters of the CCD camera can be calculated.
  • the above-mentioned CCD calibration device 1100 may also include:
  • the second shooting module is used to acquire a second image, and the second image is obtained by photographing the verification tape by the CCD camera when the calibration component is replaced with a verification tape and the verification tape is running at a second speed.
  • the image of the verification tape is provided with a plurality of stripes distributed at equal intervals;
  • the second calculation module is used to determine the measurement distance between adjacent stripes according to the position of the stripes in the second image and the transformation matrix
  • the verification module is configured to verify the transformation matrix of the CCD camera according to the measured distance and the standard distance between adjacent stripes.
  • the above-mentioned second calculation module may also include:
  • a coordinate unit configured to determine the coordinate position of the pixel of each stripe in the calibration coordinate system according to the position of the stripe in the second image
  • the calculation unit is configured to calculate the measurement distance between adjacent stripes according to the coordinate positions of the pixels of each stripe in the calibration coordinate system and the transformation matrix.
  • the above verification module may also include:
  • the error unit is used to calculate and obtain the calibration error according to the standard distance between adjacent stripes and the measurement distance;
  • a comparison unit configured to compare each calibration error with a preset error threshold
  • a verification unit configured to determine that the transformation matrix fails the verification when the number of calibration errors greater than a preset error threshold among the calibration errors reaches a preset verification threshold.
  • the CCD calibration device 1100 may also include:
  • a fitting module configured to calculate and obtain a distortion parameter fitting curve of the CCD camera according to the coordinate positions of each feature point in the first image in the calibration coordinate system;
  • the accuracy module is used to determine the fitting accuracy of the distortion parameter fitting curve according to the coordinate position of each feature point in the calibration coordinate system in the first image and the distortion parameter fitting curve;
  • the above-mentioned second shooting module is further configured to acquire a second image when the fitting accuracy reaches a preset accuracy threshold.
  • the above-mentioned calibration pattern unit may also include a second calibration block, the second calibration block is arranged on one side of the first calibration block along the width direction of the calibration assembly,
  • the identification module 1102 is further configured to locate the first marking block belonging to the same marking pattern unit according to the information of the second marking block in the first image.
  • the CCD calibration device 1000 provided in the embodiment of the present application can realize each step in the method embodiment shown in FIG. 4 to FIG. 9 , which will not be repeated here to avoid repetition.
  • FIG. 12 shows a schematic diagram of a hardware structure of a computing device provided by an embodiment of the present application.
  • the computing device may include a processor 1201 and a memory 1202 storing computer program instructions.
  • the processor 1201 may include a central processing unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured to implement one or more integrated circuits in the embodiments of the present application.
  • CPU central processing unit
  • ASIC Application Specific Integrated Circuit
  • Memory 1202 may include mass storage for data or instructions.
  • memory 1202 may include a hard disk drive (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 (Universal Serial Bus, USB) drive or two or more Combinations of multiple of the above.
  • Storage 1202 may include removable or non-removable (or fixed) media, where appropriate. Under appropriate circumstances, the storage 1202 can be inside or outside the comprehensive gateway disaster recovery device.
  • memory 1202 is a non-volatile solid-state memory.
  • 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.
  • ROM read only memory
  • RAM random access memory
  • magnetic disk storage media devices magnetic disk storage media devices
  • optical storage media devices flash memory devices
  • electrical, optical, or other physical/tangible memory storage devices include one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software comprising computer-executable instructions, and when the software is executed (e.g., by one or multiple processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
  • the processor 1201 reads and executes the computer program instructions stored in the memory 1202 to implement any one of the CCD camera calibration methods in the above-mentioned embodiments.
  • the computing device may also include a communication interface 1203 and a bus 1210 .
  • a communication interface 1203 and a bus 1210 .
  • a processor 1201 a memory 1202 , and a communication interface 1203 are connected through a bus 1210 to complete mutual communication.
  • the communication interface 1203 is mainly used to realize the communication between various modules, devices, units and/or devices in the embodiments of the present application.
  • Bus 1210 includes hardware, software, or both, and couples the components of the computing device to each other.
  • the bus may include Accelerated Graphics Port (AGP) or other graphics bus, Enhanced Industry Standard Architecture (EISA) bus, Front Side Bus (FSB), HyperTransport (HT) interconnect, Industry Standard Architecture (ISA) Bus, Infiniband Interconnect, Low Pin Count (LPC) Bus, Memory Bus, Micro Channel Architecture (MCA) Bus, Peripheral Component Interconnect (PCI) Bus, PCI-Express (PCI-X) Bus, Serial Advanced Technology Attachment (SATA) bus, Video Electronics Standards Association Local (VLB) bus or other suitable bus or a combination of two or more of these.
  • Bus 1210 may comprise one or more buses, where appropriate. Although the embodiments of this application describe and illustrate a particular bus, this application contemplates any suitable bus or interconnect.
  • the computing device can be based on the above-mentioned embodiments, so as to implement the CCD camera calibration method and device described in conjunction with FIGS. 1 to 6 .
  • the embodiments of the present application may provide a computer storage medium for implementation.
  • Computer program instructions are stored on the computer storage medium; when the computer program instructions are executed by the processor, any one of the CCD camera calibration methods in the above-mentioned embodiments can be achieved, and the same technical effect can be achieved.
  • the above-mentioned computer-readable storage medium may include a non-transitory computer-readable storage medium, such as a read-only memory (Read-Only Memory, ROM for short), a random access memory (Random Access Memory, RAM for short), a magnetic disk or an optical disk. etc., are not limited here.
  • the functional blocks shown in the above structural block diagrams may be implemented as hardware, software, firmware or a combination thereof.
  • it When implemented in hardware, it may be, for example, an electronic circuit, an application specific integrated circuit (ASIC), suitable firmware, a plug-in, a function card, or the like.
  • ASIC application specific integrated circuit
  • the elements of the present application are the programs or code segments employed to perform the required tasks.
  • Programs or code segments can be stored in machine-readable media, or transmitted over transmission media or communication links by data signals carried in carrier waves.
  • "Machine-readable medium" may include any medium that can store or transmit information.
  • machine-readable media examples include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, and the like.
  • Code segments may be downloaded via a computer network such as the Internet, an Intranet, or the like.
  • processors may be, but are not limited to, general purpose processors, special purpose processors, application specific processors, or field programmable logic circuits. It can also be understood that each block in the block diagrams and/or flowcharts and combinations of blocks in the block diagrams and/or flowcharts can also be realized by dedicated hardware for performing specified functions or actions, or can be implemented by dedicated hardware and Combination of computer instructions to achieve.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Closed-Circuit Television Systems (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

本申请实施例提供一种CCD相机标定系统、方法、装置、计算设备及存储介质。系统包括:传输机构;标定组件,所述标定组件设置于所述传输机构上,所述标定组件上设置有多个沿长度方向排列的标定图案单元,所述标定图案单元包括第一标定块,所述第一标定块内包括定位标识以及多个均匀排布的第一标定图形;CCD相机,所述CCD相机用于在所述标定组件运行时拍摄所述标定组件得到第一图像;处理模块,所述处理模块与所述CCD相机通信连接,所述处理模块用于根据所述第一图像计算得到所述CCD相机内外参数的变换矩阵。根据本申请实施例,在进行CCD相机的标定时,不需要在传输机构上设置实际产品,避免标定结果受到产品尺寸误差的影响,提升了标定的精准性。

Description

CCD相机标定系统、方法、装置、计算设备及存储介质 技术领域
本申请涉及设备标定技术领域,特别是涉及一种CCD相机标定系统、方法、装置、计算设备及存储介质。
背景技术
随着目前,随着生产线的不断开发建设,生产线上的传输机构也在不断增加。为了保障量产产品的良率,需要通过CCD(Charge Coupled Device,电荷耦合元件)相机对传输机构上的产品进行CCD检测。而为了保障检测数据的有效性,需要对CCD相机进行标定。
在现有的传输机构上进行CCD检测的过程中,对于CCD相机的标定方式通常是在产品上贴设检测标签,在产品和检测标签一同移动时通过CCD相机拍摄检测标签和产品,得到该CCD相机的变换矩阵。
然而,由于产品的尺寸存在误差,CCD相机根据产品和检测标签得出的变换矩阵容易产生测量误差。
发明内容
本申请实施例提供了一种CCD相机标定系统、方法、装置、计算设备及存储介质,能够解决现有的CCD相机标定方式中存在测量误差的技术问题。
第一方面,本申请实施例提供一种CCD相机标定系统,所述CCD相机标定系统包括:
传输机构;
标定组件,所述标定组件设置于所述传输机构上,所述标定组件上设置有多个沿长度方向排列的标定图案单元,所述标定图案单元包括第一标定块,所述第一标定块内包括定位标识以及多个均匀排布的第一标定图形;
CCD相机,所述CCD相机用于在所述标定组件运行时拍摄所述标定组件得到第一图像;
处理模块,所述处理模块与所述CCD相机通信连接,所述处理模块用于根据所述第一图像计算得到所述CCD相机内外参数的变换矩阵。
通过设置标定组件在传输机构上运行,并对标定组件上的标定图形进行拍摄,能够实现CCD相机的标定,能够避免采用实际产品进行标定,从而避免了标定结果受到产品尺寸误差的影响,提升了标定结果的精准性。同时,标定结果中包含了标定组件的运动方向夹角,能够克服静态标定方式中各个坐标系之间不重合的影响。
在一些实施例中,所述CCD相机标定系统还包括:
验证带,用于在得到所述CCD相机内外参数的变换矩阵之后,替换所述标定组件,所述验证带上设置有等间距分布的多个条纹。
在得到标定结果后,通过设置验证带对标定结果进行验证,能够提升CCD相机标定的准确性。
在一些实施例中,所述验证带为白色基底的菲林片,所述条纹为黑色条纹。
设置验证带的基底和条纹颜色,能够从图像中清晰地识别出条纹,提升验证过程的准确性。
在一些实施例中,所述标定组件包括标定带,所述标定带为白色基底,所述第一标定图形的颜色为黑色。
设置标定组件的基底颜色和第一标定图形的颜色,能够准确识别出第一标定图形,提升对第一标定图形的识别准确率。
在一些实施例中,所述第一标定图形为圆形。
通过在标定组件上设置均匀排布的圆形图案,能够提高标定和后续测量的精确度和可靠性。
在一些实施例中,所述标定图案单元还包括第二标定块,所述第二标定块设置于所述第一标定块沿所述标定组件的幅宽方向的一侧。
首先从图像中识别第二标定块,以快速粗略定位,并在识别第二标定块后可以识别出相邻的第一标定块,从而实现标定过程。
在一些实施例中,所述标定图案单元包括多个第一标定块,所述多个第一标定块沿所述标定组件的幅宽方向排列;
所述标定组件,用于在所述传输机构分条后,分离为多个子标定组件,且各个子标定组件包括至少一个第一标定块。
在标定组件的幅宽方向设置多个第一标定块,能够使得传输机构在对标定组件进行分条后,设置在分条位置之后的CCD相机也能够拍摄到至少一个完整的第一标定块,从而实现分条位置之后的CCD相机标定。
第二方面,本申请实施例提供一种CCD相机标定方法,CCD相机标定方法包括:
获取第一图像,所述第一图像是CCD相机在标定组件以第一运行速率在传输机构上运行时,拍摄所述标定组件得到的图像;
从所述第一图像中识别属于同一个所述第一标定块的各个所述第一标定图形中的特征点;
确定属于同一个所述第一标定块的各个所述第一标定图形中的特征点在标定坐标系中的坐标位置,所述标定坐标系根据所述定位标识在所述第一图像中的位置确定;
根据属于同一个所述第一标定块的各个所述第一标定图形中的特征点的位置,确定相邻两个所述特征点之间的间距;
根据所述间距以及所述第一图像中各个特征点在标定坐标系中的坐标位置,得到所述CCD相机内外参数的变换矩阵。
通过设置标定组件在传输机构上运行,以实现CCD相机的标定,能够避免采用实际产品进行标定,从而避免了标定结果受到产品尺寸误差的影响,提升了标定结果的精准性。
在一些实施例中,所述根据所述间距以及所述第一图像中各个特征点在标定坐标系中的坐标位置,得到所述CCD相机内外参数的变换矩阵之后,还包括:
获取第二图像,所述第二图像是在所述标定组件替换为验证带,所述验证带以第二运行速率运行时,所述CCD相机拍摄所述验证带得到的图像,所述验证带上设置有等间距分布的多个条纹;
根据所述条纹在所述第二图像中的位置以及所述变换矩阵,确定相邻的条纹之间的测量间距;
根据所述测量间距以及相邻的条纹之间的标准间距,验证所述CCD相机的变换矩阵。
在得到标定结果后,通过设置验证带对标定结果进行验证,能够提升CCD相机标定的准确性。
在一些实施例中,所述获取第二图像之前,还包括:
根据所述第一图像中各个特征点在标定坐标系中的坐标位置,计算得到所述CCD相机的畸变参数拟合曲线;
根据所述第一图像中各个特征点在标定坐标系中的坐标位置以及所述畸变参数拟合曲线确定所述畸变参数拟合曲线的拟合精度;
所述获取第二图像,包括:
在所述拟合精度达到预设精度阈值时,获取第二图像。
在对变换矩阵进行验证之前,还可以根据CCD相机各个位置的畸变参数拟合生成畸变参数拟合曲线,并判断拟合精度是否满足要求,若拟合精度不满足要求,则不再进行验证过程,从而减少验证次数。
在一些实施例中,所述根据所述条纹在所述第二图像中的位置以及所述变换矩阵,确定相邻的条纹之间的测量间距,包括:
根据所述条纹在所述第二图像中的位置,确定各个条纹的像素在所述标定坐标系中的坐标位置;
根据各个条纹的像素在所述标定坐标系中的坐标位置以及所述变换矩阵,计算得到相邻的条纹之间的测量间距。
根据各个条纹的像素对应的坐标位置以及标定后得到的变换矩阵,能够计算出拍摄的第二图像中相邻条纹之间的测量间距,将测量间距与实际的标准间距进行比较,即可确定标定结果的精确度。
在一些实施例中,所述根据所述测量间距以及相邻的条纹之间的标准间距,验证所述CCD相机的变换矩阵,包括:
根据相邻的条纹之间的标准间距以及测量间距计算得到标定误差;
将各个标定误差与预设误差阈值进行比较;
在各个标定误差中大于预设误差阈值的标定误差数量达到预设验证阈值时,确定所述变换矩阵未通过验证。
在通过验证带对标定结果进行验证时,设置标定误差的误差允许范围,在该范围内可以确定变换矩阵能够通过验证,能够在保证标定结果的有效性的同时,避免标定次数过多。
在一些实施例中,所述标定图案单元还包括第二标定块,所述第二标定块设置于所述第一标定块沿所述标定组件的幅宽方向的一侧;
所述从所述第一图像中识别属于同一个所述第一标定块的各个所述第一标定图形中的特征点之前,还包括:
根据所述第二标定块在所述第一图像中的信息,定位属于同一个所述标定图案单元的第一标定块。
设置第二标定块,可以首先从图像中识别第二标定块,以快速粗略定位,并在识别第二标定块后可以识别出相邻的第一标定块,从而根据第一标定块实现标定过程。
在一些实施例中,所述第二标定块为矩形。
第二标定块设置为矩形图案能够便于进行识别。
在一些实施例中,所述第一标定图形为圆形,所述特征点为圆心。
第一标定图形设置为圆形,能够快速准确地确定圆心的位置,并作为特征点。相比于设置其他形状并拟合特征点,能够提升特征点的精度和稳定性,
第三方面,本申请实施例提供了一种CCD标定装置,CCD标定装置包括:
拍摄模块,用于获取第一图像,所述第一图像是CCD相机在标定组件以第一运行速率在传输机构上运行时,拍摄所述标定组件得到的图像;
识别模块,用于从所述第一图像中识别属于同一个所述第一标定块的各个所述第一标定图形中的特征点;
定位模块,用于确定属于同一个所述第一标定块的各个所述第一标定图形中的特征点在标定坐标系中的坐标位置,所述标定坐标系根据所述定位标识在所述第一图像中的位置确定;
计算模块,用于根据属于同一个所述第一标定块的各个所述第一标定图形中的特征点的位置,确定相邻两个所述特征点之间的间距;
标定模块,用于根据所述间距以及所述第一图像中各个特征点在标定坐标系中的坐标位置,得到所述CCD相机内外参数的变换矩阵。
第四方面,本申请实施例提供了一种计算设备,所述计算设备包括:处理器以及存储有计算机程序指令的存储器;
所述处理器执行所述计算机程序指令时实现如上所述的CCD相机标定方法。
第五方面,本申请实施例提供了一种计算机存储介质,所述计算机存储介质上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现如上所述的CCD相机标定方法。
与现有技术相比,本申请实施例提供的CCD相机标定系统,通过在传输机构上放置卷料的位置设置标定组件,使得标定组件能够在传输机构的传送带上运行并控制标定组件在传输机构上移动,CCD相机通过拍摄标定组件上的标定图案单元,能够得到包含有定位标识和多个均匀排布的第一标定图形的第一图像,根据第一图像可以计算得到CCD相机内外参数的变换矩阵。通过拍摄标定组件上均匀排布的第一标定图形,能够根据第一图像和该第一标定图形得到CCD相机内外参数的变换矩阵,在进行CCD相机的标定时,不需要在传输机构上设置实际产品进行运行,避免了标定结果受到产品尺寸误差的影响,提升了标定结果的精准性。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施 例中所需要使用的附图作简单地介绍,显而易见地,下面所描述的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一实施例提供的CCD相机标定系统的结构示意图;
图2是图1实施例中标定组件的结构示意图;
图3是图1实施例中验证带的结构示意图;
图4是本申请一实施例提供的CCD相机标定方法的流程示意图;
图5是本申请另一实施例提供的CCD相机标定方法的流程示意图;
图6是本申请又一实施例提供的CCD相机标定方法的流程示意图;
图7是本申请再一实施例提供的CCD相机标定方法的流程示意图;
图8是本申请再一实施例提供的CCD相机标定方法的流程示意图;
图9是本申请再一实施例提供的CCD相机标定方法的流程示意图;
图10是本申请一实施例中CCD相机的畸变参数拟合曲线图;
图11是本申请一实施例提供的CCD标定装置的结构示意图;
图12是本申请一实施例提供的计算设备的硬件结构示意图。;
在附图中,附图并未按照实际的比例绘制。
具体实施方式
下面将详细描述本申请的各个方面的特征和示例性实施例,为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及具体实施例,对本申请进行进一步详细描述。应理解,此处所描述的具体实施例仅 意在解释本申请,而不是限定本申请。对于本领域技术人员来说,本申请可以在不需要这些具体细节中的一些细节的情况下实施。下面对实施例的描述仅仅是为了通过示出本申请的示例来提供对本申请的更好的理解。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将结合附图对实施例进行详细描述。
目前,随着生产线的不断开发建设,生产线上的定点传输机构也在不断增加。为了保障量产产品的良率,需要通过CCD相机对产品进行CCD检测。而为了保障检测数据的有效性,需要对CCD相机进行标定。
现有的CCD相机标定方式,通常是在产品上贴设检测标签,在产品和检测标签一同移动时通过CCD相机拍摄检测标签和产品,得到该CCD相机的变换矩阵。然而,由于产品的尺寸存在误差,CCD相机根据产品和检测标签得出的变换矩阵容易产生测量误差,从而导致标定结果存在较大误差。
为了解决上述技术问题,本申请实施例提供了一种CCD相机标定系统、方法、装置、计算设备及存储介质。下面首先对本申请实施例所提供的CCD相机标定系统进行介绍。
图1示出了本申请一个实施例提供的CCD相机标定系统中传输机构和CCD相机的结构示意图。CCD相机标定系统包括传输机构、标定组件、CCD相机20以及处理模块(未图示)。
请参照图2,标定组件可以设置于传输机构上。标定组件上设置有 多个沿长度方向排列的标定图案单元30,标定图案单元30包括第一标定块31,第一标定块31内包括定位表示以及多个均匀排布的第一标定图形311。
传输机构可以是用来运送产品的设备。例如,传输机构可以是模切机或其他传输设备,传输机构上设置有传送带10。在传输机构运行时,标定组件可以在传输机构的传送带10上运行,CCD相机20能够在标定组件运行在传送带10上时对标定组件进行拍摄,以得到相应的第一图像。
处理模块与CCD相机20通信连接,处理模块能够在CCD相机20拍摄得到第一图像后获取该第一图像,并根据第一图像计算得到CCD相机20内外参数的变换矩阵,从而实现CCD相机20的标定。
处理模块在获取第一图像后,可以从第一图像中识别出标定图案单元30,根据标定图案单元30中的第一标定块31可以确定对应的定位标识312以及多个均匀排布的第一标定图形311。处理模块可以根据定位标识312确定相应的标定坐标系,并根据多个第一标定图形311在标定坐标系中的坐标位置和多个第一标定图形311分别对应的像素进行计算,以得到CCD相机20内外参数的变换矩阵。
在本实施例中,通过在传输机构上设置标定组件,能够使得标定组件在传输机构的传送带10上运行,CCD相机20可以设置在传输机构旁的固定位置,并对传输机构上的固定区域进行拍摄,在标定组件运行至CCD相机20的拍摄区域时,CCD相机20可以对标定组件进行拍摄,以获取包含标定图案单元30的第一图像。第一图像中包括第一标定块31,第一标定块31则包括定位标识312和多个第一标定图形311,定位标识312可以表征标定组件的运行方向以及第一标定块31的标定坐标系,多个第一标定图形311则按照预设的排列方式进行均匀排布。处理模块根据定位标识312可以确定标定坐标系,根据多个第一标定图形311在第一图像中对应的像素以及多个第一标定图形311原本对应的坐标位置可以确定第一图像和标定坐标系的对应关系,从而计算得到CCD相机20内外参数的变换矩阵。通过拍摄标定组件上均匀排布的第一标定图形311,能够根据第一图像和该第一标定图形311的预设坐标位置得到CCD相机20内外参数的变 换矩阵,不需要在传输机构上设置实际产品即可实现CCD相机20的标定,避免了标定结果受到产品尺寸误差的影响,提升了标定结果的精准性。
如图1所示,可以理解的是,在传输机构旁的多个不同位置,可以分别设置多个的CCD相机20,以对传输机构上不同的传送区域进行拍摄检测。多个CCD相机20通过拍摄在传输机构上运行的标定组件,能够使得CCD相机20的标定结果中包含了标定组件运动方向的夹角。相比于静态标定的方式,还能够克服静态标定下各个坐标系之间不重合的影响。
作为示例,标定组件可以设置为带状,即标定组件可以包括标定带。例如,在传输机构传输的产品为卷料时,可以按照卷料来设置标定带,具体地,标定带的内径与传输机构实际产品卷料的内径一致,以及标定组件的长度大于传输机构的走带长度,使得标定带能够放置于传输机构中放置卷料的位置,并在传输机构上运行以覆盖传输机构的整条走带。并且,由于标定带上设置有沿长度方向排列的多个标定图案单元30,在标定带运行至覆盖传输机构的走带时,各个不同位置的CCD相机20均能够在其拍摄区域拍摄到包含至少一个完整标定图案单元30的第一图像,并实现CCD相机20的标定,以及当设置有多个相机时,可以实现多相机的同时标定。
可以理解的是,标定组件还可以直接贴设于传输机构的传送带10上。在传送带10运行时,CCD相机20可以对贴设于传送带10表面的标定组件进行拍摄。
需要说明的是,CCD相机20通常为线扫相机,线扫相机在设置角度与传输机构上产品运行的方向存在较大差异时,处理模块还可以根据拍摄得到的第一图像中的各个第一标定图形311来确定CCD相机20的安装位置与传输机构产品运行方向的夹角,从而在CCD相机20安装角度与传输机构上产品运行的方向存在较大差异时,仍能够实现CCD相机20的标定。
请参照图3,在一些实施例中,上述CCD相机20标定系统还可以包括验证带。验证带上设置有等间距分布的多个条纹41,在将标定组件 设置于传输机构上进行运行,并通过拍摄第一图像计算得到CCD相机20内外参数的变换矩阵后,可以使用验证带替换标定组件,在验证带在传输机构上运行时,CCD相机20可以对验证带上的条纹41进行拍摄,并根据拍摄得到的图像,采用计算得到的内外参数的变换矩阵计算出相邻条纹41的测量间距。由于相邻条纹41的标准间距为制作验证带时预先设置的,根据拍摄计算所得到的测量间距和原有的标准间距即可确定计算出的内外参数的变换矩阵是否通过验证。在通过验证后,该CCD相机20即完成标定过程。通过设置验证带在传输机构上运行,并控制CCD相机20对验证带上的条纹41进行拍摄,根据拍摄得到的图像中相邻条纹41之间的像素以及通过标定组件计算得到的CCD相机20内外参数的变换矩阵,能够计算出相邻条纹41的测量间距,将测量间距与条纹之间的标准间距进行比较,即可确定此次CCD相机20标定结果的精准度,从而对CCD相机20标定进行验证。
在一些实施例中,上述验证带可以采用白色基底的菲林片,验证带上的条纹41可以为黑色条纹41。CCD相机20在对验证带进行拍摄得到拍摄图像后,能够对图像中的白色基底和黑色条纹41进行识别,从而实现CCD相机20标定过程的验证。可以理解的是,验证带的基底颜色或者条纹41颜色还可以设置为其他颜色,使得拍摄的图像中能够清晰地识别出基底和条纹41即可。上述验证带的长度可以设置为大于传输机构的过辊长度,验证带需要贴合设置在传输机构传送带10的表面。
在一些实施例中,上述标定组件可以为白色基底的标定带,标定组件上标定图案单元30中第一标定块31内的定位标识312和第一标定图形311的颜色可以设置为黑色。同样地,将标定组件的基底和图形的颜色分别设置为白色和黑色,能够使得CCD相机20拍摄得到的图像中能够清晰地区分出基底和第一标定块31,从而根据识别出的第一标定块31实现CCD相机20内外参数的变换矩阵的计算。
在一些实施例中,第一标定图形可以设置为圆形,即标定图案单元包括定位标识和多个均匀排布的圆形图案。通过设置圆形图案并通过CCD相机20拍摄,能够从拍摄得到的图像中准确地拟合出各个圆形图案的 圆心,并根据各个圆形图案的圆心进行CCD标定。相比于采用其他图案进行标定识别,能够提升标定和标定后测量的精度与可靠性。
标定组件上每个标定图案单元30的面积可以设置为不低于100mm2,标定图案单元30的形状可以设置为正方形或矩形。标定图案单元30内多个第一标定图形311中,相邻的第一标定图形311之间的距离可以设置为不低于0.05mm。
在一些实施例中,上述标定组件中的每个标定图案单元30,还可以包括第二标定块32,第二标定块32可以设置于第一标定块31沿标定组件幅宽方向的一侧。即每个标定图案单元30包括沿标定组件幅宽方向并排设置的第一标定块31和第二标定块32。第二标定块32可以设置为矩形图案。在拍摄得到包含第一标定块31和第二标定块32的第一图像后,可以通过第二标定块32快速确定坐标系的方向,实现坐标粗略定位。在进行粗略定位后,可以通过第一标定块31中的定位标识312实现坐标精确定位,并根据第一标定块31中各个第一标定图形311的像素位置计算内外参数的变换矩阵。
在一些实施例中,上述标定组件中每个标定图案单元30可以包括多个第一标定块31,多个第一标定块31可以沿标定组件的幅宽方向排列。
如图1所示,传输机构在运行时可能会对产品进行分条,通过在标定组件上沿幅宽方向设置多个第一标定块31,能够使得传输机构在对标定组件进行分条,使得标定组件分离为多个子标定组件后,在传输机构的每个带路上的子标定组件包含有至少一个第一标定块31。则设置于传输机构的分条位置之后的CCD相机20均能够对子标定组件上的第一标定块31进行拍摄,从而实现传输机构分条位置之后的CCD相机20的标定。
可以理解的是,在传输机构对标定组件分离为两个子标定组件时,可以沿标定组件的幅宽方向设置两个第一标定块31,两个第一标定块31可以沿标定组件的轴线对称,两个第一标定块31之间的距离可以设置为不小于20mm。
在一些实施例中,如图2所示,每个标定图案单元30中可以包 括两个第一标定块31和一个第二标定块32,两个第一标定块31和一个第二标定块32可以沿标定组件的幅宽方向排列,并且第二标定块32可以设置于两个第一标定块31之间。在标定组件通过传输机构的分条位置时,若传输机构将标定组件分离为两个子标定组件,则第二标定块32可以被分离为两个部分,分别位于两个子标定组件上。即,两个子标定组件可以分别包括一个完整的第一标定块31和部分第二标定块32。设置于传输机构的分条位置之后的CCD相机20在对子标定组件上的第一标定块31进行拍摄得到第一图像后,处理模块还可以识别该第一图像中的部分第二标定块32,以实现坐标快速定位。
同样地,上述验证带中的条纹41可以设置为沿幅宽方向排列的条纹41,在验证带在传输机构上运行上,并在经过传输机构的分条位置之后将验证带分离为多个子验证带时,传输机构分条位置之后的CCD相机20同样能够对子验证带上的条纹41进行拍摄,从而实现CCD相机20标定的验证过程。
图4示出了本申请一个实施例提供的CCD相机标定方法的流程示意图。CCD相机标定方法应用于CCD标定装置,CCD相机标定方法包括:
S410,获取第一图像,所述第一图像是CCD相机在标定组件以第一运行速率在传输机构上运行时,拍摄所述标定组件得到的图像;
S420,从所述第一图像中识别属于同一个所述第一标定块的各个所述第一标定图形中的特征点;
S430,确定属于同一个所述第一标定块的各个所述第一标定图形中的特征点在标定坐标系中的坐标位置,所述标定坐标系根据所述定位标识在所述第一图像中的位置确定;
S440,根据属于同一个所述第一标定块的各个所述第一标定图形中的特征点的位置,确定相邻两个所述特征点之间的间距;
S450,根据所述间距以及所述第一图像中各个特征点在标定坐标系中的坐标位置,得到所述CCD相机内外参数的变换矩阵。
在本实施例中,CCD标定装置能够控制CCD相机拍摄标定组件得到第一图像,装置可以识别同一个第一标定块中各个第一标定图形的特征 点,并在根据该同一个第一标定块中的定位标识确定标定坐标系后,确定各个特征点在标定坐标系中对应的位置。由于同一第一标定块中各个第一标定图形的排列方式为预先设置,则各个第一标定图形的特征点之间的间距也可以根据对应的第一标定图形进行确定。根据各个第一标定图形中特征点的位置,即可确定每相邻的两个特征点之间的间距。在拍摄得到的第一图像中,根据各个第一标定图形对应的像素在标定坐标系中的坐标位置,可以确定各个特征点对应的像素在标定坐标系中的坐标位置,从而计算出各个特征点之间的像素距离。根据各个特征点之间的间距以及像素距离,可以计算得到CCD相机内外参数的变换矩阵。通过拍摄标定组件上均匀排布的第一标定图形,能够根据第一图像和该第一标定图形的预设坐标位置得到CCD相机内外参数的变换矩阵,在进行CCD相机的标定时,不需要在传输机构上设置实际产品进行运行,避免了标定结果受到产品尺寸误差的影响,提升了标定结果的精准性。
在S410中,标定组件可以设置于传输机构上,并在传输机构的走带上以第一运行速率运行。装置可以控制CCD相机在标定组件运行时对标定组件进行拍摄,以获得第一图像。
在S420中,CCD相机所拍摄到的第一图像中,包括至少一个第一标定块,标定组件上的每个第一标定块内包括定位标识和多个第一标定图形。装置可以在获取到第一图像后,从第一图像中识别同一个第一标定块内的各个第一标定图形,并根据每个第一标定图形确定其对应的特征点。第一标定图形可以为多边形、圆形、环形、椭圆形等。例如,第一标定图形为三角形时,对应的特征点可以为三角形的重心,外心,垂心,内心和旁心等;第一标定图形为圆形时,对应的特征点可以为圆形的圆心。定位标识可以为三角形图案,装置根据第一图像中定位标识对应的图案即可对标定坐标系的方向进行定位。
在S430中,装置在确定同一个第一标定块中各个第一标定图形对应的特征点后,可以根据该第一标定块中的定位标识在第一图像中的位置确定第一图像中的标定坐标系。在确定标定坐标系后,装置可以根据各个特征点在第一图像中对应的像素来确定各个特征点在标定坐标系中的坐 标位置。其中,特征点在标定坐标系中的坐标位置是指特征点的像素坐标。
在S440中,装置在确定属于同一个第一标定块的各个第一标定图形中特征点在标定坐标系中的坐标位置后,可以确定每相邻的两个特征点之间的间距。
可以理解的是,上述标定组件中,同一个第一标定块内的多个第一标定图形为预先设置,在确定每个第一标定图形在标定坐标系中的坐标位置后,即可确定任意两个第一标定图形之间的间距。例如,若多个第一标定图形在同一个第一标定块内为M*N阵列排布,则根据每个第一标定图形在标定坐标系中的坐标位置,确定两个相邻的第一标定图形位于同一行时,则可以确定两个相邻的第一标定图形之间的间距为列间距。在确定两个相邻的第一标定图形位于同一列时,即可确定两个相邻的第一标定图形之间的间距为行间距。同样地,在确定相邻的两个第一标定图形之间的间距后,装置可以根据第一标定图形中特征点的位置,确定相邻的两个特征点之间的间距。例如,在第一标定图形为圆形,特征点为圆心时,对于同一行的两个相邻圆形,两个圆心之间的距离为两个圆形之间的距离与两个圆形的半径之和。
在S450中,装置在确定第一图像中属于同一第一标定块的各个第一标定图形对应的特征点后,可以根据特征点标定坐标系中对应的像素坐标确定各个特征点之间的像素距离。而根据各个第一标定图形的排列方式,可以确定各个特征点之间的间距。根据各个特征点之间的间距以及各个特征点之间的像素距离,即可计算得到CCD相机内外参数的变换矩阵。
作为一个可选实施例,请参照图5,为了对计算得到的变换矩阵进行验证,上述S450之后,还可以包括:
S510,获取第二图像,所述第二图像是在所述标定组件替换为验证带,所述验证带以第二运行速率运行时,所述CCD相机拍摄所述验证带得到的图像,所述验证带上设置有等间距分布的多个条纹;
S520,根据所述条纹在所述第二图像中的位置以及所述变换矩阵,确定相邻的条纹之间的测量间距;
S530,根据所述测量间距以及相邻的条纹之间的标准间距,验证所述CCD相机的变换矩阵。
在本实施例中,在标定组件以第一运行速率在传输机构上运行时,装置可以控制CCD相机对标定组件进行拍摄,并根据拍摄的第一图像计算得到CCD相机内外参数的变换矩阵。在生成CCD相机内外参数的变换矩阵后,可以将传输机构上的标定组件替换为验证带,并在验证带以第二运行速率在传输机构上运行时,控制CCD相机对验证带进行拍摄,并根据拍摄的第二图像进行验证,以验证CCD相机的变换矩阵是否满足精确度要求。
在S510中,装置在控制CCD相机对传输机构上的标定组件进行拍摄后,可以将标定组件替换为验证带,验证带上可以设置有等间距分布的多个条纹。验证带在传输机构上以第二运行速率运行时,装置可以控制CCD相机对验证带进行拍摄,以获得第二图像。
可以理解的是,为了保证CCD相机对标定组件和验证带进行拍摄时的拍摄精确度,可以设置第一运行速率和第二运行速率相同,即标定组件和验证带在传输机构上的运行速率相同,以避免标定组件和验证带在传输机构上运行速率不同而导致拍摄得到的第一图像和第二图像存在像素误差。其中,第一运行速率和第二运行速率可以设置为3m/min。
在S520中,装置在获取到第二图像后,可以从第二图像中识别出各个条纹,并确定各个条纹在第二图像中对应的像素位置。根据相邻的两个条纹的像素位置可以确定相邻的两个条纹之间的像素距离,通过上述标定过程中得到的变换矩阵以及相邻的两个条纹之间的像素距离,能够计算得出相邻的两个条纹之间的测量间距。
在S530中,由于验证带上的多个条纹为等间距分布,且相邻条纹之间的间距为预先设置的标准间距,装置可以直接获取该标准间距,并将标准间距与测量间距进行比较,以验证CCD相机内外参数的变换矩阵是否满足精确度要求。
作为一个可选实施例,请参照图6,为了确定相邻条纹的测量间距,上述S520,可以包括:
S610,根据所述条纹在所述第二图像中的位置,确定各个条纹的像素在所述标定坐标系中的坐标位置;
S620,根据各个条纹的像素在所述标定坐标系中的坐标位置以及所述变换矩阵,计算得到相邻的条纹之间的测量间距。
在本实施例中,装置可以根据条纹在第二图像中的位置确定各个条纹的像素在标定坐标系中的坐标位置,根据各个条纹的像素的坐标位置可以确定相邻条纹之间的像素距离,即像素个数,通过上述CCD相机拍摄标定组件得出的变换矩阵,能够将相邻条纹之间的像素距离转换为相邻条纹之间的测量间距。
在S610中,装置可以在识别第二图像中的条纹后,可以根据各个条纹在第二图像中的位置,来确定各个条纹的像素在标定坐标系中的坐标位置。该坐标位置即为各个条纹分别对应的像素坐标。
在S620中,装置在确定各个条纹的像素在标定坐标系中的坐标位置后,可以根据各个条纹分别对应的像素坐标来确定相邻条纹之间的像素距离。可以理解的是,相邻条纹之间的像素距离,可以是两个条纹的两条接近的侧边之间的像素距离。装置还可以确定每个条纹对应的条纹特征点,相邻条纹之间的像素距离还可以是两个相邻的条纹特征点之间的像素距离。在确定相邻条纹之间的像素距离后,根据CCD相机的变换矩阵,可以根据相邻条纹之间的像素距离计算得到相邻条纹之间的测量间距。
作为一个可选实施例,请参照图7,为了验证变换矩阵是否满足要求,上述S530,可以包括:
S710,根据相邻的条纹之间的标准间距以及测量间距计算得到标定误差;
S720,将各个标定误差与预设误差阈值进行比较;
S730,在各个标定误差中大于预设误差阈值的标定误差数量达到预设验证阈值时,确定所述变换矩阵未通过验证。
在本实施例中,装置可以根据相邻条纹的标准间距和测量间距得到标定误差,根据标定误差与预设误差阈值可以对此次标定得到的变换矩阵进行验证。若变换矩阵通过验证,则结束标定过程并存储该变换矩阵。 若变换矩阵未通过验证,则向用户发送验证失败消息,并重新对CCD相机进行标定。通过设置验证带进行二次验证,能够使得CCD相机标定得到的变换矩阵满足精度要求。
在S710中,装置在获取到各个相邻条纹之间的测量间距和标准间距后,可以计算得到各个相邻条纹对应的标定误差。标定误差可以为标准间距与测量间距的差值。
在S720中,装置在计算得到各个相邻条纹对应的标定误差后,可以将各个标定误差与预设误差阈值进行比较,并判断各个标定误差是否大于预设误差阈值。
在S730中,装置在依次将多个标定误差与预设误差阈值进行比较后,可以在每确定一个标定误差大于预设误差阈值时,进行计数,以统计大于预设误差阈值的标定误差的数量。在计数值达到预设验证阈值时,表示该变换矩阵在多个不同的位置存在较大误差,无法对产品进行精确标定,装置可以确定该次标定过程中计算得到的变换矩阵未通过验证。
可以理解的是,在将所有相邻条纹分别对应的标定误差与预设误差阈值进行比较后,若大于预设误差阈值的标定误差的数量未达到预设验证阈值时,表示该变换矩阵的标定精度较高,此时装置可以确定该次标定过程中计算得到的变换矩阵通过验证。
在一个可选实施例,中,装置还可以根据连续大于预设误差阈值的标定误差的数量来判断变换矩阵是否通过验证。例如,在多个连续的标定误差均大于预设误差阈值时,可以判断连续的个数是否达到预设验证阈值。例如,在预设误差阈值为0.05时,可以判断是否存在至少连续4个标定误差均大于预设误差阈值,若存在至少连续4个标定误差均大于0.05,则可以确定该变换矩阵未通过验证。
作为一个可选实施例,请参照图8,为了减少验证次数,提升验证效率,上述S510之前,还可以包括:
S810,根据所述第一图像中各个特征点在标定坐标系中的坐标位置,计算得到所述CCD相机的畸变参数拟合曲线;
S820,根据所述第一图像中各个特征点在标定坐标系中的坐标位 置以及所述畸变参数拟合曲线确定所述畸变参数拟合曲线的拟合精度;
上述S510,可以包括:
S830,在所述拟合精度达到预设精度阈值时,获取第二图像。
在本实施例中,装置在通过CCD相机拍摄标定组件并计算得到CCD相机的变换矩阵后,还可以根据第一图像中的各个特征点计算生成CCD相机的畸变参数拟合曲线,并判断该畸变参数拟合曲线的拟合精度。在拟合精度满足预设要求时,再将标定组件替换为验证带并拍摄第二图像进行验证。若畸变参数拟合曲线的拟合精度不满足预设要求,则不需要将标定组件替换为验证带,可以直接确定该变换矩阵不满足标定精度要求。此时可以将标定组件重新设置在传输机构上,并重新拍摄第一图像进行标定。在通过验证带进行验证之前,可以直接根据CCD相机畸变参数拟合曲线的拟合精度对变换矩阵进行筛选,在不满足预设要求时,可以直接确定此次标定过程中得到的变换矩阵不符合标定精度要求,不需要额外设置验证带进行验证,从而减少验证次数,提升验证效率。
在S810中,装置在确定各个特征点在标定坐标系中的坐标位置后,即可确定各个特征点对应的像素坐标。由于CCD相机为线扫相机,在线扫相机的不同位置对应不同的畸变参数。根据各个特征点对应的像素坐标以及相邻特征点之间的像素距离,可以确定线扫相机各个位置分别对应的畸变参数。
装置根据CCD相机中不同的位置分别对应的畸变参数,可以生成多个样本,并根据多个样本进行曲线拟合,以得到位置与畸变参数的拟合曲线,该拟合曲线即为CCD相机的畸变参数拟合曲线。
在S820中,在确定CCD相机的畸变参数拟合曲线后,可以根据第一图像中各个特征点在标定坐标系中的坐标位置以及畸变参数拟合曲线确定畸变参数拟合曲线的拟合精度。例如,可以采用拟合优度来表征畸变参数拟合曲线的拟合精度。拟合优度的统计量为畸变参数拟合曲线的可决系数。
其中,可决系数的计算方式如下:
确定样本数据集为:(x1,y1),(x2,y2),...,(xn, yn);
其中,x1,x2,...xn分别为CCD相机的不同位置坐标,y1,y2,...yn分别为不同位置坐标上对应的畸变参数。
在通过曲线拟合得到CCD相机的畸变参数拟合曲线,对于x1,x2,...xn,分别对应的拟合预测畸变参数值为:
Figure PCTCN2021135305-appb-000001
拟合预测畸变参数的平均值:
Figure PCTCN2021135305-appb-000002
拟合预测畸变参数的残差
Figure PCTCN2021135305-appb-000003
总平方和:
Figure PCTCN2021135305-appb-000004
残差平方和:
Figure PCTCN2021135305-appb-000005
可决系数
Figure PCTCN2021135305-appb-000006
即,在采用拟合优度表征畸变参数拟合曲线的拟合精度时,可以根据畸变参数拟合曲线以及各个特征点对应的样本计算得出畸变参数拟合曲线可决系数。
在S830中,在计算得到畸变参数拟合曲线的拟合精度后,可以将畸变参数拟合曲线的拟合精度与预设精度阈值进行比较,在拟合精度达到预设精度阈值时,可以确定该畸变参数拟合曲线的拟合程度较高,并将标定组件替换为验证带以进行CCD相机标定的验证过程。
例如,在采用拟合优度表征畸变参数拟合曲线的拟合精度时,可以设置预设精度阈值为0.95,在计算得到畸变参数拟合曲线的可决系数后,可以判断可决系数是否大于预设精度阈值。在可决系数达到预设精度阈值时,可以将标定组件替换为验证带并对变换矩阵进行验证。若可决系数小于预设精度阈值,则不执行验证过程,并对CCD相机进行重新进行标定。
在传输机构旁设置有多个CCD相机时,可以根据每个CCD相机中各个位置的畸变参数拟合生成该CCD相机的畸变参数拟合曲线,并根据拟合参数拟合曲线计算出拟合精度。如图10所示,从多个CCD相机中选择两个CCD相机,分别计算得出两个CCD相机的畸变参数拟合曲线的拟合精度分别为0.9836和0.9683。在预设精度阈值设置为0.95时,这两个CCD相机对应的畸变参数拟合曲线的拟合精度均大于预设精度阈值,则可以确 定这两个CCD相机的畸变参数拟合曲线满足精度要求,可以进一步设置验证带并通过CCD相机拍摄验证带进行验证。
作为一个可选实施例,请参照图9,为了实现快速粗略定位,上述标定图案单元还可以包括第二标定块,第二标定块设置于第一标定块沿所述标定组件的幅宽方向的一侧;S420之前,还可以包括:
S910,根据所述第二标定块在所述第一图像中的信息,定位属于同一个所述标定图案单元的第一标定块。
在本实施例中,装置可以在获取第一图像后,可以装置可以从第一图像中快速识别出第二标定块的图案,并根据该图案快速确定标定坐标系的方向,以实现坐标粗略定位。
第二标定块可以设置为矩形图案,图案颜色可以设置为黑色,相比于包括定位标识和多个第一标定图形的第一标定块,装置可以更为迅速地从第一图像中识别出第二标定块,从而实现快速粗略定位。
作为一个可选实施例,在CCD相机标定系统中,传输机构旁的多个位置可以分别设置有多个CCD相机,在将标定组件设置于传输机构的传送带上并运行时,可以对CCD相机拍摄到的图像进行监控,在多个CCD相机均拍摄到标定组件上的标定图案单元时,可以控制传输机构停止运行,此时可以分别查看每个CCD相机拍摄到的图像,并判断该CCD拍摄到的图像是否包含有完整的标定图案单元,以及CCD拍摄到的图像能否识别出基底和第一标定块。例如,装置可以预先设置基底与第一标定块的灰度差值范围,若拍摄到的图像中,基底的灰度与第一标定块的灰度之间的差值满足该灰度差值范围,则可以确定装置能够从图像中识别出基底和第一标定块,从而实现CCD相机的标定。若拍摄到的图像中基底的灰度与第一标定块的灰度差值过小,则需要调整标定组件的基底颜色或者第一标定块的图案颜色以使基底的灰度与第一标定块的灰度之间的差值满足灰度差值范围。例如,灰度差值范围可以设置为基底的灰度与第一标定块的灰度的差值为30以上,且第一标定块的灰度低于基底的灰度。
基于上述实施例提供的CCD相机标定方法,相应地,本申请还提供了CCD标定装置的具体实现方式。请参见以下实施例。
首先参见图11,本申请实施例提供的CCD标定装置1100包括以下模块:
拍摄模块1101,用于获取第一图像,所述第一图像是CCD相机在标定组件以第一运行速率在传输机构上运行时,拍摄所述标定组件得到的图像;
识别模块1102,用于从所述第一图像中识别属于同一个所述第一标定块的各个所述第一标定图形中的特征点;
定位模块1103,用于确定属于同一个所述第一标定块的各个所述第一标定图形中的特征点在标定坐标系中的坐标位置,所述标定坐标系根据所述定位标识在所述第一图像中的位置确定;
计算模块1104,用于根据属于同一个所述第一标定块的各个所述第一标定图形中的特征点的位置,确定相邻两个所述特征点之间的间距;
标定模块1105,用于根据所述间距以及所述第一图像中各个特征点在标定坐标系中的坐标位置,得到所述CCD相机内外参数的变换矩阵。
在本实施例中,装置能够控制CCD相机拍摄标定组件得到第一图像,装置可以识别同一个第一标定块中各个第一标定图形的特征点,并在根据该同一个第一标定块中的定位标识确定标定坐标系后,确定各个特征点在标定坐标系中对应的位置。由于同一第一标定块中各个第一标定图形之间的间距为预先设置,则各个第一标定图形的特征点之间的间距也可以预先确定。根据各个第一标定图形中特征点的位置,即可确定每相邻的两个特征点之间的间距。在拍摄得到的第一图像中,根据各个第一标定图形对应的像素在标定坐标系中的坐标位置,可以确定各个特征点对应的像素在标定坐标系中的坐标位置,从而计算出各个特征点之间的像素距离。根据各个特征点之间的间距以及像素距离,可以计算得到CCD相机内外参数的变换矩阵。通过拍摄标定组件上均匀排布的第一标定图形,能够根据第一图像和该第一标定图形的预设坐标位置得到CCD相机内外参数的变换矩阵,在进行CCD相机的标定时,不需要在传输机构上设置实际产品进行运 行,避免了标定结果受到产品尺寸误差的影响,提升了标定结果的精准性。
作为本申请的一种实现方式,为了对计算得到的变换矩阵进行验证,上述CCD标定装置1100,还可以包括:
第二拍摄模块,用于获取第二图像,所述第二图像是在所述标定组件替换为验证带,所述验证带以第二运行速率运行时,所述CCD相机拍摄所述验证带得到的图像,所述验证带上设置有等间距分布的多个条纹;
第二计算模块,用于根据所述条纹在所述第二图像中的位置以及所述变换矩阵,确定相邻的条纹之间的测量间距;
验证模块,用于根据所述测量间距以及相邻的条纹之间的标准间距,验证所述CCD相机的变换矩阵。
作为本申请的一种实现方式,为了确定相邻条纹的测量间距,上述第二计算模块,还可以包括:
坐标单元,用于根据所述条纹在所述第二图像中的位置,确定各个条纹的像素在所述标定坐标系中的坐标位置;
计算单元,用于根据各个条纹的像素在所述标定坐标系中的坐标位置以及所述变换矩阵,计算得到相邻的条纹之间的测量间距。
作为本申请的一种实现方式,为了验证变换矩阵是否满足要求,上述验证模块,还可以包括:
误差单元,用于根据相邻的条纹之间的标准间距以及测量间距计算得到标定误差;
比较单元,用于将各个标定误差与预设误差阈值进行比较;
验证单元,用于在各个标定误差中大于预设误差阈值的标定误差数量达到预设验证阈值时,确定所述变换矩阵未通过验证。
作为本申请的一种实现方式,为了减少验证次数,提升验证效率,CCD标定装置1100,还可以包括:
拟合模块,用于根据所述第一图像中各个特征点在标定坐标系中的坐标位置,计算得到所述CCD相机的畸变参数拟合曲线;
精度模块,用于根据所述第一图像中各个特征点在标定坐标系中 的坐标位置以及所述畸变参数拟合曲线确定所述畸变参数拟合曲线的拟合精度;
上述第二拍摄模块,还用于在所述拟合精度达到预设精度阈值时,获取第二图像。
作为本申请的一种实现方式,为了实现快速粗略定位,上述标定图案单元还可以包括第二标定块,第二标定块设置于第一标定块沿所述标定组件的幅宽方向的一侧,上述识别模块1102,还用于根据所述第二标定块在所述第一图像中的信息,定位属于同一个所述标定图案单元的第一标定块。
本申请实施例提供的CCD标定装置1000能够实现图4至图9的方法实施例中的各个步骤,为避免重复,这里不再赘述。
图12示出了本申请实施例提供的计算设备的硬件结构示意图。
在计算设备可以包括处理器1201以及存储有计算机程序指令的存储器1202。
具体地,上述处理器1201可以包括中央处理器(CPU),或者特定集成电路(Application Specific Integrated Circuit,ASIC),或者可以被配置成实施本申请实施例的一个或多个集成电路。
存储器1202可以包括用于数据或指令的大容量存储器。举例来说而非限制,存储器1202可包括硬盘驱动器(Hard Disk Drive,HDD)、软盘驱动器、闪存、光盘、磁光盘、磁带或通用串行总线(Universal Serial Bus,USB)驱动器或者两个或更多个以上这些的组合。在合适的情况下,存储器1202可包括可移除或不可移除(或固定)的介质。在合适的情况下,存储器1202可在综合网关容灾设备的内部或外部。在特定实施例中,存储器1202是非易失性固态存储器。
存储器可包括只读存储器(ROM),随机存取存储器(RAM),磁盘存储介质设备,光存储介质设备,闪存设备,电气、光学或其他物理/有形的存储器存储设备。因此,通常,存储器包括一个或多个编码有包括计算机可执行指令的软件的有形(非暂态)计算机可读存储介质(例如,存储器设备),并且当该软件被执行(例如,由一个或多个处理器)时, 其可操作来执行参考根据本公开的一方面的方法所描述的操作。
处理器1201通过读取并执行存储器1202中存储的计算机程序指令,以实现上述实施例中的任意一种CCD相机标定方法。
在一个示例中,计算设备还可包括通信接口1203和总线1210。其中,如图12所示,处理器1201、存储器1202、通信接口1203通过总线1210连接并完成相互间的通信。
通信接口1203,主要用于实现本申请实施例中各模块、装置、单元和/或设备之间的通信。
总线1210包括硬件、软件或两者,将计算设备的部件彼此耦接在一起。举例来说而非限制,总线可包括加速图形端口(AGP)或其他图形总线、增强工业标准架构(EISA)总线、前端总线(FSB)、超传输(HT)互连、工业标准架构(ISA)总线、无限带宽互连、低引脚数(LPC)总线、存储器总线、微信道架构(MCA)总线、外围组件互连(PCI)总线、PCI-Express(PCI-X)总线、串行高级技术附件(SATA)总线、视频电子标准协会局部(VLB)总线或其他合适的总线或者两个或更多个以上这些的组合。在合适的情况下,总线1210可包括一个或多个总线。尽管本申请实施例描述和示出了特定的总线,但本申请考虑任何合适的总线或互连。
该计算设备可以基于上述实施例,从而实现结合图1至图6描述的CCD相机标定方法和装置。
另外,结合上述实施例中的CCD相机标定方法,本申请实施例可提供一种计算机存储介质来实现。该计算机存储介质上存储有计算机程序指令;该计算机程序指令被处理器执行时实现上述实施例中的任意一种CCD相机标定方法,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,上述计算机可读存储介质可包括非暂态计算机可读存储介质,如只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等,在此并不限定。
需要明确的是,本申请并不局限于上文所描述并在图中示出的特定配置和处理。为了简明起见,这里省略了对已知方法的详细描述。在上 述实施例中,描述和示出了若干具体的步骤作为示例。但是,本申请的方法过程并不限于所描述和示出的具体步骤,本领域的技术人员可以在领会本申请的精神后,作出各种改变、修改和添加,或者改变步骤之间的顺序。
以上的结构框图中所示的功能块可以实现为硬件、软件、固件或者它们的组合。当以硬件方式实现时,其可以例如是电子电路、专用集成电路(ASIC)、适当的固件、插件、功能卡等等。当以软件方式实现时,本申请的元素是被用于执行所需任务的程序或者代码段。程序或者代码段可以存储在机器可读介质中,或者通过载波中携带的数据信号在传输介质或者通信链路上传送。“机器可读介质”可以包括能够存储或传输信息的任何介质。机器可读介质的例子包括电子电路、半导体存储器设备、ROM、闪存、可擦除ROM(EROM)、软盘、CD-ROM、光盘、硬盘、光纤介质、射频(RF)链路,等等。代码段可以经由诸如因特网、内联网等的计算机网络被下载。
还需要说明的是,本申请中提及的示例性实施例,基于一系列的步骤或者装置描述一些方法或系统。但是,本申请不局限于上述步骤的顺序,也就是说,可以按照实施例中提及的顺序执行步骤,也可以不同于实施例中的顺序,或者若干步骤同时执行。
上面参考根据本公开的实施例的方法、装置和计算机程序产品的流程图和/或框图描述了本公开的各方面。应当理解,流程图和/或框图中的每个方框以及流程图和/或框图中各方框的组合可以由计算机程序指令实现。这些计算机程序指令可被提供给通用计算机、专用计算机、或其它可编程数据处理装置的处理器,以产生一种机器,使得经由计算机或其它可编程数据处理装置的处理器执行的这些指令使能对流程图和/或框图的一个或多个方框中指定的功能/动作的实现。这种处理器可以是但不限于是通用处理器、专用处理器、特殊应用处理器或者现场可编程逻辑电路。还可理解,框图和/或流程图中的每个方框以及框图和/或流程图中的方框的组合,也可以由执行指定的功能或动作的专用硬件来实现,或可由专用硬件和计算机指令的组合来实现。
以上,仅为本申请的具体实施方式,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、模块和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。应理解,本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。

Claims (18)

  1. 一种CCD相机标定系统,其特征在于,所述CCD相机标定系统包括:
    传输机构;
    标定组件,所述标定组件设置于所述传输机构上,所述标定组件上设置有多个沿长度方向排列的标定图案单元,所述标定图案单元包括第一标定块,所述第一标定块内包括定位标识以及多个均匀排布的第一标定图形;
    CCD相机,所述CCD相机用于在所述标定组件运行时拍摄所述标定组件得到第一图像;
    处理模块,所述处理模块与所述CCD相机通信连接,所述处理模块用于根据所述第一图像计算得到所述CCD相机内外参数的变换矩阵。
  2. 根据权利要求1所述的CCD相机标定系统,其特征在于,所述CCD相机标定系统还包括:
    验证带,用于在得到所述CCD相机内外参数的变换矩阵之后,替换所述标定组件,所述验证带上设置有等间距分布的多个条纹。
  3. 根据权利要求2所述的CCD相机标定系统,其特征在于,所述验证带为白色基底的菲林片,所述条纹为黑色条纹。
  4. 根据权利要求1所述的CCD相机标定系统,其特征在于,所述标定组件包括标定带,所述标定带为白色基底,所述第一标定图形的颜色为黑色。
  5. 根据权利要求4所述的CCD相机标定系统,其特征在于,所述第一标定图形为圆形。
  6. 根据权利要求1所述的CCD相机标定系统,其特征在于,所述标定图案单元还包括第二标定块,所述第二标定块设置于所述第一标定块沿所述标定组件的幅宽方向的一侧。
  7. 根据权利要求1所述的CCD相机标定系统,其特征在于,所述标定图案单元包括多个第一标定块,所述多个第一标定块沿所述标定组件的幅宽方向排列;
    所述标定组件,用于在所述传输机构分条后,分离为多个子标定组件,且各个子标定组件包括至少一个第一标定块。
  8. 一种CCD相机标定方法,其特征在于,所述方法包括:
    获取第一图像,所述第一图像是CCD相机在标定组件以第一运行速率在传输机构上运行时,拍摄所述标定组件得到的图像;
    从所述第一图像中识别属于同一个所述第一标定块的各个所述第一标定图形中的特征点;
    确定属于同一个所述第一标定块的各个所述第一标定图形中的特征点在标定坐标系中的坐标位置,所述标定坐标系根据所述定位标识在所述第一图像中的位置确定;
    根据属于同一个所述第一标定块的各个所述第一标定图形中的特征点的位置,确定相邻两个所述特征点之间的间距;
    根据所述间距以及所述第一图像中各个特征点在标定坐标系中的坐标位置,得到所述CCD相机内外参数的变换矩阵。
  9. 根据权利要求8所述的CCD相机标定方法,其特征在于,所述根据所述间距以及所述第一图像中各个特征点在标定坐标系中的坐标位置,得到所述CCD相机内外参数的变换矩阵之后,还包括:
    获取第二图像,所述第二图像是在所述标定组件替换为验证带,所述验证带以第二运行速率运行时,所述CCD相机拍摄所述验证带得到的图像,所述验证带上设置有等间距分布的多个条纹;
    根据所述条纹在所述第二图像中的位置以及所述变换矩阵,确定相邻的条纹之间的测量间距;
    根据所述测量间距以及相邻的条纹之间的标准间距,验证所述CCD相机的变换矩阵。
  10. 根据权利要求9所述的CCD相机标定方法,其特征在于,所述获取第二图像之前,还包括:
    根据所述第一图像中各个特征点在标定坐标系中的坐标位置,计算得到所述CCD相机的畸变参数拟合曲线;
    根据所述第一图像中各个特征点在标定坐标系中的坐标位置以及所述畸变参数拟合曲线确定所述畸变参数拟合曲线的拟合精度;
    所述获取第二图像,包括:
    在所述拟合精度达到预设精度阈值时,获取第二图像。
  11. 根据权利要求9所述的CCD相机标定方法,其特征在于,所述根据所述条纹在所述第二图像中的位置以及所述变换矩阵,确定相邻的条纹之间的测量间距,包括:
    根据所述条纹在所述第二图像中的位置,确定各个条纹的像素在所述标定坐标系中的坐标位置;
    根据各个条纹的像素在所述标定坐标系中的坐标位置以及所述变换矩阵,计算得到相邻的条纹之间的测量间距。
  12. 根据权利要求9所述的CCD相机标定方法,其特征在于,所述根据所述测量间距以及相邻的条纹之间的标准间距,验证所述CCD相机的变换矩阵,包括:
    根据相邻的条纹之间的标准间距以及测量间距计算得到标定误差;
    将各个标定误差与预设误差阈值进行比较;
    在各个标定误差中大于预设误差阈值的标定误差数量达到预设验证阈值时,确定所述变换矩阵未通过验证。
  13. 根据权利要求8所述的CCD相机标定方法,其特征在于,所述标定图案单元还包括第二标定块,所述第二标定块设置于所述第一标定块沿所述标定组件的幅宽方向的一侧;
    所述从所述第一图像中识别属于同一个所述第一标定块的各个所述第一标定图形中的特征点之前,还包括:
    根据所述第二标定块在所述第一图像中的信息,定位属于同一个所述标定图案单元的第一标定块。
  14. 根据权利要求13所述的CCD相机标定方法,其特征在于,所述第二标定块为矩形。
  15. 根据权利要求8所述的CCD相机标定方法,其特征在于,所述第一标定图形为圆形,所述特征点为圆心。
  16. 一种CCD标定装置,其特征在于,所述CCD标定装置包括:
    拍摄模块,用于获取第一图像,所述第一图像是CCD相机在标定组件以第一运行速率在传输机构上运行时,拍摄所述标定组件得到的图像;
    识别模块,用于从所述第一图像中识别属于同一个所述第一标定块的各个所述第一标定图形中的特征点;
    定位模块,用于确定属于同一个所述第一标定块的各个所述第一标定图形中的特征点在标定坐标系中的坐标位置,所述标定坐标系根据所述定位标识在所述第一图像中的位置确定;
    计算模块,用于根据属于同一个所述第一标定块的各个所述第一标定图形中的特征点的位置,确定相邻两个所述特征点之间的间距;
    标定模块,用于根据所述间距以及所述第一图像中各个特征点在标定坐标系中的坐标位置,得到所述CCD相机内外参数的变换矩阵。
  17. 一种计算设备,其特征在于,所述设备包括:处理器以及存储有计算机程序指令的存储器;
    所述处理器执行所述计算机程序指令时实现如权利要求8-15中任一项所述的CCD相机标定方法。
  18. 一种计算机存储介质,其特征在于,所述计算机存储介质上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现如权利要求8-15中任一项所述的CCD相机标定方法。
PCT/CN2021/135305 2021-12-03 2021-12-03 Ccd相机标定系统、方法、装置、计算设备及存储介质 Ceased WO2023097647A1 (zh)

Priority Applications (6)

Application Number Priority Date Filing Date Title
CN202180096855.7A CN117157670B (zh) 2021-12-03 2021-12-03 Ccd相机标定系统、方法、装置、计算设备及存储介质
EP21966074.3A EP4296952A4 (en) 2021-12-03 2021-12-03 Ccd camera calibration system, method and apparatus, computing device, and storage medium
JP2023555177A JP7653536B2 (ja) 2021-12-03 2021-12-03 Ccdカメラキャリブレーションシステム、方法、装置、コンピューティングデバイス及び記憶媒体
KR1020237030659A KR20230144591A (ko) 2021-12-03 2021-12-03 Ccd 카메라 캘리브레이션 시스템, 방법, 장치, 컴퓨팅 디바이스 및 저장 매체
PCT/CN2021/135305 WO2023097647A1 (zh) 2021-12-03 2021-12-03 Ccd相机标定系统、方法、装置、计算设备及存储介质
US18/412,624 US20240153141A1 (en) 2021-12-03 2024-01-15 Ccd camera calibration system, method, computing device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/135305 WO2023097647A1 (zh) 2021-12-03 2021-12-03 Ccd相机标定系统、方法、装置、计算设备及存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/412,624 Continuation US20240153141A1 (en) 2021-12-03 2024-01-15 Ccd camera calibration system, method, computing device and storage medium

Publications (1)

Publication Number Publication Date
WO2023097647A1 true WO2023097647A1 (zh) 2023-06-08

Family

ID=86611336

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/135305 Ceased WO2023097647A1 (zh) 2021-12-03 2021-12-03 Ccd相机标定系统、方法、装置、计算设备及存储介质

Country Status (6)

Country Link
US (1) US20240153141A1 (zh)
EP (1) EP4296952A4 (zh)
JP (1) JP7653536B2 (zh)
KR (1) KR20230144591A (zh)
CN (1) CN117157670B (zh)
WO (1) WO2023097647A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116527875A (zh) * 2023-06-30 2023-08-01 钛玛科(北京)工业科技有限公司 线阵相机调试指示器及调试方法

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4350278B1 (en) * 2022-08-17 2025-03-05 Contemporary Amperex Technology (Hong Kong) Limited Calibration ruler, calibration method and apparatus, and detection method and apparatus
US20250252628A1 (en) * 2024-02-07 2025-08-07 Qualcomm Incorporated Synchronizing image signal processor and image sensor configurations
KR20250136030A (ko) * 2024-03-07 2025-09-16 서울대학교산학협력단 왜곡을 고려한 비편향된 원뿔 추정기를 이용한 카메라 캘리브레이션 알고리즘의 방법 및 장치
CN117848403B (zh) * 2024-03-08 2024-07-19 宁德时代新能源科技股份有限公司 标定件和使用标定件标定检测系统的方法
CN119006614B (zh) * 2024-10-23 2025-07-08 易思维(杭州)科技股份有限公司 一种针对运动待测物的相机外参实时获取方法
CN119774352B (zh) * 2024-12-09 2025-12-19 中电信人工智能科技(北京)有限公司 一种布匹的纠偏方法、装置、电子设备和存储介质
CN120927255B (zh) * 2025-10-13 2026-01-30 歌尔股份有限公司 流水线校准系统及流水线校准方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140104169A1 (en) * 2011-05-04 2014-04-17 Eberhard Karls Universitaet Teubingen Method for Determining the Relative Position of an Object in an Area, and Optical Input System
CN108818536A (zh) * 2018-07-12 2018-11-16 武汉库柏特科技有限公司 一种机器人手眼标定的在线偏移修正方法及装置
CN109990698A (zh) * 2017-12-29 2019-07-09 广州智信科技有限公司 快速标定装置及快速标定方法
CN113506349A (zh) * 2021-07-19 2021-10-15 江苏天楹机器人智能科技有限公司 一种垃圾分选机器人高精度手眼标定方法

Family Cites Families (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3735344B2 (ja) * 2002-12-27 2006-01-18 オリンパス株式会社 キャリブレーション装置、キャリブレーション方法、及びキャリブレーション用プログラム
US7889234B2 (en) * 2008-01-10 2011-02-15 Delphi Technologies, Inc. Automatic calibration for camera lens distortion correction
US9734419B1 (en) * 2008-12-30 2017-08-15 Cognex Corporation System and method for validating camera calibration in a vision system
US9019349B2 (en) * 2009-07-31 2015-04-28 Naturalpoint, Inc. Automated collective camera calibration for motion capture
TWI520099B (zh) * 2014-02-19 2016-02-01 鈺創科技股份有限公司 影像擷取系統的校正方法
US10445898B2 (en) * 2016-02-05 2019-10-15 Sony Corporation System and method for camera calibration by use of rotatable three-dimensional calibration object
US9965870B2 (en) * 2016-03-29 2018-05-08 Institut National D'optique Camera calibration method using a calibration target
KR101818104B1 (ko) * 2016-03-30 2018-01-12 한국과학기술원 카메라 및 카메라 캘리브레이션 방법
EP3264359B1 (en) * 2016-06-28 2025-02-19 Dassault Systèmes A computer-implemented method of calibrating a camera
EP3264360B1 (en) * 2016-06-28 2025-01-22 Dassault Systèmes Dynamical camera calibration
WO2018173551A1 (ja) * 2017-03-21 2018-09-27 オリンパス株式会社 較正装置、較正方法、光学装置、撮影装置および投影装置
CN106982370B (zh) * 2017-05-03 2018-07-06 武汉科技大学 一种相机高精度校准标定板及实现校准的方法
US10269140B2 (en) * 2017-05-04 2019-04-23 Second Spectrum, Inc. Method and apparatus for automatic intrinsic camera calibration using images of a planar calibration pattern
US11039121B2 (en) * 2017-06-20 2021-06-15 Sony Interactive Entertainment Inc. Calibration apparatus, chart for calibration, chart pattern generation apparatus, and calibration method
CN118840433A (zh) * 2018-05-25 2024-10-25 派克赛斯有限责任公司 用于多相机放置的系统和方法
CN109671123B (zh) * 2019-01-31 2023-10-17 泉州华中科技大学智能制造研究院 一种基于单目视觉的鞋底喷胶设备及方法
EP4071713B1 (en) * 2019-12-30 2024-06-19 Huawei Technologies Co., Ltd. Parameter calibration method and apapratus
CN111402344A (zh) * 2020-04-23 2020-07-10 Oppo广东移动通信有限公司 标定方法、标定装置和非易失性计算机可读存储介质
CN112396663B (zh) * 2020-11-17 2021-09-14 南方电网电力科技股份有限公司 一种多深度相机的可视化标定方法、装置、设备和介质
US11172193B1 (en) * 2020-12-04 2021-11-09 Argo AI, LLC Method and system to calibrate camera devices of a vehicle vision system using a programmable calibration target device
CN113409403B (zh) * 2021-06-29 2022-09-16 湖南泽塔科技有限公司 相机标定架、基于标定架的单幅图像相机标定方法及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140104169A1 (en) * 2011-05-04 2014-04-17 Eberhard Karls Universitaet Teubingen Method for Determining the Relative Position of an Object in an Area, and Optical Input System
CN109990698A (zh) * 2017-12-29 2019-07-09 广州智信科技有限公司 快速标定装置及快速标定方法
CN108818536A (zh) * 2018-07-12 2018-11-16 武汉库柏特科技有限公司 一种机器人手眼标定的在线偏移修正方法及装置
CN113506349A (zh) * 2021-07-19 2021-10-15 江苏天楹机器人智能科技有限公司 一种垃圾分选机器人高精度手眼标定方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4296952A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116527875A (zh) * 2023-06-30 2023-08-01 钛玛科(北京)工业科技有限公司 线阵相机调试指示器及调试方法
CN116527875B (zh) * 2023-06-30 2023-08-29 钛玛科(北京)工业科技有限公司 线阵相机调试指示器及调试方法

Also Published As

Publication number Publication date
CN117157670B (zh) 2026-02-17
JP2024514755A (ja) 2024-04-03
US20240153141A1 (en) 2024-05-09
CN117157670A (zh) 2023-12-01
JP7653536B2 (ja) 2025-03-28
KR20230144591A (ko) 2023-10-16
EP4296952A4 (en) 2024-08-21
EP4296952A1 (en) 2023-12-27

Similar Documents

Publication Publication Date Title
WO2023097647A1 (zh) Ccd相机标定系统、方法、装置、计算设备及存储介质
CN111047536B (zh) Ccd图像矫正方法、装置、设备及存储介质
CN103279956B (zh) 一种检测贴片机元器件定位精度的方法
CN101207833B (zh) 数码相机镜头光心偏移的检测方法
CN105021127B (zh) 一种贴片机的基准相机校正方法
US20150205088A1 (en) Bevel-axial auto-focusing microscopic system and method thereof
CN102853777A (zh) 基于图像处理的制动间隙宽度测量方法和设备
CN117197070B (zh) 检测方法、装置、设备及存储介质
Zhang et al. A new algorithm for accurate and automatic chessboard corner detection
CN114720473A (zh) 基于机器视觉的车载屏幕背板的缺陷检测方法
CN110519508B (zh) 一种在摄像模组自动调心过程中识别特征对象的方法
CN114240984B (zh) 一种圆形标志点边缘提取方法及其应用
JP2014155063A (ja) 解像度測定用チャート、解像度測定方法、カメラモジュールにおける位置調整方法およびカメラモジュールの製造方法
US12536686B2 (en) Calibration method of apparatus installation parameter and related surveillance device
CN117768767A (zh) 一种线阵相机行频调节方法及系统
CN110349169B (zh) 一种直线测量方法
CN112836726A (zh) 一种基于视频信息的指针类仪表示数读取方法及装置
CN117433994A (zh) 基于双工位的led载带高精度在线视觉检测系统及方法
CN115112296A (zh) 一种稳定精度测试方法、系统、介质、设备及终端
CN114170318B (zh) 图像处理方法、装置、系统、介质及电子设备
CN114757882B (zh) 一种基于机器视觉的平面接口测量方法及装置
US10832073B2 (en) Text resolution determinations via optical performance metrics
US10511780B2 (en) Detecting device, and method for controlling the same
CN110148141A (zh) 一种丝印滤光片小片检测计数方法及设备
CN116993725A (zh) 一种柔性电路板智能贴片信息处理系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21966074

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 20237030659

Country of ref document: KR

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 1020237030659

Country of ref document: KR

WWE Wipo information: entry into national phase

Ref document number: 2023555177

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 2021966074

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2021966074

Country of ref document: EP

Effective date: 20230919

NENP Non-entry into the national phase

Ref country code: DE