Wire harness code scanning system for material detection
By designing a wire harness scanning system for material detection, using image recognition and clarity detection technology, the problem of existing systems failing to recognize when facing incorrect barcodes is solved, and higher recognition accuracy and management efficiency are achieved.
Patent Information
- Application Number
- CN202510062560.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-05-02
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When the existing wire harness scanning system faces the incorrect spraying of some barcodes, it cannot effectively adjust the scanning parameters, resulting in the recognition failure and the QR code information of the wire harness cannot be accurately identified.
A wire harness scanning system for material detection is designed, including a scanning recognition module, an image processing module, a decoding module, a database comparison module, a quality detection module and a processing output display module. The system recognizes the wire harness barcode through the image recognition unit, and uses the image definition detection unit to calculate the clarity of the barcode. If the standard is not met, it will be re-identified until the set number is reached, and the warning will be issued to the staff.
Through the clarity detection and image processing of the harness barcode, the system can effectively adjust the scanning parameters to improve the accuracy of recognition, avoid recognition failure, and improve the efficiency of harness management.
Smart Images

Figure CN119918557A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wire harness code scanning control, and in particular to a wire harness code scanning system for material detection. Background Art
[0002] New energy vehicles are developing rapidly. Compared with conventional automotive wires, new energy vehicle wiring harnesses have more parts and complex structures. Production information management is very important. Now a large number of wiring harnesses are managed through QR codes, so how to quickly scan the code has become an urgent problem to be solved. In the prior art CN 209168134 U, a wire harness scanning device is disclosed, including: a fixed wire clamp, a conveyor belt and a scanning gun; the scanning gun is fixed on a bracket, the conveyor belt is arranged below the scanning gun, and the fixed wire clamp is arranged on the conveyor belt. The above patent can realize the rapid scanning of the wire harness by conveying the fixed wire clamp with a conveyor belt, realizes the collection of the two-dimensional code information of the wire harness and is very efficient, but the prior art does not have a means to adjust and judge the recognition scanning, and when some barcodes are not properly attached and sprayed, the scanning fails and cannot be recognized. Summary of the invention
[0003] In view of the deficiencies in the prior art, the present invention provides a wire harness barcode scanning system for material detection, which has the advantages of adjusting the identified barcode and ensuring the accuracy of barcode scanning recognition, thereby solving the above-mentioned technical problems.
[0004] To achieve the above-mentioned object, the present invention provides the following technical solutions: a wire harness code scanning system for material detection, comprising a code scanning recognition module, an image processing module, a decoding module, a database comparison module, a quality detection module and a processing output display module; The barcode scanning and recognition module includes an image recognition unit and an image clarity detection unit. The image recognition unit is used to recognize and photograph the wire harness barcode. The image clarity detection unit is used to calculate the clarity of the currently photographed wire harness barcode and feed the calculation result back to the processing output display module. The processing output display module is used to receive the clarity of the code scanning recognition module for judgment, and judge whether re-recognition is required based on the result. If re-recognition is required, a signal is sent to the image processing module for re-recognition. When the number of re-recognitions reaches the upper limit, the processing output display module warns the staff. When re-recognition is not required, the image processing module is called; The image processing module includes a wire harness barcode positioning unit and a wire harness barcode adjustment unit. The wire harness barcode positioning unit is used to identify and locate the area where the barcode exists in the image captured by the scanning and recognition module. The wire harness barcode adjustment unit is used to adjust the barcode located by the wire harness barcode positioning unit and transmit it to the decoding module. The decoding module is used to decode the barcode, and after decoding is completed, the decoded data is sent to the database comparison module for comparison. If decoding cannot be performed, a signal that the decoding cannot be performed is sent to the processing output display module. The processing output display module is also used to warn the staff of the situation that the decoding module cannot decode. If decoding is successful, the decoded barcode data obtained by decoding is sent to the database comparison module; The database comparison module compares the barcode decoded data with the data in the database, and if the comparison results are inconsistent, sends inconsistent information to the processing output display module; The quality detection module performs comprehensive calculation based on the comparison results of the data of each wire harness in the identification process with the database, and gives the accuracy of the overall judgment, and sends the accuracy to the processing output display module.
[0005] As a preferred technical solution of the present invention, the specific expression for calculating the clarity of the currently photographed wire harness barcode by the image clarity detection unit is as follows:
[0006]
[0007] in, Indicates the calculated barcode clarity of the currently captured wire harness. Indicates contrast, Indicates edge clarity, represents the noise level, , , Represent three weight coefficients respectively, and .
[0008] As a preferred technical solution of the present invention, the processing output display module receives the clarity judgment result of the code scanning recognition module, and determines whether re-recognition is required according to the result. The specific steps are as follows: Step A1: Receive the barcode clarity of the currently captured wire harness , and determine the clarity of the currently photographed harness barcode Is it greater than the set clarity threshold? If it is greater than, the image processing module is called; if it is not greater than, step A2 is executed; Step A2: Read the barcode clarity of the currently captured wire harness Number of detections If the barcode resolution of the currently captured wiring harness is Number of detections Less than the detection threshold , then re-photograph the wire harness barcode, recalculate the definition and then execute step A1. If the definition of the currently photographed wire harness barcode is Number of detections Greater than or equal to the detection number threshold , the processing output display module will warn the staff.
[0009] As a preferred technical solution of the present invention, the specific positioning steps of the wire harness barcode positioning unit in the image processing module are as follows: Step B1: grayscale processing is performed on the image after the image recognition unit detects the clarity of the image by the image clarity detection unit; Step B2: Use the smallest rectangular frame to select all black parts in the image, and calculate the distance between two adjacent rectangular frames. If the distance between the two rectangular frames is less than the set standard barcode spacing distance, the two rectangular frames are merged into one until all rectangular frames are calculated; Step B3: Calculate a rectangular frame that meets the standard through a rectangular frame selection function, and send the selected portion to the wire harness barcode adjustment unit.
[0010] As a preferred technical solution of the present invention, the specific expression of the rectangular frame selection function is as follows:
[0011] in, Represents the rectangular box selection function, Represents the largest one among all the rectangular boxes. Indicates The area of the selected rectangle.
[0012] As a preferred technical solution of the present invention, the specific steps of the wire harness barcode adjustment unit adjusting the barcode positioned by the wire harness barcode positioning unit are as follows: Step C1: Calculate a rectangular frame that meets the standard based on the rectangular frame selection function to establish an XOY coordinate system corresponding to the direction of the code scanning device; Step C2: Calculate the coordinates of the three adjacent fixed points of the rectangular frame , , ; Step C3: Determine the reference edge of the rectangular frame; Step C4: Based on the reference edge determined in step C3, the deflection angle of the reference edge is calculated, and the barcode positioned by the wire harness barcode positioning unit is adjusted according to the deflection angle.
[0013] As a preferred technical solution of the present invention, the specific calculation expression for determining the reference side of the rectangular frame in step C3 is as follows:
[0014] in, , , Respectively represent the coordinates of the three adjacent fixed points of the rectangular box, It means to output the largest of the two expressions.
[0015] As a preferred technical solution of the present invention, the specific calculation expression for calculating the deflection angle of the reference edge in step C4 is as follows:
[0016] in, Indicates the deflection angle that needs to be adjusted in step C4, express The inverse tangent trigonometric function output value of Indicates the slope of the reference side in step C3.
[0017] As a preferred technical solution of the present invention, the database comparison module compares the barcode decoded data with the data in the database and outputs the specific expression as follows:
[0018] in, Indicates The barcode decoding data of the root harness is consistent with the data in the database. Indicates The barcode decoded data of the root harness does not match the data in the database.
[0019] As a preferred technical solution of the present invention, the quality detection module performs comprehensive calculation based on the comparison results of the data of each wire harness in the identification process with the database, and gives a specific expression of the accuracy of the overall judgment as follows:
[0020] in, Indicates a group of wiring harnesses The sum of the consistency of the root harness, Indicates accuracy, Indicates the total number of harnesses in one scan process.
[0021] Compared with the prior art, the present invention provides a wire harness scanning system for material detection, which has the following beneficial effects: The present invention uses a barcode scanning and recognition module to identify the photographed wiring harness barcode, then calculates the clarity of the currently photographed wiring harness barcode, and feeds back the calculation result to the processing output display module for judgment, and judges whether re-identification is needed based on the result. If re-identification is needed, a signal is sent to the image processing module for re-identification. When the number of re-identifications reaches an upper limit, the processing output display module warns the staff, thereby reminding the staff to clean the barcode scanning equipment or increase the brightness to ensure the clarity of the image shooting. Then, the barcode image is gray-processed, all black parts in the image are selected using the minimum rectangular frame, and the angle required for deflection is calculated, thereby ensuring the accuracy of recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a schematic diagram of the system framework of the present invention. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] See also Figure 1 , a wire harness scanning system for material detection, including a scanning recognition module, an image processing module, a decoding module, a database comparison module, a quality detection module and a processing output display module; The code scanning and recognition module includes an image recognition unit and an image clarity detection unit. The image recognition unit is used to recognize and shoot the wire harness barcode. The image clarity detection unit is used to calculate the clarity of the currently shot wire harness barcode and feed the calculation result back to the processing output display module. The specific expression for the image clarity detection unit to calculate the clarity of the currently shot wire harness barcode is as follows:
[0025]
[0026] in, Indicates the calculated barcode clarity of the currently captured wire harness. Indicates contrast, Indicates edge clarity, represents the noise level, , , Represent three weight coefficients respectively, and ; The processing output display module is used to receive the clarity of the code scanning and recognition module for judgment, and judge whether re-recognition is needed based on the result. If re-recognition is needed, a signal is sent to the image processing module for re-recognition. When the number of re-recognitions reaches the upper limit, the processing output display module warns the staff to remind them that they need to clean the code scanning equipment or increase the brightness to ensure the clarity of the image. When re-recognition is not needed, the image processing module is called. The processing output display module receives the clarity judgment result of the code scanning and recognition module, and judges whether re-recognition is needed based on the result. The specific steps are as follows: Step A1: Receive the barcode clarity of the currently captured wire harness , and determine the clarity of the currently photographed harness barcode Is it greater than the set clarity threshold? If it is greater than, the image processing module is called; if it is not greater than, step A2 is executed; Step A2: Read the barcode clarity of the currently captured wire harness Number of detections If the barcode resolution of the currently captured wiring harness is Number of detections Less than the detection threshold , then re-photograph the wire harness barcode, recalculate the definition and then execute step A1. If the definition of the currently photographed wire harness barcode is Number of detections Greater than or equal to the detection number threshold , the processing output display module will warn the staff; The image processing module includes a wire harness barcode positioning unit and a wire harness barcode adjustment unit. The wire harness barcode positioning unit is used to identify and locate the area where the barcode exists in the image captured by the scanning and recognition module. The wire harness barcode adjustment unit is used to adjust the barcode located by the wire harness barcode positioning unit and transmit it to the decoding module. The specific positioning steps of the wire harness barcode positioning unit in the image processing module are as follows: Step B1: grayscale processing is performed on the image after the image recognition unit detects the clarity of the image by the image clarity detection unit; Step B2: Use the minimum rectangular frame to select all black parts in the image. This process can be implemented in OpenCV. At the same time, the distance between two adjacent rectangular frames is calculated. If the distance between the two rectangular frames is less than the set standard barcode spacing distance, the two rectangular frames are merged into one until all the rectangular frames are calculated. Step B3: A rectangular frame that meets the standard is calculated by a rectangular frame selection function, and the selected portion is sent to the harness barcode adjustment unit. The specific expression of the rectangular frame selection function is as follows:
[0027] in, Represents the rectangular box selection function, Represents the largest one among all the rectangular boxes. Indicates The area of the rectangular box selected by the box; The specific steps for the wire harness barcode adjustment unit to adjust the barcode positioned by the wire harness barcode positioning unit are as follows: Step C1: Calculate a rectangular frame that meets the standard based on the rectangular frame selection function to establish an XOY coordinate system corresponding to the direction of the code scanning device; Step C2: Calculate the coordinates of the three adjacent fixed points of the rectangular frame , , ; Step C3: Determine the reference side of the rectangular frame. The specific calculation expression for determining the reference side of the rectangular frame in step C3 is as follows:
[0028] in, , , Respectively represent the coordinates of the three adjacent fixed points of the rectangular box, It means to output the largest of the two expressions; Step C4: Based on the reference edge determined in step C3, the deflection angle of the reference edge is calculated, and the barcode positioned by the wire harness barcode positioning unit is adjusted according to the deflection angle. The specific calculation expression for calculating the deflection angle of the reference edge in step C4 is as follows:
[0029] in, Indicates the deflection angle that needs to be adjusted in step C4, express The inverse tangent trigonometric function output value of represents the slope of the reference side in step C3; The decoding module is used to decode the barcode, and after decoding is completed, the decoded data is sent to the database comparison module for comparison. If decoding cannot be performed, the signal that the decoding cannot be performed is sent to the processing output display module. The processing output display module is also used to warn the staff of the situation that the decoding module cannot decode. If decoding is successful, the decoded barcode data obtained by decoding is sent to the database comparison module; The database comparison module compares the barcode decoded data with the data in the database. If the comparison results are inconsistent, the inconsistent information is sent to the processing output display module. The specific expression of the comparison output of the database comparison module based on the barcode decoded data and the data in the database is as follows:
[0030] in, Indicates The barcode decoding data of the root harness is consistent with the data in the database. Indicates The barcode decoded data of the root harness is inconsistent with the data in the database; The quality detection module performs comprehensive calculations based on the comparison results of the data of each wire harness in the identification process with the database, and gives the accuracy of the overall judgment, and sends the accuracy to the processing output display module. The quality detection module performs comprehensive calculations based on the comparison results of the data of each wire harness in the identification process with the database, and gives the specific expression of the accuracy of the overall judgment as follows:
[0031] in, Indicates a group of wiring harnesses The sum of the consistency of the root harness, Indicates accuracy, Indicates the total number of harnesses in one scan process.
[0032] Embodiment 1: As an embodiment of the present invention, the image definition detection unit calculates the definition of the currently photographed wire harness barcode. , ,and =0.4, =0.5, =0.1, then 0.65> , call the image processing module; The wire harness barcode adjustment unit calculates the coordinates of three adjacent fixed points in the rectangular frame , , ; at this time , ; then ; Need to rotate Align the barcode; Embodiment 2: As an embodiment of the present invention, the image definition detection unit calculates the definition of the currently photographed wire harness barcode. , ,and =0.4, =0.5, =0.1, then 0.53< , and the clarity of the harness barcode currently being recognized and photographed Number of detections Detection times threshold At this time, the processing output display module warns the staff.
[0033] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A wire harness scanning system for material detection, characterized in that: It includes code scanning and recognition module, image processing module, decoding module, database comparison module, quality inspection module and processing output display module; The barcode scanning and recognition module includes an image recognition unit and an image clarity detection unit. The image recognition unit is used to recognize and photograph the wire harness barcode. The image clarity detection unit is used to calculate the clarity of the currently photographed wire harness barcode and feed the calculation result back to the processing output display module. The processing output display module is used to receive the clarity of the code scanning recognition module for judgment, and judge whether re-recognition is required based on the result. If re-recognition is required, a signal is sent to the image processing module for re-recognition. When the number of re-recognitions reaches the upper limit, the processing output display module warns the staff. When re-recognition is not required, the image processing module is called; The image processing module includes a wire harness barcode positioning unit and a wire harness barcode adjustment unit. The wire harness barcode positioning unit is used to identify and locate the area where the barcode exists in the image captured by the scanning and recognition module. The wire harness barcode adjustment unit is used to adjust the barcode located by the wire harness barcode positioning unit and transmit it to the decoding module. The decoding module is used to decode the barcode, and after decoding is completed, the decoded data is sent to the database comparison module for comparison. If decoding cannot be performed, a signal that the decoding cannot be performed is sent to the processing output display module. The processing output display module is also used to warn the staff of the situation that the decoding module cannot decode. If decoding is successful, the decoded barcode data obtained by decoding is sent to the database comparison module; The database comparison module compares the barcode decoded data with the data in the database, and if the comparison results are inconsistent, sends inconsistent information to the processing output display module; The quality detection module performs comprehensive calculation based on the comparison results of the data of each wire harness in the identification process with the database, and gives the accuracy of the overall judgment, and sends the accuracy to the processing output display module.
2. According to claim 1, a wire harness scanning system for material detection is characterized in that: The specific expression for calculating the clarity of the currently photographed wire harness barcode by the image clarity detection unit is as follows: in, Indicates the calculated barcode clarity of the currently captured wire harness. Indicates contrast, Indicates edge clarity, represents the noise level, , , Represent three weight coefficients respectively, and .
3. The wire harness scanning system for material detection according to claim 2, characterized in that: The specific steps of the processing output display module receiving the clarity judgment result of the code scanning recognition module and judging whether re-recognition is required according to the result are as follows: Step A1: Receive the barcode clarity of the currently captured wire harness , and determine the clarity of the currently photographed harness barcode Is it greater than the set clarity threshold? If it is greater than, the image processing module is called; if it is not greater than, step A2 is executed; Step A2: Read the barcode clarity of the currently captured wire harness Number of detections If the barcode resolution of the currently captured wire harness is Number of detections Less than the detection threshold , then re-photograph the wire harness barcode, recalculate the definition and then execute step A1. If the definition of the currently photographed wire harness barcode is Number of detections Greater than or equal to the detection number threshold , the processing output display module will warn the staff.
4. The wire harness scanning system for material detection according to claim 1, characterized in that: The specific positioning steps of the wire harness barcode positioning unit in the image processing module are as follows: Step B1: grayscale processing is performed on the image after the image recognition unit detects the clarity of the image by the image clarity detection unit; Step B2: Use the smallest rectangular frame to select all black parts in the image, and calculate the distance between two adjacent rectangular frames. If the distance between the two rectangular frames is less than the set standard barcode spacing distance, the two rectangular frames are merged into one until all rectangular frames are calculated; Step B3: Calculate a rectangular frame that meets the standard through a rectangular frame selection function, and send the selected portion to the wire harness barcode adjustment unit.
5. The wire harness scanning system for material detection according to claim 4, characterized in that: The specific expression of the rectangular frame selection function is as follows: in, Represents the rectangular box selection function, Represents the largest one among all the rectangular boxes. Indicates The area of the selected rectangle.
6. The wire harness scanning system for material detection according to claim 4, characterized in that: The specific steps of the wire harness barcode adjustment unit adjusting the barcode positioned by the wire harness barcode positioning unit are as follows: Step C1: Calculate a rectangular frame that meets the standard based on the rectangular frame selection function to establish an XOY coordinate system corresponding to the direction of the code scanning device; Step C2: Calculate the coordinates of the three adjacent fixed points of the rectangular frame , , ; Step C3: Determine the reference edge of the rectangular frame; Step C4: Based on the reference edge determined in step C3, the deflection angle of the reference edge is calculated, and the barcode positioned by the wire harness barcode positioning unit is adjusted according to the deflection angle.
7. The wire harness scanning system for material detection according to claim 6, characterized in that: The specific calculation expression for determining the reference side of the rectangular frame in step C3 is as follows: in, , , Respectively represent the coordinates of the three adjacent fixed points of the rectangular box, It means to output the largest of the two expressions.
8. The wire harness scanning system for material detection according to claim 7, characterized in that: The specific calculation expression for calculating the deflection angle of the reference side in step C4 is as follows: in, Indicates the deflection angle that needs to be adjusted in step C4, express The inverse tangent trigonometric function output value of Indicates the slope of the reference side in step C3.
9. The wire harness scanning system for material detection according to claim 1, characterized in that: The specific expression output by the database comparison module based on the comparison between the barcode decoded data and the data in the database is as follows: in, Indicates The barcode decoding data of the root harness is consistent with the data in the database. Indicates The barcode decoded data of the root harness does not match the data in the database.
10. The wire harness scanning system for material detection according to claim 1, characterized in that: The quality detection module performs comprehensive calculation based on the comparison results of the data of each wire harness in the identification process with the database, and gives a specific expression of the accuracy of the overall judgment as follows: in, Indicates a group of wiring harnesses The sum of the consistency of the root harness, Indicates the accuracy, Indicates the total number of harnesses in one scan process.
Citation Information
Patent Citations
Wire harness code scanning device
CN209168134U