| With the rapid development of the electronic manufacturing industry,more electronic devices require double-row wiring harness connectors(referred to as doublerow wiring harness).At present,the process of inserting the wires of different colors into the rubber shell in the specified order is mainly done manually.In order to avoid the occurrence of incorrect wiring of the meter and equipment operation failure caused by the wrong wire insertion,the inspector needs to inspect the wiring condition.Due to the cross-wound or similar colors of the wires,the inspector’s long-time focused inspection will cause visual fatigue,resulting in missed inspections or false inspections,and cannot ensure the quality of the wiring harness products.Therefore,this paper designs a set of double-row wire harness color detection system,which can automatically identify the color of the wire harness and judge whether its position is correct.The research content of this article is as follows:(1)By analyzing the specific characteristics of the double-row wiring harness and combining with the detection index requirements of the wiring harness company,the hardware parts of the image acquisition system such as the camera,lens and light source are selected,and product fixtures suitable for different width wiring rows are designed.Based on the VS2015 development platform,combined with the Open CV library to design the software interactive interface of the color detection system.(2)Image processing and feature matching.For the preprocessing of the original image of the dual-row wire harness collected by the industrial camera in a fixed lighting environment,the bilateral filtering method is used for denoise;for the uneven light in the detection area,the local adaptive algorithm based on Retinex is used to enhance the luminance and contrast of the harness image;The grayscale method using weighted Euclidean distance can effectively solve the problem of harness target information loss;the OTSU method is used to segment the wires in the wire harness image;the edge contour positions of each wire extracted by the Canny algorithm are used to obtain the corresponding wire regions in the filter image.Taking into account the interference of characters printed on some wires on the collected colors,it is proposed to use Kmeans++ combined with the contour coefficient index method to automatically extract the RGB characteristic values of the main colors of each wire,and the CMC color difference formula under the CIE standard is used to compare the eigenvalues of the test harness and the template harness.In order to distinguish the colors of wires with similar colors,the color difference threshold is selected through experiments of some double-row wiring harness samples with similar colors,and then the color judgment is performed,instead of the human eye to make a unified evaluation of the color detection.(3)On-line experiment and analysis of wire harness detection system.Design the overall plan of the inspection system in accordance with the requirements of the harness inspection index,and use the common 3 different background colors and 5 different linear double-row harness products on the market as the inspection samples.The inspection system is verified and analyzed by repeated experiments under the harness inspection instrument.The detection system can accurately identify the color and position of the defective wiring harness with the wrong hole position,and the missed detection rate that meets the requirements of the wiring harness company is not higher than 2%,and the wrong detection rate is not higher than 10%.The feasibility of the color detection system designed in this paper is discussed. |