Automobile backlight is an indispensable component of In-car lighting.It is responsible for providing illuminant for operating switches,warning signals,combination instruments and multimedia modules in the cab,which is of great significance for driving safety.The traditional automobile backlight detection technology is mostly manual visual inspection,and the accuracy can’t meet the current market requirements.If a high-precision colorimeter is used,the detection speed will affect the production efficiency.The development of machine vision detection technology provides a new idea for solving the current problems.Based on the image processing algorithm of machine vision,combined with embedded technology and colorimetry,a system scheme combining software and hardware is designed to realize the consistency detection and correction of automobile backlight effect.The research content of the system mainly includes the design of hardware platform,image processing algorithm and software.The hardware platform selects STM32F429 as the main-control chip of the lower computer,completes the circuit design and component selection of backplane,power supply,camera,Ethernet communication,CAN communication and serial communication,and finally builds the hardware platform of the system.The image processing algorithm is the core of the research,which mainly includes four aspects: the first one is image preprocessing,the improved histogram threshold method proposed in this paper can effectively obtain the threshold value in the gentle trough interval;the second one is defect detection,aiming at the problem that the method based on template comparison can only detect large-area defects,this paper proposes a method based on connected region feature extraction,which has a good effect in detecting small spots;the third one is the chromaticity and brightness detection method,which extracts the skeleton through the typical thinning algorithm to select the detection points in the target area,and establishes the RGB-XYZ color space conversion formula independent of camera equipment by polynomial regression technology to accurately obtain the eigenvalues in the detection points;the fourth one is the relative standard deviation formula is used to evaluate the results of chromaticity and brightness distribution.In terms of software design,the lower computer transplants C/OS-II system and Lw IP protocol stack with MDK5 software,designed the task function,and formulates the CAN message based on SAE J1939 protocol;the upper computer is developed with MFC of VS2017 software,transplanted the image processing algorithm in MATLAB,and established a connection with My SQL database.The experimental results show that the upper computer effectively controls the lower computer to realize the functions of image acquisition,data interaction and brightness correction,as well as the functions of result display and data management.The whole system can quickly detect the defect,chromaticity and brightness of the backlight on the premise of ensuring the accuracy,and correct the brightness at the same time to achieve the consistency of the backlight effect. |