Welding spot detection system of mobile phone screen
Patent Information
- Application Number
- CN202411482094.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-11
AI Technical Summary
[0005]手机屏幕焊点较小,通常情况难以分别焊接的好坏,所以检测人员会拿的很近,仔细查看,并且还需要借助良好的灯光环境;
[0049] Compared with the prior art, the beneficial effect of the present invention is that the system improves screen detection efficiency compared to manual detection, designs a unique encryption method to set accounts and passwords, ensures the security of the system, and simplifies the difficulty of users' operation. All button triggers are designed in a guided manner. Only by clicking in the correct order can the detection task be completed normally. It not only avoids unnecessary errors but also allows users to see the steps of use at a glance. In addition, the system has the function of automatically obtaining parameters. It further reduces the difficulty of using users. This system also designs a unique parameter module, and all the parameter schemes used by users can be saved. If you want to produce the screen of the previous model, you only need to import the corresponding parameter scheme. If you want to complete a new one Product detection only requires automatic parameter acquisition function or manual drawing of solder joints to obtain parameters of the new product, so as to perform detection tasks, multi-tasks are applicable, and include unique detection algorithms, optimized detection steps and functions. The detection process is greatly shortened, so that the entire system process is controlled within 300ms, improving the detection rate and accuracy. The system interface is modularly designed, different functions are distinguished by different colors, and the buttons of the same functional module are all together, and the parameters are visualized. The functions also allow users to intuitively feel the solder joint parameters, which are convenient for fine-tuning, with a friendly interface and complete functions.
Smart Images

Figure CN119413800A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of solder joint detection, and in particular to a solder joint detection system for a mobile phone screen. Background Art
[0002] Solder joint detection is an indispensable and important link in the production of mobile phone screens. The quality of screen component welding directly determines the quality of the product. However, most screen manufacturers currently use manual detection of solder joints. The solder joints themselves are very small and usually require strong light to see clearly. Long-term human eye observation and strong light stimulation cause eye fatigue of the inspectors, and the detection rate and accuracy are greatly reduced. The product quality cannot be guaranteed. If screens with inferior solder joints are allowed to flow into the market, it will cause incalculable losses.
[0003] Normally, the minimum number of screens that can be inspected per hour on the assembly line is 800, which means it takes 4.5 seconds to inspect one screen. However, in reality, no manufacturer will accept this minimum standard. If any link on the assembly line takes longer, the efficiency of the entire process will be reduced.
[0004] At present, the qualified indicator for manual inspection is to inspect 1,200 screens per hour. The time required for manual inspection of one screen is 3 seconds. This is unavoidable and cannot be shortened for the following reasons:
[0005] The solder joints on mobile phone screens are small, and it is usually difficult to distinguish the quality of soldering, so the inspectors will take it very close and check it carefully, and also need to use good lighting environment;
[0006] Long-term concentration will cause eye fatigue, resulting in longer detection time and inaccurate detection accuracy.
[0007] Under normal circumstances, assembly line workers work for 8 hours. If they use their eyes to distinguish the quality of solder joints during these 8 hours, it is obviously impossible. Manufacturers usually arrange more people to complete this process, which not only leads to further increase in labor costs, but also damages the eyes of inspectors;
[0008] Most of the current solder joint detection systems can only detect a specific product, such as PCB board solder joint detection, integrated circuit solder joint detection, etc. Whenever the product model is changed, or the product to be detected is changed, it is often not universal, and even the detection system needs to be replaced. In addition, there are problems such as low detection accuracy, easy false detection, and missed detection. The existing detection system has a complex operating interface and is not user-friendly.
[0009] In summary, it is necessary to propose a solder joint detection system for mobile phone screens to solve the above problems. Summary of the invention
[0010] The purpose of the present invention is to provide a solder joint detection system for a mobile phone screen to solve the problems raised in the above background technology.
[0011] To achieve the above object, the present invention provides the following technical solutions:
[0012] A solder joint detection system for mobile phone screens, which is based on PLC and QTcreator development environment running on Windows 10 operating system, including system login module, main interface interaction module and parameter setting module:
[0013] The system login module is used to convert the physical address of the machine into a unique username and password through encryption to ensure system security;
[0014] The main interface interaction module is used to provide camera control, parameter debugging, serial port debugging, log display functions, and provide a user-friendly interactive screen display interface;
[0015] The parameter setting module is used to set and adjust the detailed parameters of solder joint detection.
[0016] Preferably, the system login module encrypts the physical address to form an account number and password, and the encryption method is:
[0017] Divide the MAC address into 6 parts, recorded as (M1, M2, M3, M4, M5, M6);
[0018] Perform a custom hexadecimal to decimal conversion on each part, and record the conversion result as (H i), where (i = 1, 2, 3, 4, 5, 6);
[0019] For each converted number, do the following:
[0020] - Addition operation: (Hi' = Hi + Ci), where (Ci) is a fixed addend, which is (1, 6, 3, 4, 2, 5);
[0021] -Multiplication operation: (Hi”=H i't imesMi), where (Mi) is a fixed multiplier, which are (2, 1, 3, 1, 3, 2);
[0022] - Remainder operation: (Hi"'=Hi" mod 3);
[0023] -Addition operation: (Hi''=(Hi''+Bi)mod10), where (B_i) is a fixed addend, which are (3, 1, 2, 5, 1, 3);
[0024] If (Hi''≥10), convert it into a single number: (Hi''=(Hi''mod10)+1);
[0025] The processed 6 numbers are concatenated into a string to get the user name (Username), see formula 1:
[0026]
[0027] Among them, (Ci=[1,6,3,4,2,5]), (Mi=[2,1,3,1,3,2]),
[0028] (Bi=[3,1,2,5,1,3])(customHexToDec(Mi)) is a function used to convert hexadecimal (Mi) into decimal. If the result of (customHexToDec(Mi)) is a two-digit number, corresponding processing is required to meet the needs of addition and multiplication operations.
[0029] Preferably, the encryption method of the system login module is to obtain the user name according to the MAC address, and the user password is obtained in the following manner:
[0030] Assume that the user name is (U=u0u1u2u3u4u5), where (u0,u1,u2,u3,u4,u5) is a number between 0 and 9; the password P is also a 6-digit string, and its generation rules are as follows:
[0031] Multiply each number in the username by 3:
[0032] xi = 3 * uifori = 0 to 5;
[0033] Apply a specific increment to each xi:
[0034]
[0035] Again apply another set of increments to each xi:
[0036]
[0037] Modulo 10 for each xi, we get the number in the password:
[0038] pi = ximod10fori = 0to5;
[0039] Combine the obtained 6 numbers p0, p1, p2, p3, p4, p5 into the password string P, see formula 2:
[0040] P=(x0mod10)(x1mod10)(x2mod10)(x3mod10)(x4mod10)(x5mod10)2;
[0041] Among them, xi is the value calculated according to the above steps.
[0042] Preferably, the main interface interaction module performs the detection step of: after confirming the serial port and the detection parameters, opening the camera to take pictures and synchronizing the parameter setting module to perform the detection.
[0043] Preferably, the main interface interaction module cooperates with the parameter setting module to perform camera control steps: taking pictures and manually detecting after searching the camera list.
[0044] Based on the above system, the present invention also proposes a method for detecting solder joints of a mobile phone screen, comprising the following steps:
[0045] (1) Start the system, PLC and related equipment, and operate the main interface for manual or automatic detection;
[0046] (2) During detection, the camera image is acquired in real time and the detection process based on the OpenCV detection algorithm is entered;
[0047] (3). Return the results to PLC and print the log.
[0048] Preferably, the OpenCV detection algorithm process of step 2 is as follows: image conversion, obtaining region of interest, image segmentation, threshold processing, morphological operation, contour detection and counting, result determination, image saving and result return.
[0049] Compared with the prior art, the beneficial effects of the present invention are as follows: compared with manual detection, the present system improves the efficiency of screen detection, designs a unique encryption method to set accounts and passwords, ensures system security, simplifies the user's operation difficulty, and all button triggers are designed in a guided manner. Only by clicking in the correct order can the detection task be completed normally, which not only avoids unnecessary errors but also allows users to understand the usage steps at a glance. In addition, the system has the function of automatically obtaining parameters, which further reduces the user's difficulty of use. The present system also designs a unique parameter module, and the parameter schemes used by the user can be saved. If you want to produce a screen of the previous model, you only need to Import the corresponding parameter scheme. If you want to complete the inspection of new products, you only need to use the automatic parameter acquisition function or manually draw the solder joints to obtain the parameters of the new products, so as to carry out the inspection tasks. It is applicable to multiple tasks and includes a unique inspection algorithm. It optimizes the inspection steps and functions, greatly shortens the inspection process, and controls the entire system process within 300ms, improving the inspection rate and accuracy. The system interface adopts a modular design. Different functions are distinguished by different colors, and the buttons of the same functional module are together. The parameter visualization function also allows users to intuitively feel the solder joint parameters, which is convenient for fine-tuning. The interface is friendly and the functions are complete. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A topological diagram of a solder joint detection system for a mobile phone screen according to the present invention;
[0051] Figure 2 A diagram showing the steps of the system of the present invention from starting to performing a detection operation;
[0052] Figure 3 It is a system detection flow chart of the present invention;
[0053] Figure 4 It is a flowchart of the algorithm processing of the present invention;
[0054] Figure 5 is the detection interface of the present invention;
[0055] Figure 6 It is the ModeBus RTU protocol communication parameter diagram of the present invention;
[0056] Figure 7 This is a schematic diagram of the main interface display after the camera of the present invention is connected;
[0057] Figure 8 It is the parameter interface of the present invention;
[0058] Fig. 9 It is the parameter import interface of the present invention;
[0059] Fig.10 Draw an interface for the ROI of the present invention;
[0060] Fig.11 Draw an interface for the solder joint of the present invention;
[0061] Fig.12 The present invention is a flowchart of a specific implementation of the solder joint detection of a mobile phone screen. DETAILED DESCRIPTION
[0062] 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.
[0063] Example 1
[0064] See also Figure 1 The present invention proposes a solder joint detection system for a mobile phone screen. The system is implemented based on PLC and QTcreator development environment running on Windows 10 operating system, and includes a system login module, a main interface interaction module and a parameter setting module:
[0065] Among them, it should be noted that the system login module is used to encrypt the physical address of the machine as a unique username and password correspondence to ensure system security. The main interface interaction module is used to provide camera control, parameter debugging, serial port debugging, log display functions, and provide a user-friendly interactive screen display interface. The parameter setting module is used to set and adjust the detailed parameters of solder joint detection.
[0066] In this embodiment, it should also be noted that the system login module uses the physical address to encrypt to form the account number and password, and the encryption method is:
[0067] Divide the MAC address into 6 parts, recorded as (M1, M2, M3, M4, M5, M6);
[0068] Perform a custom hexadecimal to decimal conversion on each part, and record the conversion result as (H i), where (i = 1, 2, 3, 4, 5, 6);
[0069] For each converted number, do the following:
[0070] - Addition operation: (H i'=H i+C i), where (Ci) is a fixed addend, which are (1, 6, 3, 4, 2, 5);
[0071] -Multiplication operation: (H i”=H i't imesM i), where (M i) is a fixed multiplier, which are (2, 1, 3, 1, 3, 2);
[0072] - Remainder operation: (Hi"'=Hi" mod 3);
[0073] -Addition operation: (Hi''=(Hi''+Bi)mod10), where (B_i) is a fixed addend, which is (3, 1, 2, 5, 1, 3);
[0074] If (Hi''≥10), convert it into a single number: (Hi''=(Hi''mod10)+1);
[0075] The processed 6 numbers are concatenated into a string to get the user name (Username), see formula 1:
[0076]
[0077] Among them, (Ci=[1,6,3,4,2,5]), (Mi=[2,1,3,1,3,2]),
[0078] (Bi=[3,1,2,5,1,3])(customHexToDec(Mi)) is a function used to convert hexadecimal (Mi) into decimal. If the result of (customHexToDec(Mi)) is a two-digit number, corresponding processing is required to meet the needs of addition and multiplication operations.
[0079] In this embodiment, it should also be noted that the encryption method of the system login module is to obtain the user name according to the MAC address, and the user password is obtained in the following manner:
[0080] Assume that the user name is (U=u0u1u2u3u4u5), where (u0,u1,u2,u3,u4,u5) is a number between 0 and 9; the password P is also a 6-digit string, and its generation rules are as follows:
[0081] Multiply each number in the username by 3:
[0082] xi = 3 * uifori = 0 to 5;
[0083] Apply a specific increment to each xi:
[0084]
[0085] Again apply another set of increments to each xi:
[0086]
[0087] Modulo 10 for each xi, we get the number in the password:
[0088] pi = ximod10fori = 0to5;
[0089] Combine the obtained 6 numbers p0, p1, p2, p3, p4, p5 into the password string P, see formula 2:
[0090] P=(x0mod10)(x1mod10)(x2mod10)(x3mod10)(x4mod10)(x5mod10)2;
[0091] Among them, xi is the value calculated according to the above steps.
[0092] In this embodiment, it should also be noted that the detection steps of the main interface interaction module of the method are: after confirming the serial port and the detection parameters, open the camera to take pictures and synchronize the parameter setting module to perform detection.
[0093] In this embodiment, it should also be noted that the method main interface interaction module cooperates with the parameter setting module to perform camera control steps: searching the camera list, taking pictures, and manually detecting.
[0094] Example 2
[0095] See also Figure 2 , Figure 3 as well as Fig.12 Based on the above system, the present invention also proposes a method for detecting solder joints of a mobile phone screen, comprising the following steps:
[0096] (1) Start the system, PLC and related equipment, and operate the main interface for manual or automatic detection;
[0097] (2) During detection, the camera image is acquired in real time and the detection process based on the OpenCV detection algorithm is entered;
[0098] (3). Return the results to PLC and print the log.
[0099] In this embodiment, it should also be noted that the OpenCV detection algorithm process flow of step 2 of the system is: image conversion, obtaining the region of interest, image segmentation, threshold processing, morphological operation, contour detection and counting, result determination, saving the image and returning the result.
[0100] Example 3
[0101] See also Figures 1 to 11 In practical applications, based on the above system and method, the practical application process of the present invention specifically includes the following steps:
[0102] 1. System login:
[0103] The present invention uses the physical address of each machine as the user name after transformation, and the password is uniquely corresponding, ensuring the security of the system. The system uses an original encryption method to encrypt the physical address to form an account number and password. The encryption method is as follows:
[0104] Divide the MAC address into 6 parts, recorded as (M1, M2, M3, M4, M5, M6).
[0105] Perform a customized hexadecimal to decimal conversion on each part, and record the conversion result as (Hi), where (i = 1, 2, 3, 4, 5, 6).
[0106] For each converted number, do the following:
[0107] -Addition operation: (Hi'=Hi+Ci), where (Ci) is a fixed addend, which are (1, 6, 3, 4, 2, 5).
[0108] -Multiplication operation: (Hi”=Hi'timesMi), where (Mi) is a fixed multiplier, which are (2, 1, 3, 1, 3, 2).
[0109] - Modulo operation: (Hi"'=Hi" mod 3).
[0110] -Addition operation: (Hi''=(Hi''+Bi)mod10), where (B_i) is a fixed addend, which are (3, 1, 2, 5, 1, 3).
[0111] If (Hi'' ≥ 10), convert it into a single number: (Hi'' = (Hi'' mod 10) + 1).
[0112] The processed 6 numbers are concatenated into a string to obtain the user name (Username).
[0113] The specific formula is as follows:
[0114]
[0115] Among them, (Ci=[1,6,3,4,2,5]), (Mi=[2,1,3,1,3,2]), (Bi=[3,1,2,5,1,3]) (customHexToDec(Mi)) is a function used to convert hexadecimal (Mi) to decimal. If the result of (customHexToDec(Mi)) is a two-digit number, corresponding processing is required to meet the needs of addition and multiplication operations.
[0116] The above encryption method obtains the user name based on the MAC address, and the user password is obtained as follows:
[0117] Assume that the user name is (U=u0u1u2u3u4u5), where (u0,u1,u2,u3,u4,u5) is a number between 0 and 9. The password P is also a 6-digit string, and its generation rules are as follows:
[0118] Multiply each number in the username by 3:
[0119] xi=3*uifori=0to5
[0120] Apply a specific increment to each xi:
[0121]
[0122] Again apply another set of increments to each xi:
[0123]
[0124] Modulo 10 for each xi, we get the number in the password:
[0125] pi=ximod10fori=0to5
[0126] Combine the obtained 6 numbers p0, p1, p2, p3, p4, p5 into the password string P
[0127] So, the mathematical formula can be simplified to:
[0128] P=(x0 mod 10)(x1 mod 10)(x2 mod 10)(x3 mod 10)(x4 mod 10)(x5 mod10)
[0129] Where xi is the value calculated according to the above steps.
[0130] The right side is the key area, you can enter the password by clicking the mouse or typing on the keyboard. The user can enter the detection interface only after entering the correct password. Figure 5 As shown:
[0131] In order to greatly simplify the operation and let users know the functions of each module at a glance, this system interface adopts a unique partition design. Each functional area is filled with different colors, and the area name is marked in small letters in each module area. Even users who have never used it can quickly learn to use it.
[0132] The white area on the left is the camera screen display area, which displays the camera screen in real time; the log bar is below, which prints each operation step, system error information, solder joint detection results, etc. The log can be cleared or saved through the clear and save buttons on the right for easy viewing in the future; the serial port bar on the left shows the parameters for communicating with the lower computer PLC, which can be modified to meet different communication needs. The blue part in the middle of the right is the solder joint parameters, which can be dynamically adjusted according to different tasks to ensure detection accuracy. You can click the import button to import parameter configuration solutions from the local, and click the export button to export the parameters of this detection into a new solution for future use. The camera bar below is the area for opening the camera, starting detection, taking pictures, and manual detection.
[0133] 2. Communication with PLC equipment:
[0134] Communication is the basis for orderly operation of various devices. This system needs to communicate with the lower computer PLC in real time to ensure mechanical operations such as screen detection and movement. First, after the screen reaches the detection position, the PLC lower computer will give a detection command. After receiving the detection command, the detection system starts to detect the camera image and returns the detection result to the PLC lower computer. The lower computer puts the screen in the corresponding position according to the detection result, and unqualified products will not flow to the subsequent production links. The communication of this system is written in ModeBus RTU protocol. The specific communication parameters are as follows: Figure 6 shown.
[0135] This system designs the communication parameters as changeable options, and users can adjust the parameters to achieve the purpose of matching the communication with their own PLC slave computer.
[0136] Connect with camera:
[0137] See also Figure 7 ,The real-time display of the camera image is the basis for the system to detect and display. First, all available devices in the system are searched and displayed in a list for users to choose. The user can connect to the camera to display the image by clicking on the camera.
[0138] The screen can display the frame rate information of the current camera in real time and the name of the current product. When the test starts, the test results can also be displayed in real time. In order to facilitate users to intuitively feel the ROI area and solder joint parameters, this system draws the ROI area in real time on the screen to facilitate users to adjust the camera position. The red and blue rectangles in the middle represent the maximum and minimum values of the solder joint. Users can adjust the solder joint parameters according to the actual solder joint size and the rectangle to ensure the accuracy of the test.
[0139] Parameter scheme import:
[0140] See also Figure 8 , this system can set different parameters according to different product models to achieve the purpose of accurate detection. Users can modify the parameters manually.
[0141] When the user selects the corresponding parameter scheme, the product model will be automatically displayed. If you want to save the pictures with NG test results or OK test results during the test process, you can check the corresponding option. If you do not set the save path, the test result pictures will be saved to the default folder. Setting the path allows users to manually select the location they want to save.
[0142] In order to facilitate users, this system has designed parameter import and export solutions, as well as parameter visualization functions. The parameter import interface is as follows Fig. 9 As shown:
[0143] Double-clicking a recipe (that is, a parameter scheme) can display the selected parameter scheme in a real-time visual way on the left screen. There is a line of small words below the recipe module to prompt the user to select the scheme.
[0144] The screen on the left shows a real picture of a mobile phone's solder joints. The large rectangular red frame in the middle represents the ROI area, which is the area that needs to be inspected.
[0145] The two small boxes in the middle of the ROI indicate the minimum and maximum values of the solder joint settings. The red box indicates the maximum length and width of the solder joint, and the blue box indicates the minimum length and width of the solder joint. Only solder joints within this range are considered OK.
[0146] Pixel MAX indicates the minimum number of pixels contained in a solder joint. This parameter can be used to filter out noise and some tiny solder joints that do not need to be paid attention to.
[0147] The thresholds M IN and MAX can be adjusted according to the brightness of the solder joints captured by the camera. If the solder joints captured by the camera are darker, the threshold M IN can be set
[0148] Click the parameter import button to import solutions from other places into the current project. Click export to save the current parameters. After clicking confirm, the parameters can be updated to the main interface and the current parameter setting interface for solder joint detection. Click close to close the current parameter setting interface.
[0149] Whenever users need to test previous models of products, they do not need to reset the parameters. They can simply use the parameter import function to import the previously used parameters into the current project and perform testing at any time.
[0150] Through this visual operation, users can intuitively feel the details of the parameters and adjust the parameter size at any time. It is very user-friendly and there is no need to worry about not being able to understand it.
[0151] Parameters are automatically acquired:
[0152] The above functions are designed to facilitate users to select existing parameter solutions. When there are new products, it is obviously unreliable to continue to use the previous parameters for testing. In addition, the system users are not professional visual workers. They are not familiar with how to select solder joint parameters, and they are not clear about the appropriate parameter settings.
[0153] The present invention has designed a unique automatic detection function. The user only needs to click a button to allow the system to automatically obtain the parameters of the sample and then fill it into the main interface. Considering the completeness of the function, the system also supports manual drawing of the solder joint to obtain the parameters.
[0154] Users can then test new products after minor adjustments.
[0155] In order to simplify the user's operation, all buttons are triggered using a guided approach. The steps for automatically obtaining parameters are as follows:
[0156] The user needs to take a few pictures of the solder joints in advance, then click the open file button to find the folder where the images are saved. This step can be achieved through the camera control module's photo function.
[0157] At this time, there are two options: automatic detection of parameters and manual drawing of solder joints. When the user clicks the automatic acquisition of parameters button, he only needs to draw the ROI area, and then click the Confirm ROI button. The system will complete the acquisition of parameters and automatically fill them in the main interface. The user can start the detection task directly.
[0158] If the user chooses to draw solder joints manually, then in addition to drawing ROI, the solder joints also need to be drawn. The operation process is as follows: Fig.11 Shown:
[0159] ROI drawing is the same as automatic detection operation.
[0160] After the above simple operation, the solder joint detection operation can be carried out. This design not only simplifies the user's operating burden, but also improves the controllability of the detection parameters. Facing different tasks, this system can achieve good detection results.
[0161] Camera Controls:
[0162] Photographing: The camera control module combines multiple functions. If the user only wants to use the camera to take photos of solder joints without any other operations, the photo-taking function can be used to achieve this. The photo-taking interface is as follows:
[0163] After the user clicks the Save button, the current camera frame can be saved to the local default folder. If you need to save the picture to another place, you can select the place to save the picture by setting the path function. Click Close to close the interface.
[0164] Manual detection:
[0165] Usually, when facing new products, it is necessary to constantly adjust parameters to ensure the accuracy of detection. If the PLC lower computer is used to send detection signals, the entire debugging process will become very slow and inconvenient. Therefore, this system has designed a manual detection function. Just click a button to let the system detect the current screen and output specific detection results.
[0166] Camera List
[0167] In an actual industrial production environment, a device may be connected to several cameras, and it is usually impossible to tell which device is being used. This system searches for all available devices on the device and obtains their names and displays them in a list, so that users can switch at any time.
[0168] Start detection
[0169] When all parameters are confirmed, the user only needs to click to start the test, and all operations are completed. No other operations are required. The system will automatically interact with the PLC lower computer to complete the test task. Especially in the production process of the assembly line, there may be only one or two workers on an assembly line. After the user clicks to start the test, he can do other things. There is no need to operate the system at any time. The interactive system between the test and the lower computer will be completed automatically.
[0170] Log function:
[0171] A system generates information every moment during operation. In particular, some important error messages can help us quickly find the problem when we encounter a problem. In this system, the log module will capture various abnormal information and display it on the interface. This is convenient for users or maintenance personnel to troubleshoot. During the detection process, the log will also be updated in real time, printing the results of each test and counting the number of tests. This is convenient for users to calculate the number of screens tested per hour. In actual production, this is a very important evaluation indicator and a standard for measuring the performance of a system in actual working scenarios.
[0172] Detection function:
[0173] The detection part of this system receives the current data frame of the camera. In order to ensure the detection accuracy, the system directly operates on the original image without downsampling, cropping or other methods to reduce the resolution to improve the detection speed. In order to speed up the detection speed, the present invention has designed a unique detection algorithm for detecting solder joints. The system detection process is as follows: Figure 4 As shown:
[0174] The detection algorithm is implemented using opencv. Since opencv cannot directly process QT format images, the image format needs to be converted before detection. The algorithm processing flow is as follows Figure 4 Show:
[0175] Fame represents the frame data captured by the current camera. ImageConvert is image processing, including converting frame data into RGB format images and converting QT format images into cv::mat format supported by opencv. GetROI means capturing the ROI area in the image for detection. GetRGB_Blue means obtaining the blue channel of the image. This operation will filter out irrelevant factors in the image, such as other noise and small noise, so that the algorithm only focuses on the solder joint area. Threshold means performing threshold segmentation on the image to segment the solder joints. Erode and Dilate are image morphological operations, which represent corrosion and expansion. This processing step can make irrelevant factors such as small noise and interference patterns in the image disappear, making the solder joints clean and obvious. Count means counting operation, which is used to determine whether the number of solder joints seen is consistent with the actual number of solder joints. If it does not meet the requirements, it is NG, and if it meets the requirements, it is OK. Whether to save the current detection screen is determined based on whether the save option is checked in the parameter setting interface. Finally, the result is returned to the PLC register.
[0176] The algorithm is expressed in pseudocode:
[0177] Image conversion: Convert the camera frame data into QT RGB image, and convert the QImage format image into cv::Mat format:
[0178]
[0179] Get the region of interest (ROI):
[0180] IfROIisvalid:
[0181] ROI = GetROI (x, y, w, h), where x, y, w, h represent the coordinate point, width, and height of the ROI area respectively.
[0182] Image segmentation: Separate the blue channel from the ROI:
[0183] Img_b=blue_channels(Img), Img comes from the opencv image obtained in the first step.
[0184] Thresholding: Use a threshold to binarize the image:
[0185] RoiImage_b=threshold(Img_b,min,max), where min and max represent the thresholds of the segmentation operation, and only images within this range are segmented.
[0186] Morphological operations: Perform erosion and dilation operations to improve image quality:
[0187] binary_roiImage_b=cv::erode(RoiImage_b,kernel)
[0188] binary_roiImage_b=cv::dilate(RoiImage_b,kernel)
[0189] Erode means erosion operation, kernel means erosion size. Dilate means dilation operation, kernel means dilation size.
[0190] Contour Detection and Counting: Find all contours in a binary image:
[0191] contours=findContours(binary_roiImage_b)
[0192] Result determination: Determine the result based on the number and size of contours.
[0193]
[0194] Save image: Save the image based on the result
[0195] Ifokandneedsavethensaveelsepass
[0196] Ifngandneedsavethensaveelsepass
[0197] Return result:
[0198] IfokthensendoktoPLCelsesendngtoPLC;
[0199] In summary, this system improves the screen detection efficiency compared with manual detection, from 3s to 300ms.
[0200] This system has designed a unique encryption method to set accounts and passwords. Even if the program is copied to other places, the system cannot be used normally without the password, thus ensuring system security.
[0201] This system simplifies the user's operation difficulty. All button triggers are designed in a guided manner. Only by clicking in the correct order can the detection task be completed normally. It not only avoids unnecessary errors but also makes the user understand the usage steps at a glance. In addition, the system has the function of automatically obtaining parameters, which further reduces the user's difficulty of use;
[0202] This system is designed with a unique parameter module. The parameter schemes used by users can be saved. If you want to produce the previous model of screen, you only need to import the corresponding parameter scheme. If you want to complete the inspection of new products, you only need to use the automatic parameter acquisition function or manually draw the solder joints to obtain the parameters of the new products, so as to carry out the inspection task. It is applicable to multiple tasks.
[0203] This system has designed a unique detection algorithm and optimized the detection steps and functions, which greatly shortens the detection process and controls the entire system process within 300ms, thus improving the detection rate and accuracy.
[0204] The system interface adopts modular design. Different functions are distinguished by different colors, and the buttons of the same functional module are together. The parameter visualization function also allows users to intuitively feel the solder joint parameters, which is convenient for fine-tuning. The interface is friendly and the functions are complete.
[0205] This system uses an accurate and fast detection algorithm, combined with a smooth system to achieve this task, which greatly reduces the detection time and improves the detection accuracy, greatly improving the production efficiency of the assembly line. After testing on the actual assembly line, this system only takes 300ms at most to detect a screen, and can detect 12,000 screens in an hour. In the production process of mobile phone screens, the time to produce a screen is much longer than 300ms. Therefore, only one detection device can be used to simultaneously detect screens produced by multiple stations, which can improve efficiency and save costs. In order to improve production efficiency, assembly lines often use a multi-station approach to speed up production efficiency. For example, 4 screens are assembled on an assembly line at the same time. After these screens are assembled, they are sent to the next link in turn. This system has a short detection time, so it can detect screens on multiple assembly lines at the same time, helping users save costs.
[0206] 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 solder joint detection system for a mobile phone screen, which is implemented based on PLC and QTcreator development environment running on Windows 10 operating system, characterized in that: Including system login module, main interface interaction module and parameter setting module: The system login module is used to convert the physical address of the machine into a unique username and password through encryption to ensure system security; The main interface interaction module is used to provide camera control, parameter debugging, serial port debugging, log display functions, and provide a user-friendly interactive screen display interface; The parameter setting module is used to set and adjust the detailed parameters of solder joint detection.
2. A mobile phone screen solder joint detection system according to claim 1, characterized in that: The system login module encrypts the physical address to form an account number and password. The encryption method is: Divide the MAC address into 6 parts, recorded as (M1, M2, M3, M4, M5, M6); Perform a custom hexadecimal to decimal conversion on each part, and record the conversion result as (Hi), where (i=1,2,3,4,5,6); For each converted number, do the following: -Addition operation: (Hi'=Hi+Ci), where (Ci) is a fixed addend, which are (1, 6, 3, 4, 2, 5); -Multiplication operation: (Hi”=Hi'timesMi), where (Mi) is a fixed multiplier, which are (2,1,3,1,3,2); - Remainder operation: (Hi"'=Hi" mod 3); -Addition operation: (Hi''=(Hi''+Bi)mod10), where (B_i) is a fixed addend, which are (3, 1, 2, 5, 1, 3); If (Hi''≥10), convert it into a single number: (Hi''=(Hi''mod10)+1); The processed 6 numbers are concatenated into a string to obtain the user name (Username), see formula (1): Among them, (Ci=[1,6,3,4,2,5]), (Mi=[2,1,3,1,3,2]), (Bi=[3,1,2,5,1,3])(customHexToDec(Mi)) is a function used to convert hexadecimal (Mi) into decimal. If the result of (customHexToDec(Mi)) is a two-digit number, corresponding processing is required to meet the needs of addition and multiplication operations.
3. A mobile phone screen solder joint detection system according to claim 2, characterized in that: The encryption method of the system login module is to obtain the user name based on the MAC address, and the user password is obtained as follows: Assume that the user name is (U=u0u1 u2u3u4u5), where (u0,u1,u2,u3,u4,u5) is a number between 0 and 9; the password P is also a 6-digit string, and its generation rules are as follows: Multiply each number in the username by 3: xi=3*ui for i=0to5; Apply a specific increment to each xi: Again apply another set of increments to each xi: Modulo 10 for each xi, we get the number in the password: pi=xi mod 10for i=0to 5; The obtained 6 numbers p0, p1, p2, p3, p4, p5 are combined into the password string P, see formula (2): P=(x0 mod 10)(x1 mod 10)(x2 mod 10)(x3 mod 10)(x4 mod 10)(x5 mod10)(2); Among them, xi is the value calculated according to the above steps.
4. A mobile phone screen solder joint detection system according to claim 1, characterized in that: The main interface interaction module performs the detection steps as follows: after confirming the serial port and the detection parameters, the camera is turned on to take a picture and the parameter setting module is synchronized to perform the detection.
5. A mobile phone screen solder joint detection system according to claim 4, characterized in that: The main interface interaction module cooperates with the parameter setting module to perform camera control steps: searching the camera list, taking pictures, and manually detecting.
6. A method for detecting solder joints of a mobile phone screen, according to a system for detecting solder joints of a mobile phone screen according to any one of claims 1 to 5, characterized in that: The following steps are involved: (1) Start the system, PLC and related equipment, and operate the main interface for manual or automatic detection; (2) During detection, the camera image is acquired in real time and the detection process based on the OpenCV detection algorithm is entered; (3). Return the results to PLC and print the log.
7. A method for detecting solder joints of a mobile phone screen according to claim 6, characterized in that: The OpenCV detection algorithm process of step (2) is as follows: image conversion, obtaining the region of interest, image segmentation, threshold processing, morphological operation, contour detection and counting, result determination, image saving and result return.