A method and device for line sequence recognition based on image processing
Through the image processing-based method, the wire sequence of the equipment connectors and wires is identified and checked, and the problem of low efficiency and accuracy in the prior art is solved, and efficient and flexible wire sequence recognition and quality inspection are achieved.
Patent Information
- Application Number
- CN202110937291.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-16
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2041-08-16
AI Technical Summary
In the prior art, the efficiency and accuracy of line sequence identification and quality inspection are low, and the automation solutions are costly and inflexible.
Using an image processing-based method, images of the connectors and wires of the device are collected by the camera, ROI areas are extracted, image processing is performed to extract digital features, and compared with the pre-stored digital feature template to identify the line sequence.
It improves the accuracy and efficiency of line sequence recognition, reduces hardware costs, and flexibly adapts to the diversity of various equipment connectors and wires.
Smart Images

Figure CN113627431B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial automation, and particularly to a wire sequence recognition method, device, computer device, and computer-readable storage medium based on image processing. Background Art
[0002] At present, in actual hardware industrial production, there are mainly two methods for assembling various device connectors and wires. Method 1: a fully manual method, using manual labor for the installation and error checking of connector wires. Method 2: fully automated installation and error checking of connector wires. Method 1 involves completely using manual labor. The assembler installs the connector wires, and then the quality inspector conducts inspections. Method 2 uses a fully automated method, where the wires are installed by automated machines and then quality inspections are carried out through automated tools such as cameras in conjunction with computer software. In the method of wire sequence recognition and quality inspection, Method 1, due to the complete use of manual labor and visual inspection, has a high error probability, workers are prone to fatigue, and the efficiency is low. Method 2 uses a fully automated method, relying on a complete automated production line and various expensive automated machines, which requires a large cost investment. Moreover, a single automated machine is difficult to handle the diversity and rapid changes of various device connectors and wires, which is less flexible than the manual method.
[0003] Currently, in view of the problems of low efficiency and accuracy in wire sequence recognition and quality inspection in the related art, no effective solution has been proposed. Summary of the Invention
[0004] The purpose of this application is to provide a wire sequence recognition method, device, computer device, and computer-readable storage medium based on image processing for at least solving the problems of low efficiency and accuracy in wire sequence recognition and quality inspection in the related art.
[0005] To achieve the above purpose, the technical solutions adopted in this application are as follows:
[0006] In the first aspect, an embodiment of this application provides a wire sequence recognition method based on image processing, including:
[0007] Determine the target model of the device connector to be recognized;
[0008] Obtain the target image collected by the camera, where the device connector of the target model is placed on the LED parallel light bottom plate after being assembled with the wire, and the camera is directly above the LED parallel light bottom plate;
[0009] Extract the ROI region from the target image, and perform image processing on the ROI region to extract the target digital features;
[0010] Compare the target digital feature with the pre-stored digital feature template corresponding to the device connector of the target model;
[0011] Identify the wire sequence of the device connector of the target model according to the comparison result.
[0012] In some embodiments, before determining the target model of the device connector to be identified, the method further includes:
[0013] Perform the following operations on the device connectors of each model, where the first model is one of each model:
[0014] Place the device connector of the first model with the correct wire sequence on the LED parallel light bottom plate;
[0015] Obtain the template image collected by the camera;
[0016] Select at least one ROI region from the template image;
[0017] Perform image processing on each ROI region respectively, and extract digital features;
[0018] Store the at least one extracted digital feature as the digital feature template corresponding to the device connector of the first model.
[0019] In some embodiments, performing image processing on the ROI region and extracting the target digital feature includes:
[0020] Take the ROI region as the processing source, perform image smoothing and noise reduction processing; wire tilt correction processing; wire segmentation and quantity statistics processing; then convert the image to the Hsv color space and the His color space; calibrate the effective pixel value using the mean and variance of the pixels; then perform normalization processing; then perform pixel histogram statistics, and use the statistical result as the target digital feature.
[0021] In some embodiments, identifying the wire sequence of the device connector of the target model according to the comparison result includes:
[0022] If the matching degree between the target digital feature and the digital feature template is lower than the target threshold, it is determined that the wire sequence of the device connector of the target model is incorrect.
[0023] In some embodiments, after determining that the wire sequence of the device connector of the target model is incorrect, the method further includes:
[0024] If the sorting of the wrongly connected wires is determined, a voice reminder is given.
[0025] Second aspect, embodiments of the present application provide a line sequence recognition device based on image processing, including:
[0026] A determination unit, configured to determine the target model of the device connector to be recognized;
[0027] An acquisition unit, configured to acquire a target image collected by a camera. After the device connector of the target model is assembled with the wire, it is placed on an LED parallel light bottom plate, and the camera is directly above the LED parallel light bottom plate;
[0028] An extraction unit, configured to extract an ROI region from the target image, perform image processing on the ROI region, and extract target digital features;
[0029] A comparison unit, configured to compare the target digital features with a pre-stored digital feature template corresponding to the device connector of the target model;
[0030] An identification unit, configured to identify the line sequence of the device connector of the target model according to the comparison result.
[0031] In some embodiments, the device further includes:
[0032] An execution unit, configured to perform the following operations on the device connector of each model before determining the target model of the device connector to be recognized, where the first model is one of the each model:
[0033] Place the device connector of the first model with the correct line sequence on the LED parallel light bottom plate;
[0034] Acquire a template image collected by the camera;
[0035] Select at least one ROI region from the template image;
[0036] Perform image processing on each ROI region respectively, and extract digital features;
[0037] Store the at least one extracted digital feature as the digital feature template corresponding to the device connector of the first model.
[0038] In some embodiments, the extraction unit includes:
[0039] A processing module, configured to use the ROI region as a processing source to perform image smoothing and noise reduction processing; wire inclination correction processing; wire segmentation and quantity statistics processing; then convert the image to the Hsv color space and the His color space; calibrate the effective pixel value using the mean and variance of the pixels; then perform normalization processing; then perform pixel histogram statistics, and use the statistical result as the target digital feature.
[0040] In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the method for identifying wire sequences based on image processing described in the first aspect above is implemented.
[0041] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method for identifying wire sequences based on image processing described in the first aspect above is implemented.
[0042] The present application adopts the above technical solutions. Compared with the prior art, the method for identifying wire sequences based on image processing provided by the embodiment of the present application determines the target model of the device connector to be identified; acquires a target image collected by a camera, wherein after the device connector of the target model is assembled with the wire, it is placed on an LED parallel light bottom plate, and the camera is directly above the LED parallel light bottom plate; extracts the ROI region from the target image, performs image processing on the ROI region, and extracts target digital features; compares the target digital features with a pre-stored digital feature template corresponding to the device connector of the target model; and identifies the wire sequence of the device connector of the target model according to the comparison result, solving the problems of low efficiency and accuracy in wire sequence identification and quality inspection in the related art, and achieving the technical effect of improving the accuracy and efficiency of wire sequence identification.
[0043] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more concise and understandable. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The drawings described herein are used to provide a further understanding of the present application and form a part of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:
[0045] Figure 1 is a structural block diagram of a mobile terminal according to an embodiment of the present application;
[0046] Figure 2 is a flowchart of a method for identifying wire sequences based on image processing according to an embodiment of the present application;
[0047] Figure 3 is a schematic diagram of an arrangement process of wire sequence identification and quality inspection according to a preferred embodiment of the present application;
[0048] Figure 4 is a structural block diagram of a device for identifying wire sequences based on image processing according to an embodiment of the present application;
[0049] Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present application. Detailed implementation manners
[0050] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be described and explained below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments provided in the present application without creative efforts belong to the scope of protection of the present application.
[0051] Obviously, the accompanying drawings in the following description are only some examples or embodiments of the present application. For those of ordinary skill in the art, without creative efforts, the present application can also be applied to other similar scenarios based on these drawings. In addition, it can also be understood that although the efforts made in such a development process may be complex and lengthy, for those of ordinary skill in the art related to the content disclosed in the present application, some design, manufacturing or production changes made based on the technical content disclosed in the present application are only conventional technical means and should not be understood as the content disclosed in the present application being insufficient.
[0052] Referring to "embodiments" in the present application means that specific features, structures or characteristics described in connection with the embodiments can be included in at least one embodiment of the present application. The phrase appears in various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those of ordinary skill in the art explicitly and implicitly understand that the embodiments described in the present application can be combined with other embodiments without conflict.
[0053] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the ordinary meanings understood by those with ordinary skills in the technical field to which this application belongs. The words such as "a", "an", "one kind", "the" and the like involved in this application do not indicate a quantity limitation and may represent a singular or plural number. The terms "include", "comprise", "have" and any variations thereof involved in this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or modules (units) is not limited to the listed steps or units, but may further include unlisted steps or units, or may further include other steps or units inherent to these processes, methods, products or devices. The similar words such as "connect", "be connected", "couple" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "plurality" involved in this application means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, "A and / or B" may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the front and rear associated objects. The terms "first", "second", "third" and the like involved in this application are only used to distinguish similar objects and do not represent a specific order for the objects.
[0054] This embodiment provides a mobile terminal. Figure 1 It is a structural block diagram of the mobile terminal according to the embodiment of the present application. As Figure 1 shown, the mobile terminal includes: a radio frequency (RF) circuit 110, a memory 120, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a wireless fidelity (WiFi) module 170, a processor 180, and a power supply 190 and other components. Those skilled in the art can understand that Figure 1 the mobile terminal structure shown in
[0055] does not constitute a limitation to the mobile terminal and may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements. Figure 1 The following specifically introduces each component of the mobile terminal:
[0056] The RF circuit 110 can be used for receiving and transmitting information or signals during communication. Specifically, after receiving the downlink information from the base station, it is sent to the processor 180 for processing. Additionally, the uplink data is sent to the base station. Generally, the RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. Moreover, the RF circuit 110 can also communicate with the network and other devices via wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to the Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
[0057] The memory 120 can be used to store software programs and modules. The processor 180 executes various functional applications and data processing of the mobile terminal by running the software programs and modules stored in the memory 120. The memory 120 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile terminal (such as audio data, a phone book, etc.). In addition, the memory 120 can include a high-speed random access memory and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
[0058] The input unit 130 can be used to receive input numeric or character information and generate key signal inputs related to the user settings and function control of the mobile terminal. Specifically, the input unit 130 can include a touch panel 131 and other input devices 132. The touch panel 131, also known as a touch screen, can collect touch operations of the user on or near it (such as operations of the user using a finger, a stylus, or any suitable object or accessory on or near the touch panel 131), and drive corresponding connection devices according to a pre-set program. Optionally, the touch panel 131 can include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch position of the user and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 180, and can receive and execute the commands sent by the processor 180. In addition, various types such as resistive, capacitive, infrared, and surface acoustic wave can be used to implement the touch panel 131. In addition to the touch panel 131, the input unit 130 can also include other input devices 132. Specifically, the other input devices 132 can include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power on / off keys, etc.), a trackball, a mouse, a joystick, etc.
[0059] The display unit 140 can be used to display the information input by the user or the information provided to the user and various menus of the mobile terminal. The display unit 140 can include a display panel 141. Optionally, the display panel 141 can be configured in the form of a liquid crystal display (LCD for short), an organic light-emitting diode (OLED for short), etc. Further, the touch panel 131 can cover the display panel 141. When the touch panel 131 detects a touch operation on or near it, it transmits it to the processor 180 to determine the type of touch event. Subsequently, the processor 180 provides corresponding visual output on the display panel 141 according to the type of touch event. Although in Figure 1 it, the touch panel 131 and the display panel 141 are implemented as two independent components to realize the input and input functions of the mobile terminal, but in some embodiments, the touch panel 131 and the display panel 141 can be integrated to realize the input and output functions of the mobile terminal.
[0060] The mobile terminal may further include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. Among them, the ambient light sensor may adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 141 and / or the backlight when the mobile terminal is moved to the ear. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, and can be used for applications that identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors that the mobile terminal can also be configured with, they will not be elaborated here.
[0061] The speaker 161 and the microphone 162 in the audio circuit 160 can provide an audio interface between the user and the mobile terminal. The audio circuit 160 can transmit the electrical signal converted from the received audio data to the speaker 161, and the speaker 161 converts it into a sound signal for output; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 160 and then converted into audio data. After the audio data is output to the processor 180 for processing, it is sent through the RF circuit 110 to, for example, another mobile terminal, or the audio data is output to the memory 120 for further processing.
[0062] WiFi belongs to short - range wireless transmission technology. The mobile terminal can help users send and receive emails, browse the web, and access streaming media through the WiFi module 170, which provides users with wireless broadband Internet access. Although Figure 1 the WiFi module 170 is shown, it can be understood that it does not belong to an essential component of the mobile terminal and can be completely omitted within the scope of not changing the essence of the invention according to needs, or replaced with other short - range wireless transmission modules, such as Zigbee modules, or WAPI modules, etc.
[0063] The processor 180 is the control center of the mobile terminal, connecting various parts of the entire mobile terminal through various interfaces and lines. By running or executing software programs and / or modules stored in the memory 120, and calling data stored in the memory 120, it executes various functions of the mobile terminal and processes data, thereby monitoring the mobile terminal as a whole. Optionally, the processor 180 may include one or more processing units; preferably, the processor 180 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above - mentioned modem processor may not be integrated into the processor 180 either.
[0064] The mobile terminal further includes a power source 190 (such as a battery) for supplying power to each component. Preferably, the power source can be logically connected to the processor 180 through a power management system, so as to manage functions such as charging, discharging, and power consumption management through the power management system.
[0065] Although not shown, the mobile terminal may further include a camera, a Bluetooth module, etc., which will not be elaborated here.
[0066] In this embodiment, the processor 180 is configured to: determine the target model of the device connector to be identified; obtain a target image captured by the camera, wherein the device connector of the target model is assembled with a wire and then placed on an LED parallel light bottom plate, and the camera is directly above the LED parallel light bottom plate; extract an ROI region from the target image, and perform image processing on the ROI region to extract target digital features; compare the target digital features with a pre-stored digital feature template corresponding to the device connector of the target model; and identify the wire sequence of the device connector of the target model according to the comparison result.
[0067] In some of these embodiments, the processor 180 is further configured to: before determining the target model of the device connector to be identified, perform the following operations on each model of device connector, where the first model is one of each model: place the device connector of the first model with the correct wire sequence on the LED parallel light bottom plate; obtain a template image captured by the camera; select at least one ROI region from the template image; perform image processing on each ROI region respectively to extract digital features; and store the at least one extracted digital feature as the digital feature template corresponding to the device connector of the first model.
[0068] In some of these embodiments, the processor 180 is further configured to: use the ROI region as a processing source to perform image smoothing and noise reduction processing; wire tilt correction processing; wire segmentation and quantity statistics processing; then convert the image to the Hsv color space and the His color space; calibrate the effective pixel values using the mean and variance of the pixels; then perform normalization processing; then perform pixel histogram statistics, and use the statistical result as the target digital feature.
[0069] In some of these embodiments, the processor 180 is further configured to: if the matching degree between the target digital features and the digital feature template is lower than a target threshold, determine that the wire sequence of the device connector of the target model is incorrect.
[0070] In some of these embodiments, the processor 180 is further configured to: if the sorting of the wrongly connected wires is determined, give a voice reminder.
[0071] This embodiment provides a wire sequence recognition method based on image processing. Figure 2 It is a flowchart of the wire sequence recognition method based on image processing according to an embodiment of the present application, as Figure 2 shown, and this process includes the following steps:
[0072] Step S201, determine the target model of the device connector to be recognized;
[0073] Step S202, obtain the target image collected by the camera. Among them, after the device connector of the target model is assembled with the wire, it is placed on the LED parallel light bottom plate, and the camera is directly above the LED parallel light bottom plate;
[0074] Step S203, extract the ROI region from the target image, and perform image processing on the ROI region to extract the target digital features;
[0075] Step S204, compare the target digital features with the pre-stored digital feature template corresponding to the device connector of the target model;
[0076] Step S205, recognize the wire sequence of the device connector of the target model according to the comparison result.
[0077] Through the above steps, by determining the target model of the device connector to be recognized; obtaining the target image collected by the camera. Among them, after the device connector of the target model is assembled with the wire, it is placed on the LED parallel light bottom plate, and the camera is directly above the LED parallel light bottom plate; extracting the ROI region from the target image, and performing image processing on the ROI region to extract the target digital features; comparing the target digital features with the pre-stored digital feature template corresponding to the device connector of the target model; recognizing the wire sequence of the device connector of the target model according to the comparison result, the problems of low efficiency and accuracy in wire sequence recognition and quality inspection in the related art are solved, and the technical effect of improving the accuracy and efficiency of wire sequence recognition is achieved.
[0078] In some of these embodiments, before determining the target model of the device connector to be recognized, the method further includes:
[0079] Perform the following operations on each model of device connector, where the first model is one of each model:
[0080] Place the device connector of the first model with the correct wire sequence on the LED parallel light bottom plate;
[0081] Obtain the template image collected by the camera;
[0082] Select at least one ROI region from the template image;
[0083] Perform image processing on each ROI region respectively to extract digital features;
[0084] Store the at least one extracted digital feature as the digital feature template corresponding to the device connector of the first model.
[0085] In some embodiments, performing image processing on the ROI region to extract target digital features includes:
[0086] Taking the ROI region as the processing source, performing image smoothing and noise reduction processing; wire tilt correction processing; wire segmentation and quantity statistics processing; then converting the image to the Hsv color space and the His color space; calibrating the effective pixel values using the mean and variance of the pixels; then performing normalization processing; then performing pixel histogram statistics, and taking the statistical result as the target digital feature.
[0087] In some embodiments, identifying the wire sequence of the device connector of the target model according to the comparison result includes:
[0088] If the matching degree between the target digital feature and the digital feature template is lower than the target threshold, it is determined that the wire sequence of the device connector of the target model is incorrect.
[0089] In some embodiments, after determining that the wire sequence of the device connector of the target model is incorrect, the method further includes:
[0090] If the sorting of the wrongly connected wires is determined and a voice reminder is given.
[0091] This application helps workers to perform quality inspection, error correction and correction on the wire sequence after the installation of various device connector wires through an image recognition method. This application can be applied to industrial automation production.
[0092] The concepts involved in this application are:
[0093] 1) Image processing: Here it specifically refers to digital image processing, which is a method and technology for processing images by a computer to remove noise, enhance, restore, segment, extract features, etc.
[0094] 2) Industrial automation: It is a trend in industrial production to widely adopt automatic control and automatic adjustment devices to replace manual operation of machines and machine systems for processing production.
[0095] 3) Wire sequence: Here it specifically refers to the sequence of connecting wires of various device connectors.
[0096] This application solves the problems of high error rate and low efficiency caused by manual methods through image recognition processing. It solves the problems of high cost investment and inflexibility caused by using automated machines through the way of computer software implementation and manual cooperation.
[0097] A wire sequence recognition method and software based on image processing provided by this application include six parts: image acquisition, ROI region extraction, model template generation, feature extraction, recognition correction, and quality inspection statistics.
[0098] In image acquisition, the connector and the wire are placed on the LED parallel light bottom plate, and the camera used to collect the image is directly above the bottom plate. The software in this application can be connected to the camera to obtain image data for recognition processing.
[0099] In ROI region extraction, there are two uses. One is to manually select the ROI region for model template learning before automated recognition; the other is to automatically select the ROI region for recognition during automated recognition.
[0100] In model template generation, various types of device connectors can be added, and multiple templates can be learned for each type. The more templates, the higher the subsequent recognition rate.
[0101] In feature extraction, the ROI region is used as the processing source, mainly for preprocessing such as image noise reduction, wire tilt correction, wire segmentation and quantity statistics. Then the image is converted to the Hsv color space and the His color space, and the effective pixel values are calibrated using the mean and variance of the pixels. Subsequently, image normalization processing and histogram statistics are performed as the digital features of the image. Finally, the digital features are stored in the database.
[0102] In recognition correction, first select the wire type, then place the connector and the wire on the LED parallel light bottom plate. The software of this application will automatically extract the ROI region based on the position of the wire in the image, and then calculate the features of this ROI region (the method is the same as the previous paragraph). Then, the features are compared with the features in the database (using the histogram comparison algorithm). If it is found that the matching rate of some wires is less than 90%, it is considered that the wires are connected incorrectly. The wires are set in order from C1 to CN (N is the number of wires), and voice reminders are given, such as: no error, C3 is incorrect, C5 is incorrect, etc.
[0103] In quality inspection statistics, the software of this application will automatically count the comparison quantity and the error quantity of this batch and give the statistical data.
[0104] The key technical points in this application include:
[0105] 1) Using the method of software image recognition to improve the efficiency and error rate of workers.
[0106] 2) In terms of hardware, only an LED parallel light bottom plate, a camera, and a computer are required, with low costs.
[0107] 3) Using the LED parallel light bottom plate facilitates the segmentation of wire segments, improves the accuracy of feature extraction, and enhances the recognition rate.
[0108] 4) Before use, multiple models can be set, which is convenient and flexible. Multiple sets of template learning can be performed for each model to ensure the accuracy of the extracted features.
[0109] 5) During use, the ROI area is automatically recognized, which is convenient and fast.
[0110] 6) The feature extraction algorithm uses the Hsv and His color spaces, reducing the influence of ambient light and effectively extracting the pixel values of the wire itself.
[0111] 7) The feature extraction algorithm calibrates the effective pixels using the mean and variance, which can remove the too-high and too-low pixel values and improve the accuracy of the features.
[0112] 8) In feature extraction and recognition, the histogram statistics method is used, which is convenient for storage and comparison.
[0113] This application is a wire sequence recognition and quality inspection method based on image processing, which acquires images through a camera and uses computer software for recognition and quality inspection.
[0114] The specific steps are as follows:
[0115] 1. Create a model according to the device connectors to be detected.
[0116] 2. Place the connector with the correct wire sequence corresponding to the model on the LED light bottom plate.
[0117] 3. Manually select the ROI area.
[0118] 4. Add this area as a template for this model.
[0119] 5. Repeat steps 3 to 4 ten times, that is, add ten templates for this model. The present invention will automatically extract the features of each template and save them to the database.
[0120] 6. Repeat steps 1 to 5 until all models are added.
[0121] 7. When the assembler uses the software of this application, first set the model currently being assembled.
[0122] 8. After assembly, place the connector on the LED light bottom plate.
[0123] 9. If there is an error voice prompt, correct it according to the voice prompt.
[0124] 10. Repeat steps 8 to 9 to complete the assembly of this batch of this model.
[0125] 11. The assembler delivers the connectors to the quality inspector for quality inspection.
[0126] 12. When using the software of this application, the quality inspector first sets the model currently being assembled and resets the statistical result to 0.
[0127] 13. The quality inspector places the connector on the LED light bottom plate.
[0128] 14. The connectors can be classified and placed according to the error voice prompt (classified by error and correct).
[0129] 15. Repeat steps 13 to 14 until the quality inspection of this batch is completed.
[0130] 16. View the quality inspection result of this time in the software of this application.
[0131] As Figure 3 shown, the embodiment of this application provides a wire sequence recognition method based on image processing. Here, a specific example is a wire sequence recognition method and software for a connector of model X140s. The specific process can be described as follows:
[0132] 1) Create a model named "X140s".
[0133] 2) Place the connector with the correct wire sequence of model X140s on the LED light bottom plate.
[0134] 3) Manually select the ROI area in the software camera image display area and add this area as a template. Repeat 10 times to add 10 templates for model x140s. The software automatically extracts the features of these 10 templates and saves them to the mysql database.
[0135] 4) When the assembler uses it, first select the model to be assembled this time as X140s on the software.
[0136] 5) After the assembler assembles the connectors and wires of this batch, place the connectors on the LED light bottom plate one by one.
[0137] 6) The software will detect the current wire sequence of the connector in real time. Specifically, it first automatically selects the ROI area, calculates the feature value of the ROI area, then compares it with the template feature value of model X140s in the database, and gives a voice prompt for the comparison result.
[0138] 7) The assembler listens to the software voice prompt. If there is no error, check the next one.
[0139] 8) If the voice prompt has an error, correct the corresponding wire sequence according to the voice prompt.
[0140] 9) After the assembler has checked and corrected, it is handed over to the quality inspector for quality inspection. The quality inspection method is similar to that used by the assembler.
[0141] 10) Finally, after the quality inspector has checked the assembled connectors in this batch, view the quality inspection statistical results of the software.
[0142] A method and device for wire sequence recognition based on image processing provided by the present application bring the following beneficial effects:
[0143] 1) The method replaces visual recognition with software image recognition, and both the assembler and the quality inspector can use the software of the present invention, greatly improving the work quality and efficiency.
[0144] 2) The present application can be realized with only very small hardware costs.
[0145] 3) Compared with fully automated scenarios, it is more flexible and variable, and is suitable for the wire sequence detection of more devices.
[0146] 4) Multiple technologies are used in the image recognition algorithm to ensure the recognition rate and accuracy.
[0147] The improved parts of the present application are as follows:
[0148] 1) Convenient and fast: Use image recognition to replace visual recognition.
[0149] 2) Flexible and variable, supporting multiple models of connectors: As long as it can be placed on the bottom plate, set the model and template once, and it can be placed on the bottom plate during use for real-time detection.
[0150] 3) Low cost: Use the form of manual cooperation with software. Only an LED light bottom plate, a camera, and a computer are required for the hardware.
[0151] 4) The algorithm is accurate and has multiple guarantees.
[0152] It should be noted that the steps shown in the above process or the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0153] This embodiment provides an apparatus for identifying wire sequences based on image processing. This apparatus is used to implement the above-mentioned embodiments and preferred implementation manners, and those that have been described will not be repeated here. As used hereinafter, terms such as "module", "unit", "sub-unit", etc. may be a combination of software and / or hardware that can achieve a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0154] Figure 4 is a structural block diagram of an apparatus for identifying wire sequences based on image processing according to an embodiment of the present application. As Figure 4 shown, the apparatus includes:
[0155] A determination unit 41, configured to determine a target model of a device connector to be identified;
[0156] An acquisition unit 42, configured to acquire a target image collected by a camera. After the device connector of the target model is assembled with wires, it is placed on an LED parallel light bottom plate, and the camera is directly above the LED parallel light bottom plate;
[0157] An extraction unit 43, configured to extract an ROI region from the target image, perform image processing on the ROI region, and extract target digital features;
[0158] A comparison unit 44, configured to compare the target digital features with a pre-stored digital feature template corresponding to the device connector of the target model;
[0159] An identification unit 45, configured to identify the wire sequence of the device connector of the target model according to the comparison result.
[0160] In some embodiments, the apparatus further includes:
[0161] An execution unit, configured to perform the following operations on each model of device connector before determining the target model of the device connector to be identified, where the first model is one of each model:
[0162] Place the device connector of the first model with the correct wire sequence on the LED parallel light bottom plate;
[0163] Acquire a template image collected by the camera;
[0164] Select at least one ROI region from the template image;
[0165] Perform image processing on each ROI region respectively, and extract digital features;
[0166] Store at least one extracted digital feature as the digital feature template corresponding to the device connector of the first model.
[0167] In some embodiments, the extraction unit 43 includes:
[0168] A processing module, which uses the ROI region as a processing source to perform image smoothing and noise reduction processing; wire tilt correction processing; wire segmentation and quantity statistics processing; then converts the image to the Hsv color space and the His color space; calibrates the effective pixel value using the mean and variance of the pixels; then performs normalization processing; then performs pixel histogram statistics, and uses the statistical result as the target digital feature.
[0169] In some embodiments, the recognition unit 45 includes:
[0170] A determination module, which determines that the wire sequence of the device connector of the target model is incorrect if the matching degree between the target digital feature and the digital feature template is lower than the target threshold.
[0171] In some embodiments, the device further includes: a reminder unit, which, after determining that the wire sequence of the device connector of the target model is incorrect, determines the sorting of the wrongly connected wires and gives a voice reminder.
[0172] It should be noted that the above-mentioned each module can be a functional module or a program module, and can be implemented either by software or by hardware. For the modules implemented by hardware, the above-mentioned each module can be located in the same processor; or the above-mentioned each module can also be located in different processors in any combined form.
[0173] The embodiment provides a computer device. The method for identifying wire sequence based on image processing in combination with the embodiments of the present application can be implemented by the computer device. Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present application.
[0174] The computer device may include a processor 51 and a memory 52 storing computer program instructions.
[0175] Specifically, the above-mentioned processor 51 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0176] Among them, the memory 52 may include a mass memory for data or instructions. By way of example and not limitation, the memory 52 may include a hard disk drive (HDD), a floppy disk drive, a solid state drive (SSD), a flash memory, an optical disc, a magneto-optical disc, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 52 may include removable or non-removable (or fixed) media. Where appropriate, the memory 52 may be internal or external to the data processing device. In a particular embodiment, the memory 52 is a non-volatile memory. In a particular embodiment, the memory 52 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM), or a flash memory, or a combination of two or more of these. Where appropriate, the RAM may be a static random access memory (SRAM) or a dynamic random access memory (DRAM), where the DRAM may be a fast page mode dynamic random access memory (FPMDRAM), an extended date out dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0177] The memory 52 can be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 51.
[0178] The processor 51 reads and executes the computer program instructions stored in the memory 52 to implement any one of the above-described image processing-based wire sequence recognition methods in the embodiments.
[0179] In some embodiments, the computer device may further include a communication interface 53 and a bus 50. Among them, as Figure 5 shown, the processor 51, the memory 52, and the communication interface 53 are connected through the bus 50 and complete communication with each other.
[0180] The communication interface 53 is used to implement communication between the various modules, devices, units, and / or devices in the embodiments of the present application. The communication interface 53 can also implement data communication with other components, such as external devices, image / data acquisition devices, databases, external storage, and image / data processing workstations, etc.
[0181] The bus 50 includes hardware, software, or both, and couples components of a computer device to each other. The bus 50 includes, but is not limited to, at least one of the following: Data Bus, Address Bus, Control Bus, Expansion Bus, Local Bus. By way of example and not limitation, the bus 50 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable bus or a combination of two or more of these. In a suitable case, the bus 50 may include one or more buses. Although the embodiments of the present application describe and illustrate specific buses, the present application contemplates any suitable bus or interconnect.
[0182] In addition, in combination with the above-described line sequence recognition method based on image processing in the embodiments, embodiments of the present application may provide a computer-readable storage medium for implementation. Computer program instructions are stored on the computer-readable storage medium; when the computer program instructions are executed by a processor, any one of the above-described line sequence recognition methods based on image processing in the embodiments is implemented.
[0183] The technical features of the above-described embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0184] The above-described embodiments merely represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.
Claims
1. A method for wire sequence recognition based on image processing, characterized in that, it includes: Determine the target model of the device connector to be recognized; Obtain the target image collected by the camera. After the device connector of the target model is assembled with the wire, it is placed on the LED parallel light bottom plate, and the camera is directly above the LED parallel light bottom plate; Extract the ROI region from the target image, and perform image processing on the ROI region to extract the target digital features; Compare the target digital features with the pre-stored digital feature template corresponding to the device connector of the target model; Identify the wire sequence of the device connector of the target model according to the comparison result; Among them, before determining the target model of the device connector to be recognized, the method further includes: Perform the following operations on the device connectors of each model, where the first model is one of the models of each type: Place the device connector of the first model with the correct wire sequence on the LED parallel light bottom plate; Obtain the template image collected by the camera; Select at least one ROI region from the template image; Perform image processing on each ROI region respectively to extract digital features; Store the at least one extracted digital feature as the digital feature template corresponding to the device connector of the first model; Among them, performing image processing on the ROI region to extract the target digital features includes: Use the ROI region as the processing source, perform image smoothing and noise reduction processing; wire inclination correction processing; wire segmentation and quantity statistics processing; then convert the image to the Hsv color space and the His color space; calibrate the effective pixel values using the mean and variance of the pixels; then perform normalization processing; then perform pixel histogram statistics, and use the statistical result as the target digital feature.
2. The method according to claim 1, characterized in that, Identifying the wire sequence of the device connector of the target model according to the comparison result includes: If the matching degree between the target digital features and the digital feature template is lower than the target threshold, it is determined that the wire sequence of the device connector of the target model is incorrect.
3. The method according to claim 2, characterized in that, After determining that the wire sequence of the device connector of the target model is incorrect, the method further includes: If the sorting of the wrongly connected wires is determined and a voice reminder is given.
4. A wire sequence recognition device based on image processing, characterized in that, it includes: A determination unit for determining the target model of the device connector to be recognized; An acquisition unit for acquiring the target image collected by the camera. After the device connector of the target model is assembled with the wire, it is placed on the LED parallel light bottom plate, and the camera is directly above the LED parallel light bottom plate; An extraction unit for extracting the ROI region from the target image and performing image processing on the ROI region to extract the target digital features; A comparison unit for comparing the target digital features with the pre-stored digital feature template corresponding to the device connector of the target model; An identification unit, configured to identify the wire sequence of the device connector of the target model according to the comparison result; An execution unit, configured to perform the following operations on the device connectors of each model before determining the target model of the device connector to be identified, where the first model is one of the each model: Place the device connector of the first model with the correct wire sequence on the LED parallel light bottom plate; Obtain the template image collected by the camera; Select at least one ROI region from the template image; Perform image processing on each ROI region respectively, and extract digital features; Store the at least one extracted digital feature as the digital feature template corresponding to the device connector of the first model; Wherein, the extraction unit includes: A processing module, configured to use the ROI region as a processing source to perform image smoothing and noise reduction processing; wire tilt correction processing; wire segmentation and quantity statistics processing; then convert the image into the Hsv color space and the His color space; calibrate the effective pixel value using the mean and variance of the pixels; then perform normalization processing; then perform pixel histogram statistics, and use the statistical result as the target digital feature.
5. The device according to claim 4, wherein, the identification unit includes: A determination module, configured to determine that the wire sequence of the device connector of the target model is incorrect if the matching degree between the target digital feature and the digital feature template is lower than the target threshold.
6. The device according to claim 5, wherein, it further includes: A reminder unit, configured to determine the sorting of the wrongly connected wires and give a voice reminder after determining that the wire sequence of the device connector of the target model is incorrect.
7. A computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, when the processor executes the computer program, it implements the wire sequence identification method based on image processing according to any one of claims 1 to 3.
8. A computer-readable storage medium, on which a computer program is stored, wherein, when the program is executed by the processor, it implements the wire sequence identification method based on image processing according to any one of claims 1 to 3.
Citation Information
Patent Citations
Non-contact vehicle harness wire sequence identification device
CN108801462A