A 3D character visual detection defect device and method based on double laser cameras

By using dual laser cameras to scan and synthesize point cloud images, combined with OCR technology and shape matching, the problems of ambient light influence and depth information loss were solved, achieving high-precision character detection.

CN114445820BActive Publication Date: 2026-03-24GUANGZHOU RUIWOSI VISUAL TECH CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-29
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing technologies are easily affected by ambient light when detecting character defects on the surface of workpieces, have poor anti-interference capabilities, and cannot effectively detect the depth or thickness information of characters.

Method used

The system employs dual laser cameras for scanning to synthesize a more comprehensive point cloud image. It uses a specific wavelength of laser to reduce the influence of ambient light, and uses OCR technology and shape matching to confirm the character content and position. It also combines a depth detection module to determine whether the character is incomplete.

Benefits of technology

It improves the anti-interference capability of detection, enhances the accuracy of character recognition, and can comprehensively detect the content, position, depth and thickness of characters, thereby improving detection speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114445820B_ABST
    Figure CN114445820B_ABST
Patent Text Reader

Abstract

The application discloses a kind of 3D character visual detection defect device and method based on double laser camera, the method includes: step S1, laser profile picture of the workpiece to be detected irradiated by laser is respectively collected using first laser camera and second laser camera, obtain first point cloud and second point cloud, the first laser camera and second laser camera use positive and negative opposite installation mode;Step S2, first point cloud and second point cloud are spliced, and a point cloud with higher precision and more complete information is synthesized;Step S3, character content is recognized using OCR technology to the spliced point cloud, and the position of character is further confirmed and obtained using shape matching, whether the position of character is within the allowable tolerance range is tested, and after obtaining the content and position of character, difference comparison is carried out between actual character and standard character, to detect whether actual character exists defect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of visual inspection technology, and in particular to a 3D character visual inspection defect device and method based on dual laser cameras. Background Technology

[0002] Visual inspection is the use of machines to replace human eyes for measurement and judgment. Specifically, it refers to the conversion of the captured target into an image signal by machine vision products (i.e., image acquisition devices, such as CMOS and CCD), which is then transmitted to a dedicated image processing system. Based on pixel distribution and information such as brightness and color, the signal is converted into a digital signal. The image system performs various operations on these signals to extract the features of the target, and then controls the operation of equipment on site based on the judgment results. It is a valuable mechanism for production, assembly, or packaging.

[0003] Machining workpieces typically have numbers and letters machined onto their surfaces using punches or lasers. These numbers or letters are used to identify information such as the workpiece's production date, batch number, part name, part number, and operator. They serve as an important medium for production organization and management, product quality monitoring, product logistics tracking, and after-sales traceability.

[0004] Characters processed on the workpiece surface using a punch or laser, unlike characters sprayed, printed, or paper labels, are engraved onto the workpiece surface. These engraved characters possess depth information, are three-dimensional characters, and are resistant to dirt and scratches. They can withstand harsh industrial environments and product operating conditions, including high temperatures, cleaning, and high-speed rotation. They offer unparalleled environmental stability compared to surface spraying, printing, or paper labeling, and are currently widely used in various industrial products.

[0005] Currently, the traditional method is still commonly used for detecting character defects on the surface of workpieces: relying on a planar camera to sense different amounts of reflectance on the workpiece surface to form a grayscale image, and then performing image recognition processing on the grayscale image to detect whether there are errors, skewness, or missing characters on the workpiece.

[0006] However, this traditional method has the following drawbacks when used for character defect detection on workpiece surfaces:

[0007] 1. It has a wide range of light spectrum and is easily affected by ambient light;

[0008] 2. Stains and pen marks on the workpiece surface will affect imaging and reduce its anti-interference ability;

[0009] 3. Converting 3D characters to 2D images will result in the loss of depth or thickness information, making it impossible to detect character depth or thickness, as well as defects in depth or thickness. Summary of the Invention

[0010] To overcome the shortcomings of the existing technology, one objective of this invention is to provide a 3D character visual inspection defect device and method based on dual laser cameras. By using dual laser cameras to scan and synthesize a more comprehensive point cloud image, the detection speed and accuracy are improved. At the same time, by using lasers of specific wavelengths, the photosensitive element only receives light of specific wavelengths and filters light of other wavelengths, which can effectively reduce the influence of ambient light on the image and improve anti-interference ability.

[0011] Another objective of this invention is to provide a 3D character visual inspection defect method and apparatus based on dual laser cameras, which can eliminate interference from stains and handwriting on the workpiece surface and improve the accuracy of recognition.

[0012] Another objective of this invention is to provide a method and apparatus for visually detecting defects in 3D characters based on dual laser cameras. In addition to detecting the content and position of 3D characters, it can also detect the incompleteness, depth, or thickness information of characters, making the detection more comprehensive.

[0013] To achieve the above objectives, this invention proposes a 3D character visual defect detection device based on dual laser cameras, comprising:

[0014] The first laser camera and the second laser camera are both at an angle θ to the laser. The first laser camera and the second laser camera are mounted opposite each other and respectively acquire laser contour images of the surface of the workpiece to be inspected illuminated by the laser to obtain the first point cloud image and the second point cloud image.

[0015] The image stitching unit is used to stitch the first point cloud image and the second point cloud image together to create a point cloud image with higher precision and more complete information.

[0016] The character defect detection unit is used to identify character content from the stitched point cloud image using OCR technology, and to further confirm the character content and determine the character position using shape matching. It checks whether the character position is within the allowable tolerance range, and after obtaining the character content and position, it performs a differential comparison between the actual character and the standard character to detect whether the actual character is defective.

[0017] Preferably, one of the first point cloud map and the second point cloud map is used as the main image, and the other is used as the sub-image. Before image stitching, the relative positional relationship of the two laser cameras is pre-calibrated, and a transformation matrix is ​​calculated. The transformation matrix is ​​used to convert the data of the sub-image into data that can correspond to the main image. Then, the converted sub-image data is interpolated into the main image to synthesize a point cloud map with higher accuracy and more complete information.

[0018] Preferably, the character defect detection unit further includes:

[0019] The 3D character extraction module is used to extract 3D characters from the stitched point cloud image and perform correction.

[0020] The character region extraction module is used to extract character regions from the corrected 3D characters through threshold segmentation and obtain the grayscale values ​​in the character regions.

[0021] The character recognition module is used to recognize character regions using OCR technology and identify the character content;

[0022] The template matching module is used to perform template matching between the character content recognized by the character recognition module and the character template, and output the matching result.

[0023] The character position detection module is used to perform coordinate transformation on the character position and angle in the matching results of the template matching module in order to verify whether the character position is within the allowable tolerance range.

[0024] The defect detection module is used to convert the character area into a standard position after the template matching module performs the matching. The difference area is obtained by subtracting the standard character area from the standard position. The difference area is used to determine whether the character is incomplete.

[0025] Preferably, the character defect detection unit further includes:

[0026] The depth and thickness detection module is used to calculate whether the depth or thickness of a character meets the standard based on the grayscale value in the character area obtained by the character recognition module.

[0027] Preferably, in the template matching module, the corresponding character template is called for template matching, and the matching result is output as a score. The score is used to further confirm the character content. At the same time, the matching result also outputs the position and angle of the current character in the image.

[0028] Preferably, the character position detection module performs coordinate transformation on the character position and angle in the matching result to obtain world coordinates, compares and calculates the obtained world coordinates with the standard position coordinate values, and determines whether the deviations in the X direction, Y direction and rotation angle are within the set tolerance values. If they are within the tolerance, the position deviation is determined to be normal; if they are outside the tolerance, it is abnormal and an alarm is triggered.

[0029] Preferably, the defect detection module determines whether a character is incomplete by detecting the area, length, width, etc. of the difference region.

[0030] Preferably, after confirming the character content and character position through the template matching module, the defect detection module calculates the transformation matrix from the origin (0,0,0) to the current character position (x,y,r), and uses this matrix to transform the template character region (Px,Py) at the origin into the comparison character region (Qx,Qy). The comparison character region is subtracted from the current character region to obtain the difference region. The area, length, width, etc. of the difference region are detected to determine whether the character is incomplete.

[0031] Preferably, the depth detection module multiplies the grayscale value in the character area obtained by the character recognition module by a scaling factor to obtain the actual depth or thickness of the character, and determines whether it meets the standard.

[0032] To achieve the above objectives, the present invention also provides a 3D character visual defect detection method based on dual laser cameras, comprising the following steps:

[0033] Step S1: Use the first laser camera and the second laser camera to acquire laser contour images of the surface of the workpiece to be inspected that are illuminated by the laser, and obtain the first point cloud image and the second point cloud image. The first laser camera and the second laser camera are mounted in opposite directions.

[0034] Step S2: The first point cloud map and the second point cloud map are stitched together to form a point cloud map with higher accuracy and more complete information.

[0035] Step S3: The character content is identified by OCR technology in the stitched point cloud image, and shape matching is used to further confirm the character content and determine the position of the character. The position of the character is checked to see if it is within the allowable tolerance range. After obtaining the content and position of the character, the actual character is compared with the standard character by difference to detect whether the actual character is incomplete.

[0036] Compared with the prior art, the present invention has the following beneficial effects:

[0037] 1. Effectively reduces the impact of ambient light on images and improves anti-interference capabilities.

[0038] 2. It eliminates interference from stains and handwriting on the workpiece surface, improving the accuracy of recognition.

[0039] 3. In addition to detecting the content and position of 3D characters, it can also detect character defects, depth, or thickness, providing a more comprehensive detection.

[0040] 4. The dual-laser scanning method can synthesize a more comprehensive point cloud map in a single scan, improving detection speed and accuracy. Attached Figure Description

[0041] Figure 1This is a system structure diagram of a 3D character visual inspection defect device based on dual laser cameras according to the present invention;

[0042] Figure 2 This is a schematic diagram of the installation of the first laser camera, the second laser camera, and the laser in a specific embodiment of the present invention;

[0043] Figure 3 This is a schematic diagram showing the perspective of two cameras mounted opposite each other in a specific embodiment of the present invention;

[0044] Figure 4 This is a flowchart illustrating the steps of a 3D character visual defect detection method based on dual laser cameras according to the present invention. Detailed Implementation

[0045] The following describes the embodiments of the present invention through specific examples and in conjunction with the accompanying drawings. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific examples, and various details in this specification can also be modified and changed based on different viewpoints and applications without departing from the spirit of the present invention.

[0046] Figure 1 This is a system structure diagram of a 3D character visual defect detection device based on dual laser cameras according to the present invention. Figure 1 As shown, the present invention discloses a 3D character visual inspection defect device based on dual laser cameras, comprising:

[0047] The first laser camera 101 is positioned at an angle θ to the laser beam. The camera and laser are mounted facing each other. The camera acquires a laser contour image of the surface of the workpiece being inspected, obtained as a first point cloud map. Figure 2 As shown.

[0048] The second laser camera 102 is positioned at an angle θ to the laser and is mounted in reverse orientation to acquire laser contour images of the surface of the workpiece to be inspected, thereby obtaining a second point cloud map.

[0049] In this invention, the lasers in the first laser camera 101 and the second laser camera 102 are perpendicularly downward. The camera and the laser are at a certain angle (i.e., the camera's line of sight is at a certain angle to the laser's irradiation direction) to capture the laser contour. That is, the laser line irradiates perpendicularly downward, and the camera captures the position where the laser returns from the side, thus obtaining a contour of the laser irradiation position. Then, by moving the laser camera or the workpiece, a point cloud map of the workpiece's surface height is obtained. Assuming this angle is θ (0° < θ < 90°), the scanning angle when mounted upright is 0° to 180° - θ, and when mounted in reverse, it is θ to 180°. Figure 3As shown, this invention employs two laser cameras mounted opposite each other. The two laser cameras simultaneously scan the workpiece, each obtaining a point cloud image of the workpiece surface. Furthermore, the two cameras scan the workpiece from two different angles, thereby achieving full coverage from 0° to 180° to eliminate scanning blind spots. In this invention, both laser cameras use lasers of specific wavelengths, and the photosensitive elements only receive light of specific wavelengths, filtering out light of other wavelengths, resulting in strong resistance to ambient light interference.

[0050] As can be seen, the present invention uses a laser camera based on triangulation to perform 3D point cloud imaging on the surface of the workpiece to be inspected. Stains and handwriting on the workpiece surface will not affect the imaging. At the same time, direct 3D imaging retains depth or thickness information, which can detect the depth or thickness of characters.

[0051] Image stitching unit 103 is used to stitch the first point cloud image and the second point cloud image together to create a point cloud image with higher precision and more complete information.

[0052] Since the two point cloud images obtained by the first laser camera 101 and the second laser camera 102 are from a single camera, they need to be stitched together. In a specific embodiment of the present invention, one of the two point cloud images is used as the main image and the other as the secondary image. The stitching of the images requires the relative positional relationship of the two laser cameras to be calibrated in advance. The method is to find more than three sets of data corresponding to the coordinates (Px, Py, Pz) of the secondary image and the coordinates (Qx, Qy, Qz) of the main image by scanning the calibration plate, and substitute them into the following transformation matrix (Formula 1) to solve for the rotation matrix R1 and the translation matrix T1. Then, the transformation matrix is ​​used to convert the data of the secondary image into data that can correspond to the main image. The converted data of the secondary image is then interpolated into the main image to synthesize a point cloud image with higher accuracy and more complete information.

[0053]

[0054] The character defect detection unit 104 is used to identify the character content of the spliced ​​point cloud map using OCR technology, and to further confirm the character content and determine the position of the character using shape matching. It checks whether the character position is within the allowable tolerance range, and after obtaining the character content and position, it performs a differential comparison between the actual character and the standard character to detect whether the actual character is defective.

[0055] Specifically, the character defect detection unit 104 further includes:

[0056] The 3D character extraction module is used to extract 3D characters from the stitched point cloud image and then correct them.

[0057] In a specific embodiment of the present invention, the 3D character cropping module first uses the outer position of the template character on the template workpiece as a reference by manually framing it. Then, the character is cropped using this reference, and the outer plane is zeroed out and corrected.

[0058] The character region extraction module is used to extract character regions from the corrected 3D characters through threshold segmentation and obtain the grayscale values ​​in the character regions.

[0059] Specifically, the character region extraction module obtains a binarized image by thresholding the corrected 3D characters, filters and extracts the character regions based on the binarized image, and obtains the grayscale values ​​in the character regions.

[0060] The character recognition module uses OCR technology to recognize character regions and extract character content. Since OCR technology for character recognition is a mature and readily available technology, it will not be elaborated upon here.

[0061] The template matching module is used to match the character content recognized by the character recognition module with the character template and output the matching result.

[0062] In a specific embodiment of the present invention, after the character content is obtained through the character recognition module, the corresponding character template is called for template matching. The matching result outputs a score, which can be used to further confirm the character content, greatly improving the accuracy of content recognition. Simultaneously, the matching result also outputs the position and angle of the character in the image. For example, if a character is OCR-recognized as "H", the template for "H" is called for matching. If the score for "H" is greater than a set value, the content recognition is considered correct. If the score is less than the set value, all templates are called one by one for matching, and the character corresponding to the template with the highest score is taken as the content recognition result. The matching result also outputs the position and angle of the character in the image. Since the character template matching uses existing mature technology, it will not be elaborated upon here.

[0063] The character position detection module is used to perform coordinate transformation on the character position and angle in the matching results of the template matching module in order to verify whether the character position is within the allowable tolerance range.

[0064] Specifically, the character position detection module performs coordinate transformation on the character position and angle in the matching result to obtain world coordinates. Then, it checks whether the character position is within the allowable tolerance range. That is, it compares and calculates the obtained world coordinates with the standard position coordinate values ​​to determine whether the deviations in the X direction, Y direction, and rotation angle are within the set tolerance values. If they are within the tolerance, the position deviation is determined to be OK; if they are outside the tolerance, it is NG and an alarm is issued.

[0065] The defect detection module is used to convert the character area into a standard position after the template matching module performs the matching. The difference area is obtained by subtracting the standard character area from the standard position. The difference area is used to determine whether the character is incomplete.

[0066] Specifically, after confirming the character content and position through the template matching module, a transformation matrix is ​​calculated from the origin (0,0,0) to the current character position (x,y,r). This matrix is ​​then used to transform the template character region (Px,Py) at the origin into the comparison character region (Qx,Qy). The comparison character region is subtracted from the current character region to obtain the difference region. The area, length, and width of the difference region are then detected to determine if the character is incomplete. This is illustrated in Formula 2 below.

[0067]

[0068] in,

[0069] Preferably, the character defect detection unit 104 further includes:

[0070] The depth and thickness detection module is used to obtain the actual depth or thickness of the character by multiplying the gray value in the character area obtained by the character recognition module by a scaling factor (mm / gray value), and to determine whether it meets the standard.

[0071] Figure 4 This is a flowchart illustrating the steps of a 3D character visual defect detection method based on dual laser cameras according to the present invention. Figure 4 As shown, the present invention provides a 3D character visual defect detection method based on dual laser cameras, comprising the following steps:

[0072] Step S1: Use the first laser camera and the second laser camera to acquire laser contour images of the surface of the workpiece to be inspected illuminated by the laser, and obtain the first point cloud image and the second point cloud image.

[0073] In this invention, the lasers in the first and second laser cameras are perpendicular to the downward direction, and the cameras and lasers are at a certain angle to capture the laser profile. Assuming this angle is θ (0° < θ < 90°), the scanning angle that can be scanned when mounted upright is 0° to 180° - θ, and when mounted in reverse is θ to 180°. This invention uses two laser cameras mounted upright and in reverse to scan the workpiece to be inspected from two angles, thereby achieving full coverage from 0° to 180° to eliminate scanning blind spots.

[0074] Step S2: The first point cloud map and the second point cloud map are stitched together to form a point cloud map with higher accuracy and more complete information.

[0075] Since the first and second laser cameras acquire two images from a single camera, these two point cloud images need to be stitched together. In a specific embodiment of the invention, one of the two point cloud images is used as the main image, and the other as the secondary image. Image stitching requires pre-calibrating the relative positional relationship of the two laser cameras. This is done by scanning a calibration board to find at least three sets of data corresponding to the coordinates (Px, Py, Pz) of the secondary image and the coordinates (Qx, Qy, Qz) of the main image. These data are then substituted into the following transformation matrix to solve for the rotation matrix R1 and the translation matrix T1. This transformation matrix is ​​then used to convert the data of the secondary image into data that corresponds to the main image. Finally, the converted data of the secondary image is interpolated into the main image to synthesize a point cloud image with higher accuracy and more complete information.

[0076]

[0077] Step S3: The character content is identified by OCR technology in the stitched point cloud image, and shape matching is used to further confirm the character content and determine the position of the character. The position of the character is checked to see if it is within the allowable tolerance range. After obtaining the content and position of the character, the actual character is compared with the standard character by difference to detect whether the actual character is incomplete.

[0078] Specifically, step S3 further includes:

[0079] Step S300: Extract the 3D characters from the spliced ​​point cloud image and correct them.

[0080] In a specific embodiment of the present invention, the 3D character frame-capturing module first uses the outer position of the template character on the template workpiece as a reference by manually framing it. Subsequently, the character is cropped using this reference, and the outer plane is zeroed out and corrected.

[0081] Step S301: Extract the character region from the corrected 3D character through threshold segmentation and obtain the grayscale value in the character region.

[0082] Specifically, in step S301, the corrected 3D characters are segmented by thresholding to obtain a binarized image. The character regions are extracted based on the binarized image and the gray values ​​in the character regions are obtained.

[0083] Step S302 involves using OCR technology to recognize the character region and extract the character content. Since OCR technology for character recognition is a mature and readily available technology, it will not be elaborated upon here.

[0084] Step S303: Perform template matching between the character content identified in step S302 and the character template, and output the matching result.

[0085] In a specific embodiment of the present invention, after the character content is obtained through the character recognition module, the corresponding character template is called for template matching. The matching result outputs a score, which can be used to further confirm the character content, greatly improving the accuracy of content recognition. Simultaneously, the matching result also outputs the position and angle of the character in the image. For example, if a character is OCR-recognized as "H", the template for "H" is called for matching. If the score for "H" is greater than a set value, the content recognition is considered correct. If the score is less than the set value, all templates are called one by one for matching, and the character corresponding to the template with the highest score is taken as the content recognition result. The matching result also outputs the position and angle of the character in the image. Since the character template matching uses existing mature technology, it will not be elaborated upon here.

[0086] Step S304: Perform coordinate transformation on the character position and angle in the matching result of step S303 to verify whether the character position is within the allowable tolerance range.

[0087] Specifically, in step S304, the character position and angle in the matching result are transformed to obtain world coordinates. Then, it is checked whether the character position is within the allowable tolerance range. That is, the obtained world coordinates are compared with the standard position coordinate values ​​to determine whether the deviations in the X direction, Y direction and rotation angle are within the set tolerance values. If they are within the tolerance, the position deviation is determined to be OK. If they are outside the tolerance, it is NG and an alarm prompt is issued.

[0088] Step S305: After matching in step S303, the character region is converted into a standard position, and the difference region is obtained by subtracting it from the standard character region. The difference region is used to determine whether the character is incomplete.

[0089] Specifically, after confirming the character content and position in step S303, the transformation matrix from the origin (0,0,0) to the current character position (x,y,r) is calculated. This matrix is ​​then used to transform the template character region (Px,Py) at the origin into the comparison character region (Qx,Qy). The comparison character region is subtracted from the current character region to obtain the difference region. The area, length, and width of the difference region are then checked to determine if the character is incomplete. The formula is as follows:

[0090]

[0091] in,

[0092] Preferably, step S3 further includes:

[0093] Step S306: Based on the grayscale value in the character area obtained in step 301, calculate whether the depth or thickness of the character meets the standard. That is, based on the grayscale value in the character area obtained in step 301, multiply by the scaling factor (mm / grayscale) to obtain the actual depth or thickness of the character, and then determine whether it meets the standard.

[0094] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can make modifications and changes to the above embodiments without departing from the spirit and scope of the invention. Therefore, the scope of protection of the present invention should be as set forth in the claims.

Claims

1. A 3D character visual inspection defect device based on dual laser cameras, comprising: A first laser camera and a second laser camera are both positioned at an angle θ to the laser beam. The first laser camera and the second laser camera are mounted opposite each other, and respectively acquire laser contour images of the surface of the workpiece to be inspected from two angles within a range of 0° to 180°, thus obtaining a first point cloud image and a second point cloud image. The opposite mounting arrangement allows the first laser camera to cover a viewing angle of 0° to 180°-θ, and the second laser camera to cover a viewing angle of θ to 180°. The image stitching unit is used to stitch the first point cloud image and the second point cloud image together to create a point cloud image with higher precision and more complete information. The character defect detection unit uses OCR technology to identify character content from the stitched point cloud image, and uses shape matching to further confirm the character content and determine the character position. The character position detection module performs coordinate transformation on the character position and angle in the shape matching result to obtain world coordinates, compares the obtained world coordinates with the standard position coordinate values, and calculates whether the deviations in the X direction, Y direction, and rotation angle are within the set tolerance values. If they are within the tolerance, the position deviation is judged to be normal; if they are outside the tolerance, it is abnormal and an alarm is issued. After obtaining the character content and position, the actual character is compared with the standard character to detect whether the actual character is incomplete. Specifically, the image stitching unit is used to take one of the first point cloud map and the second point cloud map as the main image and the other as the sub-image. Before image stitching, the relative positional relationship of the two laser cameras is calibrated in advance, and the transformation matrix is ​​calculated. During the stitching process, the rotation matrix and translation matrix are calculated by the calibration plate, and the transformation matrix is ​​used to convert the data of the sub-image into data that can correspond to the main image. Then, the converted sub-image data is interpolated into the main image to synthesize a point cloud map with higher accuracy and more complete information. The character defect detection unit includes a depth and thickness detection module, which is used to obtain the actual depth or thickness of the character by multiplying the gray value in the character area by a scaling factor, and to determine whether the depth or thickness of the character meets the standard.

2. The 3D character visual inspection defect device based on dual laser cameras as described in claim 1, characterized in that, The character defect detection unit further includes: The 3D character extraction module is used to extract 3D characters from the stitched point cloud image and perform correction. The character region extraction module is used to extract character regions from the corrected 3D characters through threshold segmentation and obtain the grayscale values ​​in the character regions. The character recognition module is used to recognize character regions using OCR technology and identify the character content; The template matching module is used to perform template matching between the character content recognized by the character recognition module and the character template, and output the matching result. The character position detection module is used to perform coordinate transformation on the character position and angle in the matching results of the template matching module in order to verify whether the character position is within the allowable tolerance range. The defect detection module is used to convert the character area into a standard position after the template matching module performs the matching. The difference area is obtained by subtracting the standard character area from the difference area, and the difference area is used to determine whether the character is incomplete.

3. The 3D character visual inspection defect device based on dual laser cameras as described in claim 2, characterized in that: In the template matching module, the corresponding character template is called to perform template matching, and the matching result is output as a score. The score is used to further confirm the character content. At the same time, the matching result also outputs the position and angle of the current character in the image.

4. The 3D character visual inspection defect device based on dual laser cameras as described in claim 2, characterized in that: The defect detection module determines whether a character is incomplete by detecting the area, length, and width of the difference region.

5. The 3D character visual inspection defect device based on dual laser cameras as described in claim 2, characterized in that: After confirming the character content and position through the template matching module, the defect detection module calculates the transformation matrix from the origin (0, 0, 0) to the current character position (x, y, r), and uses this matrix to transform the template character region (Px, Py) at the origin into the comparison character region (Qx, Qy). The comparison character region is subtracted from the current character region to obtain the difference region. The area, length, and width of the difference region are detected to determine whether the character is incomplete.

6. A method for 3D character visual inspection defects based on dual laser cameras, comprising the following steps: Step S1: Using a first laser camera and a second laser camera, laser contour images of the surface of the workpiece to be inspected are acquired from two angles within a range of 0° to 180°, respectively, to obtain a first point cloud image and a second point cloud image. The first laser camera and the second laser camera are mounted in a front-to-back configuration. The opposite mounting method allows the first laser camera to cover a viewing angle of 0° to 180°-θ, and the second laser camera to cover a viewing angle of θ to 180°. Step S2: The first point cloud map and the second point cloud map are stitched together to form a point cloud map with higher accuracy and more complete information. Step S3: The stitched point cloud image is processed using OCR technology to identify the character content. Shape matching is then used to further confirm the character content and determine the character position. The character position detection module performs coordinate transformation on the character position and angle in the shape matching result to obtain world coordinates. The obtained world coordinates are compared with the standard position coordinates to determine whether the deviations in the X direction, Y direction, and rotation angle are within the set tolerance values. If they are within the tolerance, the position deviation is considered normal; if they are outside the tolerance, it is considered abnormal, and an alarm is triggered. After obtaining the character content and position, the actual character is compared with the standard character to detect whether the actual character is incomplete. Specifically, step S2 includes using one of the first point cloud map and the second point cloud map as the main image and the other as the sub-image. Before image stitching, the relative positional relationship of the two laser cameras is pre-calibrated, and the transformation matrix is ​​calculated. During the stitching process, the rotation matrix and translation matrix are calculated through the calibration plate, and the transformation matrix is ​​used to convert the data of the sub-image into data that can correspond to the main image. Then, the converted sub-image data is interpolated into the main image to synthesize a point cloud map with higher accuracy and more complete information. Step S3 also includes multiplying the grayscale value in the character area by a scaling factor to obtain the actual depth or thickness of the character, and determining whether the depth or thickness of the character meets the standard.

Citation Information

Patent Citations

  • Three-dimensional laser scanning-based license plate recognition device and method thereof

    CN108345884A

  • A visual recognition defect detection method based on printed matter characters

    CN109308700A

  • 360-degree contour measurement method

    CN109724531A

  • Three-dimensional OCR detection method based on depth camera

    CN113673496A