Vehicle VIN code detection method and device

By using 3D camera scanning and binarization processing to generate a two-dimensional depth image of the VIN code, and combining it with the character feature library to analyze the engraving depth and stroke width, the problems of missing defects and low efficiency in VIN code detection are solved, and high-precision automated detection is achieved.

CN114821589BActive Publication Date: 2025-09-30WUHAN NEWLAZ INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210437987.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-25
Publication Date
2025-09-30
Estimated Expiration
2042-04-25

Smart Images

  • Figure CN114821589B_ABST
    Figure CN114821589B_ABST
Patent Text Reader

Abstract

The present invention provides a vehicle VIN code detection method and device, the method comprising: scanning the VIN code engraving area, obtaining a corresponding surface morphology characteristic curve, and generating a two-dimensional depth image of the corresponding area; obtaining the character height and total character length of the VIN code, and judging whether the height and length of the VIN code are qualified; segmenting the two-dimensional depth image, identifying each character of the segmented VIN code, combining to obtain the VIN code, and judging whether the VIN code is the same as the standard value; extracting the feature points of each character based on a preset character feature library, thereby realizing feature point analysis of each individual character, avoiding missing engraving defects of a single character, and realizing complete detection of the VIN code; the present invention also provides a vehicle VIN code detection device, by detachably mounting a scanning module on a robot, so that the detection device can adapt to multiple working angles, thereby facilitating the automation of the detection process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automobile production technology, and in particular to a vehicle VIN code detection method and device. Background Art

[0002] The Vehicle Identification Number (VIN), abbreviated as VIN, consists of 17 digits or letters and can be used to identify information such as the country of manufacture, manufacturer, and engine model of the vehicle. It is equivalent to the vehicle's ID number, so VIN code recognition is particularly important. Currently, there are very strict requirements for the engraving shape and depth of VIN codes. According to the national standard (GB 16735-2019), for cars and trailers, the engraving height should be greater than or equal to 7.0mm and the engraving depth should be greater than or equal to 0.3mm; for passenger cars and closed trucks with a gross mass of less than or equal to 3500kg, the engraving depth should be greater than or equal to 0.2mm, and the total engraving length should be less than or equal to 200mm.

[0003] Traditional VIN code engraving typically uses mechanical engraving methods, which are prone to wear and tear, and produce suboptimal results on hard materials. Therefore, laser processing, with its advantages of high speed, high power, and long life, has gradually gained application for vehicle VIN code engraving. However, since laser processing involves thermal processing, any anomalies during the process can irreversibly affect the engraving results, easily leading to the scrapping of entire vehicles and serious consequences. Furthermore, factors such as surface contamination can easily lead to insufficient VIN code engraving depth. Therefore, traditional 2D character defect detection cannot fully assess engraving quality. Real-time 3D depth inspection of the engraving results is required to promptly identify any issues and implement swift resolution.

[0004] Currently, VIN code recognition and detection are mainly achieved by taking photos of the engraved area and using deep learning methods to train models or using image processing methods to analyze images and perform simple defect detection. However, these detection methods are limited to two-dimensional detection and cannot simultaneously detect depth, which does not meet the detection requirements of laser-processed VIN codes. The quality of the VIN code can also be inspected through contact detection methods. By using a special depth measuring device and a detection needle and a dial indicator to read the depth data, this method has low detection accuracy and is highly dependent on the technical level of the inspector. There are human errors, system errors, and observation errors, making it difficult to obtain correct detection results. Summary of the Invention

[0005] The present invention provides a vehicle VIN code detection method and device, which are used to solve the problems in the prior art that the VIN code engraving accuracy, character shape, engraving depth and width cannot be detected in one step, single characters are easily missed, and the detection efficiency is low. The method realizes real-time scanning and detection of VIN codes, improves the automation level of VIN code detection, implements the detection of single characters to avoid omissions, and improves the accuracy of detection.

[0006] The present invention provides a vehicle VIN code detection method, comprising the steps of:

[0007] S1 scans the VIN code engraving area and obtains multiple surface topography characteristic curves;

[0008] S2 generates a two-dimensional depth image of the corresponding area based on the surface topography characteristic curve;

[0009] S3: obtaining the character height and total length of the VIN code based on the two-dimensional depth image, and comparing the character height and total length with corresponding standard ranges. If the height and total length meet the standard range, further segmenting each character of the VIN code; otherwise, judging the VIN code as unqualified.

[0010] Identify each character of the segmented VIN code, combine them to obtain the VIN code, and compare the VIN code with the actual value of the VIN code. If the characters are the same as the actual value of the VIN code, it is determined that the character recognition is correct.

[0011] S4 extracts the feature points of each character based on a preset character feature library, calculates the engraving depth and stroke width of each character, and compares the engraving depth and stroke width of each character with the corresponding standard range. If the comparison results of each character are in line with the corresponding standard range, the VIN code is judged to be qualified.

[0012] According to a vehicle VIN code detection method provided by the present invention, step S1 specifically includes:

[0013] The initial position and the end position of the scan are calibrated in the VIN code engraving area, and the VIN code engraving area from the initial position to the end position is scanned by a 3D camera to obtain the surface morphology feature data.

[0014] According to a vehicle VIN code detection method provided by the present invention, step S3 specifically includes:

[0015] Establish a coordinate system on the two-dimensional depth image, with any corner point as the coordinate origin, the horizontal direction at the origin as the X axis, and the vertical direction as the Y axis;

[0016] Binarize the two-dimensional depth image and project the characters onto the X-axis and Y-axis respectively, setting the positions where the projected characters exist to 1 and the remaining positions to 0;

[0017] Get the leftmost and rightmost positions of the projected character in the X-axis direction, get the difference between the horizontal coordinates of the two end points, and get the total length of the character;

[0018] Get the top and bottom positions of the projected character in the Y-axis direction, get the difference between the corresponding vertical coordinates of the two end points, and get the height of the character.

[0019] According to a vehicle VIN code detection method provided by the present invention, in step S3, each character of the VIN code is segmented, specifically comprising the steps of:

[0020] Based on the two-dimensional depth image after binarization, a plurality of jump points changing from 0 to 1 are obtained according to the projected characters on the X-axis;

[0021] The original two-dimensional depth image is segmented at each of the jump points to obtain 17 separate characters.

[0022] According to a vehicle VIN code detection method provided by the present invention, step S3 specifically includes the following steps:

[0023] After obtaining each individual character, it is compared with the standard characters of the VIN code to determine whether there are any defects in the strokes of each character;

[0024] The defects at least include stroke errors and stroke omissions; if the defects exist, the VIN code is judged to be unqualified.

[0025] According to a vehicle VIN code detection method provided by the present invention, step S4 includes:

[0026] Establish a corresponding character feature library based on all available characters in the VIN code;

[0027] Extracting feature points for each individual character based on the character feature library, obtaining coordinates of each feature point, and obtaining a surface topography feature curve corresponding to the coordinates of each feature point based on the resolution and scanning rate of the surface topography feature curve;

[0028] The area with height jump on the surface topography characteristic curve is used as the character engraving area, and the engraving depth of the corresponding characteristic point is obtained;

[0029] The distance between the two end points of the character engraving area is obtained, and the character stroke width corresponding to the feature point is obtained by angle conversion.

[0030] Optionally, since the numeric and alphabetic characters allowed in the VIN code are fixed, analysis can be performed on a fixed number of numeric and alphabetic characters to obtain corresponding character feature points; including but not limited to: for each different usable character, adding the end points of the character's strokes and the intersection points between the strokes as the feature points of the corresponding character to the character feature library; adding the defect points in the historical inspection data as the feature points of the corresponding character to the character feature library;

[0031] According to a vehicle VIN code detection method provided by the present invention, step S4 includes:

[0032] Calculate the average engraving depth and average character stroke width of all feature points detected in a single VIN code, and collect statistics on the changing trends of the average engraving depth and the average character stroke width;

[0033] If the change trend of the average engraving depth and / or the average character stroke width is higher than a preset threshold, the VIN code is judged to be unqualified.

[0034] On the other hand, the present invention also provides a vehicle VIN code detection device, including a robot, a scanning module and an analysis module:

[0035] The scanning module is installed on the robot and is used to scan the VIN code engraving area to obtain the corresponding surface topography characteristic curve;

[0036] The analysis module generates a two-dimensional depth image of the corresponding area based on the surface topography characteristic curve;

[0037] The analysis module is further configured to obtain character heights and total lengths of the VIN code based on the two-dimensional depth image, and compare the character heights and total lengths with corresponding standard ranges. If the character heights and total lengths meet the standard ranges, each character of the VIN code is further segmented; otherwise, the VIN code is judged to be unqualified.

[0038] Identify each character of the segmented VIN code, combine them to obtain the VIN code, and compare the VIN code with the actual value of the VIN code. If the characters are the same as the actual value of the VIN code, it is determined that the character recognition is correct.

[0039] Based on a preset character feature library, the feature points of each character are extracted, the engraving depth and stroke width of each character are calculated, and the engraving depth and stroke width of each character are compared with the corresponding standard range. If the comparison results of each character are in line with the corresponding standard range, the VIN code is judged to be qualified.

[0040] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-described vehicle VIN code detection methods are implemented.

[0041] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of any of the above-mentioned vehicle VIN code detection methods are implemented.

[0042] The present invention provides a vehicle VIN code detection method and device, which obtains multiple groups of surface morphology feature curves of the VIN code in the longitudinal direction by scanning the VIN code engraving area, and combines them to generate corresponding two-dimensional depth images, thereby more accurately reflecting the surface morphology features of the VIN code engraving area; binarizes the two-dimensional depth image to accurately obtain the character height and total length of the VIN code; further divides each character of the VIN code, recognizes the individual characters and then combines them to obtain the complete VIN code, which is conducive to improving the recognition accuracy; further analyzes the feature points of each individual character according to a preset character feature library, thereby avoiding missing the engraving defects of individual characters and realizing complete detection of the VIN code; the present invention provides a vehicle VIN code detection device, which can easily be disassembled according to the actual detection vehicle model by detachably installing the scanning module on the robot. The robot enables the detection device to adapt to various working angles, thereby facilitating the automation of the detection process. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0044] Figure 1 1 is a flow chart of a vehicle VIN code detection method provided by the present invention;

[0045] Figure 2 Schematic diagram of surface topography characteristic curve of the vehicle VIN code detection method provided by the present invention;

[0046] Figure 3 Schematic diagram of a two-dimensional depth image obtained by the vehicle VIN code detection method provided by the present invention;

[0047] Figure 4 Schematic diagram of width and depth calculation of the vehicle VIN code detection method provided by the present invention. DETAILED DESCRIPTION

[0048] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0049] The terms "first," "second," "third," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements, but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.

[0050] In one embodiment, the present invention provides a method for detecting a vehicle VIN code, comprising the following steps:

[0051] S1 scans the VIN code engraving area and obtains multiple surface topography characteristic curves;

[0052] S2 generates a two-dimensional depth image of the corresponding area based on the surface topography characteristic curve;

[0053] S3: obtaining the character height and total length of the VIN code based on the two-dimensional depth image, and comparing the character height and total length with corresponding standard ranges. If the height and total length meet the standard range, further segmenting each character of the VIN code; otherwise, judging the VIN code as unqualified.

[0054] Identify each character of the segmented VIN code, combine them to obtain the VIN code, and compare the VIN code with the actual value of the VIN code. If the characters are the same as the actual value of the VIN code, it is determined that the character recognition is correct.

[0055] S4 extracts the feature points of each character based on a preset character feature library, calculates the engraving depth and stroke width of each character, and compares the engraving depth and stroke width of each character with the corresponding standard range. If the comparison results of each character are in line with the corresponding standard range, the VIN code is judged to be qualified.

[0056] Furthermore, the step S1 includes:

[0057] Marking an initial scanning position and an end scanning position in the VIN code engraving area, and scanning the VIN code engraving area from the initial position to the end scanning position by a 3D camera, thereby acquiring the surface topography feature data;

[0058] It should be noted that the initial position and the end position can be set to the left and right ends of the VIN code engraving area, and the scanning direction can be from left to right or from right to left, as long as the surface topography characteristic information within the VIN code engraving area is obtained; the present invention does not further limit the scanning direction; when performing horizontal scanning, multiple surface topography characteristic curves in the vertical direction of the VIN code engraving area are obtained;

[0059] The initial position and the end position can also be set to the upper end and the lower end of the VIN code engraving area, and the scanning can be performed from top to bottom or from bottom to top. Since multiple horizontal surface morphology characteristic curves of the VIN code engraving area are obtained when the vertical scanning is performed from top to bottom or from bottom to top, the VIN code has a large number of characters, and the horizontal surface morphology characteristic curves will be more complex, which is not conducive to character analysis and segmentation. Therefore, the efficiency of the vertical scanning from top to bottom or from bottom to top is not as good as the scanning method from left to right or from right to left.

[0060] Specifically, after scanning the VIN code engraving area, the surface morphology characteristic curve obtained is as follows: Figure 2 As shown, the letters "A", "B", and "C" are scanned. At letter B, the longitudinal surface topography characteristic curve obtained has three trough segments. The three trough segments correspond to the height jump area in character B, that is, the engraving area of ​​character B.

[0061] The multiple longitudinal surface topography characteristic curves obtained by scanning the letters "A", "B", and "C" are integrated to obtain a two-dimensional grayscale image. The flat bands are marked with light colors, and the troughs with high jumps are marked with dark colors, that is, the corresponding depth image is obtained;

[0062] Optionally, the device for scanning may be a 3D camera and a laser capable of emitting structured light. The present invention does not limit the specific scanning device.

[0063] As an example, as shown in the attached figure Figure 3 As shown, it is a two-dimensional depth image obtained by integrating multiple surface topography characteristic curves;

[0064] Furthermore, the character height and total length of the VIN code are calculated based on the acquired two-dimensional depth image of the complete VIN code engraving area. Step S3 includes:

[0065] Establish a coordinate system on the two-dimensional depth image, with any corner point as the coordinate origin, the horizontal rightward direction from the origin as the X axis, and the vertical downward direction as the Y axis;

[0066] Binarize the two-dimensional depth image and project the characters onto the X-axis and Y-axis respectively, setting the positions where the projected characters exist to 1 and the remaining positions to 0;

[0067] Get the leftmost and rightmost positions of the projected character in the X-axis direction, get the difference between the horizontal coordinates of the two end points, and get the total length of the character;

[0068] Get the top and bottom positions of the projected character in the Y-axis direction, get the difference between the corresponding vertical coordinates of the two end points, and get the height of the character;

[0069] Specifically, a fixed point at any corner of the two-dimensional depth image is used as the origin, a plane rectangular coordinate system is established, and the two-dimensional depth image is binarized;

[0070] When projecting the character onto the X-axis, as long as there is a high-jump area in the surface topography characteristic curve corresponding to a column of pixels, it indicates that the column of pixels belongs to the character engraving area, and the projection value at that location is set to "1". Similarly, when projecting onto the Y-axis, if the pixels corresponding to the row belong to the character engraving area, the corresponding projection value is set to "1".

[0071] The total projection on the X-axis and Y-axis is measured, and then the length value in the X-axis direction and the height value in the Y-axis direction are obtained, which are the total length and height of the character.

[0072] Specifically, in one embodiment, in the above step S3, segmenting each character of the VIN code specifically includes the following steps:

[0073] Based on the two-dimensional depth image after binarization, a plurality of jump points changing from 0 to 1 are obtained according to the projected characters on the X-axis;

[0074] The original two-dimensional depth image is segmented at each of the jump points to obtain 17 separate characters.

[0075] Specifically, since the VIN code has a total of 17 digits, there are 16 blank areas without any markings among the 17 characters of the VIN code. Therefore, when segmenting the image, based on the character projections on the X-axis obtained in the above steps, there are 16 areas where the projection value is 0.

[0076] Optionally, the transition point where the projection value changes from "1" to "0" for the first time is selected as the segmentation point, or one of the transition points in the blank area can be selected as the segmentation point according to actual conditions, which is not limited in the present invention.

[0077] Optionally, after the characters are segmented, the segmented image is binarized again, and the projection onto the Y axis is calculated, thereby calculating the height of each character, thereby verifying whether the height of each character meets the relevant standards;

[0078] Furthermore, the step S3 further includes:

[0079] After obtaining each individual character, it is compared with the standard characters of the VIN code to determine whether there are any defects in the strokes of each character;

[0080] If there is a defect, the VIN code engraving is judged to be unqualified.

[0081] Optionally, the characters in each segmented area are recognized by OCR technology, and it is determined whether there are defects in the strokes of each character. The types of defects include but are not limited to missing strokes, missed strokes, wrong strokes, wrong characters, and uneven strokes, which indicates that the character engraving is unqualified; if the characters are difficult to recognize, it indicates that there may be foreign objects such as stains on the surface of the original character area that interfere with the recognition, or that the character engraving is unqualified.

[0082] In one embodiment, step S4 further includes:

[0083] Establish a corresponding character feature library based on all available characters in the VIN code;

[0084] Extracting feature points for each individual character based on the character feature library and obtaining the coordinates of each feature point;

[0085] Based on the resolution and scanning speed of the two-dimensional depth image, obtaining a surface topography characteristic curve corresponding to the coordinates of each feature point;

[0086] The area with height jump on the surface topography characteristic curve is used as the character engraving area, and the engraving depth of the corresponding characteristic point is obtained;

[0087] The distance between the two end points of the character engraving area is obtained, and the character stroke width corresponding to the feature point is obtained by angle conversion.

[0088] Since the numeric and alphabetic characters allowed in the VIN code are fixed, analysis can be performed on a fixed number of numeric and alphabetic characters to obtain corresponding character feature points; including but not limited to: for each different usable character, the end points of the character's strokes and the intersection points between the strokes are added to the character feature library as feature points of the corresponding character;

[0089] Optionally, in the process of repeatedly testing the engraving of the VIN code, historical data of the multiple tests are collected, and regions with high frequencies of defects in each character in the historical test data are added as feature points of the corresponding characters to the character feature library;

[0090] This saves computing power for each detection, directly detects feature points, and uses the average depth of multiple feature points to feedback the depth of the corresponding character.

[0091] Specifically, the depth and width of the engraved strokes are obtained as follows: Figure 4 As shown, a single character after segmentation is obtained, feature points are selected for detection according to the above-mentioned feature point library, the position of the pixel is determined according to the resolution of the image, and the surface topography characteristic curve corresponding to the position is obtained according to the scanning speed of the sensor;

[0092] Optionally, linear filtering is used on the extracted surface topography characteristic curve to make the curve smooth, thereby preventing external disturbances during the detection process from affecting the detection result;

[0093] Further, if Figure 4 As shown in the figure, according to the extracted surface topography characteristic curve, the area where the height jump occurs on the curve is marked, the line segment corresponding to the non-marking area is fitted into a straight line, and the height difference between the straight line and the trough is calculated, which is the marking depth of the feature point;

[0094] Take the front and back endpoints of the height jump area, and take the distance between the two endpoints as the initial stroke width. Since some strokes have an angle with the vertical direction, the initial stroke width is converted according to the angle to obtain the width of the engraved stroke;

[0095] For a single character, the average engraving depth and stroke width of all feature points are calculated and compared with the range required by the VIN code standard. If the engraving depth or stroke width of any character does not meet the standard requirements, the VIN code being tested is unqualified.

[0096] On the other hand, in one embodiment, the present invention further provides a vehicle VIN code detection device. The detection device described below and the detection method described above can be referenced to each other, specifically including a robot, a scanning module, and an analysis module:

[0097] The scanning module is detachably mounted on the robot and is used to scan the VIN code engraving area to obtain the corresponding surface topography characteristic curve;

[0098] The analysis module generates a two-dimensional depth image of the corresponding area based on the surface topography characteristic curve;

[0099] The analysis module is further configured to obtain character heights and total lengths of the VIN code based on the two-dimensional depth image, and compare the character heights and total lengths with corresponding standard ranges. If the character heights and total lengths meet the standard ranges, each character of the VIN code is further segmented; otherwise, the VIN code is judged to be unqualified.

[0100] Identify each character of the segmented VIN code, combine them to obtain the VIN code, and compare the VIN code with the actual value of the VIN code. If the characters are the same as the actual value of the VIN code, it is determined that the character recognition is correct.

[0101] Based on a preset character feature library, the feature points of each character are extracted, the engraving depth and stroke width of each character are calculated, and the engraving depth and stroke width of each character are compared with the corresponding standard range. If the comparison results of each character are in line with the corresponding standard range, the VIN code is judged to be qualified.

[0102] Preferably, the robot is a six-axis robot; the robot can use a gripper or a pneumatic suction cup to grasp the detection device; the detection device includes but is not limited to a 3D camera and a laser that can emit linear structured light, which is not limited in the present invention.

[0103] The present invention also provides an electronic device, which may include: a processor, a communications interface, a memory, and a communications bus, wherein the processor, the communications interface, and the memory communicate with each other via the communications bus. The processor may call logic instructions in the memory to execute the above-mentioned vehicle VIN code detection method.

[0104] In addition, the logical instructions in the above-mentioned memory can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0105] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the vehicle VIN code detection method provided above.

[0106] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is configured to execute the above-mentioned vehicle VIN code detection method when executed by a processor.

[0107] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0108] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0109] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A vehicle VIN code detection method, characterized in that: Including steps: S1 scans the VIN code engraving area and obtains multiple surface topography characteristic curves; S2 generates a two-dimensional depth image of the corresponding area based on the surface topography characteristic curve; S3: obtaining the character height and total length of the VIN code based on the two-dimensional depth image, and comparing the character height and total length with corresponding standard ranges. If the height and total length meet the standard range, further segmenting each character of the VIN code; otherwise, judging the VIN code as unqualified. Identify each character of the segmented VIN code, combine them to obtain the VIN code, and compare the VIN code with the actual value of the VIN code. If the characters are the same as the actual value of the VIN code, it is determined that the character recognition is correct. S4 extracts the feature points of each character based on a preset character feature library, calculates the engraving depth and stroke width of each character, and compares the engraving depth and stroke width of each character with the corresponding standard range. If the comparison results of each character meet the corresponding standard range, the VIN code is judged to be qualified; Wherein, the step S3 includes: Establish a coordinate system on the two-dimensional depth image, with any corner point as the coordinate origin, the horizontal direction at the origin as the X-axis, and the vertical direction as the Y-axis; Binarize the two-dimensional depth image and project the characters onto the X-axis and Y-axis respectively, setting the positions where the projected characters exist to 1 and the remaining positions to 0; Get the leftmost and rightmost positions of the projected character in the X-axis direction, get the difference between the horizontal coordinates of the two end points, and get the total length of the character; Get the top and bottom positions of the projected character in the Y-axis direction, get the difference between the corresponding vertical coordinates of the two end points, and get the height of the character; Wherein, in said step S3, each character of the VIN code is segmented, specifically comprising the steps of: Based on the two-dimensional depth image after binarization, a plurality of jump points changing from 0 to 1 are obtained according to the projected characters on the X-axis; The original two-dimensional depth image is segmented at each of the jump points to obtain 17 separate characters.

2. A vehicle VIN code detection method according to claim 1, characterized in that: The step S1 comprises: The initial position and the end position of the scan are calibrated in the VIN code engraving area, and the VIN code engraving area from the initial position to the end position is scanned by a 3D camera to obtain the surface morphology characteristic curve.

3. A vehicle VIN code detection method according to claim 1, characterized in that: The step S3 comprises: After obtaining each individual character, it is compared with the standard characters of the VIN code to determine whether there are any defects in the strokes of each character; If there is a defect, the VIN code engraving is judged to be unqualified.

4. A vehicle VIN code detection method according to any one of claims 1 or 3, characterized in that: The step S4 comprises: Establish a corresponding character feature library based on all available characters in the VIN code; Extracting feature points for each individual character based on the character feature library and obtaining the coordinates of each feature point; Based on the resolution of the surface topography characteristic curve and the scanning rate of the surface topography characteristic curve, obtaining the surface topography characteristic curve corresponding to the coordinates of each feature point; The area with height jump on the surface topography characteristic curve is used as the character engraving area, and the engraving depth of the corresponding characteristic point is obtained; The distance between the two end points of the character engraving area is obtained, and the character stroke width corresponding to the feature point is obtained by angle conversion.

5. A vehicle VIN code detection method according to claim 4, characterized in that: The step S4 comprises: Calculate the average engraving depth and average character stroke width of all feature points detected in a single VIN code, and collect statistics on the changing trends of the average engraving depth and the average character stroke width; If the change trend of the average engraving depth and / or the average character stroke width is higher than a preset threshold, the VIN code is judged to be unqualified.

6. A vehicle VIN code detection device, characterized in that: Including robot, scanning module and analysis module: The scanning module is detachably mounted on the robot and is used to scan the VIN code engraving area to obtain the corresponding surface topography characteristic curve; The analysis module generates a two-dimensional depth image of the corresponding area based on the surface topography characteristic curve; The analysis module is further configured to obtain character heights and total lengths of the VIN code based on the two-dimensional depth image, and compare the character heights and total lengths with corresponding standard ranges. If the character heights and total lengths meet the standard ranges, each character of the VIN code is further segmented; otherwise, the VIN code is judged to be unqualified. Identify each character of the segmented VIN code, combine them to obtain the VIN code, and compare the VIN code with the actual value of the VIN code. If the characters are the same as the actual value of the VIN code, it is determined that the character recognition is correct. Based on a preset character feature library, feature points of each character are extracted, the engraving depth and stroke width of each character are calculated, and the engraving depth and stroke width of each character are compared with the corresponding standard range. If the comparison results of each character meet the corresponding standard range, the VIN code is judged to be qualified; Wherein, the analysis module is further used for: Establish a coordinate system on the two-dimensional depth image, with any corner point as the coordinate origin, the horizontal direction at the origin as the X-axis, and the vertical direction as the Y-axis; Binarize the two-dimensional depth image and project the characters onto the X-axis and Y-axis respectively, setting the positions where the projected characters exist to 1 and the remaining positions to 0; Get the leftmost and rightmost positions of the projected character in the X-axis direction, get the difference between the horizontal coordinates of the two end points, and get the total length of the character; Get the top and bottom positions of the projected character in the Y-axis direction, get the difference between the corresponding vertical coordinates of the two end points, and get the height of the character; The analysis module segments each character of the VIN code, specifically including the following steps: Based on the two-dimensional depth image after binarization, a plurality of jump points changing from 0 to 1 are obtained according to the projected characters on the X-axis; The original two-dimensional depth image is segmented at each of the jump points to obtain 17 separate characters.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.