Measurement method of surface gloss of silicone keypad based on machine vision system
By using fill light sources and cameras in a machine vision system, combined with image processing technology, dividing the surface area of the silicone keypad and calculating the glossiness, the problem of unqualified glossiness of the silicone keypad is solved, and efficient and low-cost glossiness detection is achieved.
Patent Information
- Application Number
- CN202310435171.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-21
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2043-04-21
AI Technical Summary
Existing silicone keypads have the problem of unqualified gloss after mass production, and the existing detection method requires two sets of equipment: a machine vision system and a gloss meter, which affects detection efficiency and increases costs.
By utilizing the existing machine vision system, supplementary light sources and cameras, combined with image processing technology, the surface of the silicone keypad is divided into several areas, the glossiness of each area is calculated, error points are eliminated, and the glossiness results are output, thus simplifying the inspection process.
It realizes glossiness detection on the existing machine vision system, reduces costs, simplifies the detection process, improves detection efficiency, and meets the glossiness requirements of silicone buttons.
Smart Images

Figure CN116519640B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method for measuring the surface glossiness of a silicone keypad based on a machine vision system. Background Art
[0002] After mass production, existing silicone keypads require defective inspection to check for defects such as burrs and small holes on the panels. While some inspections are currently done manually, most rely on machine vision systems. Machine vision systems are a mature automated inspection solution, widely used in automotive electronics, medical, aerospace, mini LED chip testing, semiconductor packaging, and other fields. Machine vision systems capture images with cameras and then use image recognition algorithms to identify defects. Compared to manual inspections, machine vision systems offer advantages such as high efficiency and low cost.
[0003] To maintain the overall aesthetics of electronic products, some users require that the glossiness of silicone keypad surfaces on these products be consistent with that of other surfaces. This requires the glossiness of silicone keypad surfaces to be within an acceptable range. However, due to process limitations, some existing silicone keypads exhibit a glossiness that is either matte or glossy after mass production.
[0004] Therefore, after production, silicone keypads require defect inspection and surface gloss testing. Existing gloss testing is mostly performed using a gloss meter. Existing technology requires two separate sets of equipment: a machine vision system and a gloss meter. This reduces inspection efficiency and increases costs.
[0005] Therefore, there is an urgent need for a solution that can perform gloss detection using existing machine vision systems, simplifying the detection process while reducing costs. Summary of the Invention
[0006] The technical problem to be solved by the embodiments of the present invention is to provide a method for measuring the surface gloss of a silicone keypad based on a machine vision system, so as to achieve the measurement of the surface gloss of the silicone keypad on the basis of the existing machine vision system.
[0007] In order to solve the above technical problems, an embodiment of the present invention proposes a method for measuring the glossiness of a silicone keypad surface based on a machine vision system. The machine vision system includes a fill light source and a camera. The fill light source projects light onto the silicone keypad surface at a fixed intensity and angle, and the camera photographs the silicone keypad surface at an equal but opposite angle. The measurement method includes:
[0008] Step 1: Use a camera to obtain the original image of the silicone button to be tested, and process and segment the image to obtain the silicone button image;
[0009] Step 2: Convert the silicone key image into a silicone key grayscale image, divide the silicone key grayscale image into several regions according to a preset division rule, and obtain the grayscale value of each pixel in each region of the silicone key grayscale image;
[0010] Step 3: Calculate the difference between the grayscale value of each pixel and the reference grayscale value of the corresponding pixel, remove the pixels whose difference exceeds the preset grayscale threshold, and then calculate the average of the grayscale value differences of the remaining pixels in each area;
[0011] Step 4: Calculate the glossiness of each area according to the following formula:
[0012] I=a*e+I 基 ;
[0013] Where, I is the glossiness, I 基 is the reference glossiness of the corresponding area, a is the mean of the grayscale value differences of the remaining pixels in the corresponding area, and e is a constant;
[0014] Step 5: Eliminate the areas where the difference between the glossiness and the corresponding reference glossiness is less than the preset glossiness threshold, and output the average glossiness of the remaining areas as the measurement result.
[0015] Furthermore, before step 1, a reference grayscale value calculation step is also included:
[0016] An original image of a benchmark silicone button with known glossiness is obtained by photographing with a camera, and the image is processed and segmented to obtain a benchmark silicone button image; the benchmark silicone button image is converted into a benchmark silicone button grayscale image, and the benchmark silicone button grayscale image is divided into several areas according to preset division rules, and the grayscale value of each pixel point in each area of the benchmark silicone button grayscale image is obtained, and the grayscale value is used as the corresponding benchmark grayscale value.
[0017] Furthermore, the preset division rules are divided according to the following four area categories and the number of keys on the surface of the silicone keypad:
[0018] The surface area of each key, the side wall area of each key, the surface light area of the non-key part of the silicone key surface, and the backlight area of the non-key part of the silicone key surface.
[0019] Furthermore, the projection angle of the fill light source is 60°.
[0020] Furthermore, in step 2, the threshold segmentation + edge search method is used to identify each region and remove the interfering pixels at the edge of each region.
[0021] The beneficial effects of the present invention are as follows: the present invention adopts the existing machine vision system and can realize gloss detection without adding other equipment, so that while detecting defects through the machine vision system, it can also detect whether the gloss meets the requirements, simplifying the detection process while reducing costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 The present invention is a flow chart of a method for measuring the surface gloss of a silicone keypad based on a machine vision system. Implementation Method
[0023] It should be noted that, unless there is a conflict, the embodiments in this application and the features in the embodiments can be combined with each other. The present invention is further described in detail below with reference to the drawings and specific embodiments.
[0024] Please refer to Figure 1 The method for measuring the surface gloss of a silicone keypad based on a machine vision system according to an embodiment of the present invention is applied to a machine vision system. The machine vision system includes a fill light source and a camera. The silicone keypad is placed on a fixture of the machine vision system. The fill light source projects light onto the surface of the silicone keypad at a fixed intensity and angle. The camera photographs the surface of the silicone keypad at an equal but opposite angle, that is, the camera is set on the reflected light path. The glossiness of the silicone keypad surface varies. With the same intensity of light, the luminous flux entering the camera varies, resulting in different brightness of the image. By detecting this difference, the gloss change can be measured. Compared with the detection principle of a gloss meter, the accuracy is slightly lower, but it is sufficient for silicone keypad detection.
[0025] The method for measuring the surface gloss of a silicone keypad based on a machine vision system of the present invention comprises steps 1 to 5.
[0026] Step 1: Use a camera to obtain the original image of the silicone key to be tested, and process and segment the image to obtain the silicone key image. Step 1 adopts the existing technology, that is, when the machine vision system identifies the surface defects of the silicone key, it will also process the image in this way, obtain the silicone key image, and then perform defect identification. In specific implementation, preferably, the machine vision system detects defects first, and then measures the gloss after detecting that there are no defects, so as to avoid the defect affecting the grayscale value of a certain pixel point to cause a large difference, thereby affecting the measurement accuracy. For example, step 1 can perform the following processing on the image:
[0027] 1. Image transformation: (spatial domain and frequency domain, geometric transformation, chromaticity transformation, scale transformation);
[0028] 2. Image enhancement: grayscale transformation enhancement, histogram enhancement, image smoothing / noise reduction, image (edge) sharpening, etc.;
[0029] 3. Texture analysis (skeleton extraction, connectivity);
[0030] 4. Image segmentation: threshold segmentation, boundary-based segmentation, Hough transform;
[0031] 5. Image feature extraction: geometric features, shape features, amplitude features, histogram features, color features, local binary pattern (LBP) features, etc.
[0032] Step 2: Convert the silicone key image into a silicone key grayscale image, divide the silicone key grayscale image into several regions according to a preset division rule, and obtain the grayscale value of each pixel in each region of the silicone key grayscale image. The present invention divides the silicone key grayscale image into several regions according to the characteristics of each part of the silicone key, and compares each region separately, thereby reducing errors.
[0033] Step 3: Calculate the grayscale value x of each pixel n and the reference gray value b of the corresponding pixel n The difference y n , remove the pixels whose difference exceeds the preset grayscale threshold, and then calculate the average grayscale difference a of the remaining pixels in each area. The present invention uses a preset grayscale threshold to remove individual pixels with large errors to improve measurement accuracy. n∈(1,2,……,m), m represents the nth pixel. y n =x n -b n . a is equal to the y value of each pixel after elimination n The mean of .
[0034] Step 4: Calculate the glossiness of each area according to the following formula:
[0035] I=a*e+I 基 ;
[0036] Where, I is the glossiness, I 基 is the baseline glossiness of the corresponding area, a is the mean grayscale value difference of the remaining pixels in the corresponding area, and e is a constant. e can be calculated experimentally (experiments have shown that under the illumination of existing machine vision systems, a glossiness difference of 10 GU has a grayscale value variation range of 2 to 3). This involves detecting a silicone keypad with a known glossiness and calculating e based on the known glossiness. To improve accuracy, multiple silicone keys with different known glossiness levels can be used for multiple calculations. The size of e is related to the light intensity of the fill light source (directly proportional) and the material and pattern of different regions of the silicone keypad. The size of e varies slightly between regions. Therefore, the present invention calculates the glossiness and e value of each region separately to improve accuracy.
[0037] Step 5: Eliminate areas where the difference between the glossiness and the corresponding baseline glossiness is less than a preset glossiness threshold. The average glossiness of the remaining areas is taken as the measurement result and output. This method eliminates the influence of areas with minimal variation, such as the backlight area (the shadowed area of the key on the silicone keypad surface). Because this area is not directly illuminated by the fill light source, the grayscale value at different gloss levels does not vary significantly, requiring elimination to improve accuracy. Based on the requirements of silicone keypad products, this method outputs a result in fractions of gloss (not necessarily a precise GU value). For example, for values between 50 GU and 60 GU, the result is 5 gloss. While the measurement accuracy of this method is slightly lower than that of existing gloss meters, it is fully sufficient for silicone keypad inspection, allowing users to save on gloss meter equipment and reduce costs. Furthermore, gloss testing can be performed simultaneously with existing defect detection, eliminating the need to place the silicone keypad under the gloss meter for testing, streamlining the process and saving time.
[0038] If the test result is not within the qualified glossiness range, the present invention outputs an unqualified result. The user can recycle the unqualified silicone keys that are dull or dark and adjust the glossiness of the silicone keys surface a second time to meet the glossiness requirements.
[0039] As an implementation method, step 1 further includes a reference grayscale value calculation step:
[0040] A camera is used to capture an original image of a reference silicone keypad of known gloss (the reference silicone keypad preferably uses the median of a qualified gloss range. For example, if the qualified gloss range is 6-7 beams per minute, a silicone keypad with a gloss of 70GU can be used as the reference silicone keypad). The image is then processed and segmented to obtain a reference silicone keypad image. The reference silicone keypad image is then converted into a reference silicone keypad grayscale image. The reference silicone keypad grayscale image is then divided into several regions using a preset division rule. The grayscale value of each pixel within each region of the reference silicone keypad grayscale image is obtained, and the grayscale value is used as the corresponding reference grayscale value. Because silicone keypads of the same model have the same specifications, the location of the silicone keypad corresponding to each pixel remains unchanged, and the angle and intensity of light received by each position on the silicone keypad remain unchanged. To reduce errors, it is preferred to place the silicone keypad on a fixture of the machine vision system for photography.
[0041] As an embodiment, the preset division rules are based on the following four area categories and the number of keys on the silicone keypad surface: the surface area of each key, the sidewall area of each key, the front-lit area of the non-key portion of the silicone keypad surface, and the back-lit area of the non-key portion of the silicone keypad surface. By dividing the areas, the present invention eliminates differences in grayscale value variations between different areas (i.e., under the same intensity and angle of light, different gloss levels will result in different grayscale value variations in different areas).
[0042] As an implementation method, the fill light source projection angle is 60 degrees. 60 degrees is most suitable for the glossiness of the silicone surface, has the highest calculation accuracy, and does not affect the original defect detection part of the machine vision system.
[0043] As an implementation method, in step 2, threshold segmentation and edge finding are used to identify each region (Canny detection, threshold segmentation, extraction of high-frequency information from Fourier transforms, and some ant colony algorithms can also be used), and interfering pixels at the edges of each region are removed. This embodiment of the present invention uses the threshold segmentation and edge finding method, which is the most commonly used method in existing machine vision systems, to identify each region. This part is prior art.
[0044] While 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 these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A method for measuring the surface gloss of a silicone keypad based on a machine vision system, wherein the machine vision system includes a fill light source and a camera, characterized in that: The fill light source projects light onto the surface of the silicone keypad at a fixed intensity and angle, and the camera photographs the surface of the silicone keypad at an equal but opposite angle. The measurement method includes: Step 1: Use a camera to obtain the original image of the silicone button to be tested, and process and segment the image to obtain the silicone button image; Step 2: Convert the silicone key image into a silicone key grayscale image, divide the silicone key grayscale image into several regions according to a preset division rule, and obtain the grayscale value of each pixel in each region of the silicone key grayscale image; the preset division rule is divided according to the following four region categories and the number of keys on the silicone key surface: The surface area of each key, the sidewall area of each key, the surface light area of the non-key part of the silicone key surface, and the backlight area of the non-key part of the silicone key surface; Step 3: Calculate the difference between the grayscale value of each pixel and the reference grayscale value of the corresponding pixel, remove the pixels whose difference exceeds the preset grayscale threshold, and then calculate the average of the grayscale value differences of the remaining pixels in each area; Step 4: Calculate the glossiness of each area according to the following formula: I=a*e+I 基 ; Where, I is the glossiness, I 基 is the reference glossiness of the corresponding area, a is the mean of the grayscale value differences of the remaining pixels in the corresponding area, and e is a constant; Step 5: Eliminate areas where the difference between the glossiness and the corresponding reference glossiness is less than the preset glossiness threshold to eliminate the influence of areas with little change. The backlight area is not directly illuminated by the fill light source, so the grayscale value under different glossiness does not change much and needs to be eliminated. The average glossiness of the remaining areas is used as the measurement result and output.
2. The method for measuring the surface gloss of a silicone keypad based on a machine vision system according to claim 1, wherein: Before step 1, the reference grayscale value calculation step is also included: An original image of a benchmark silicone button with known glossiness is obtained by photographing with a camera, and the image is processed and segmented to obtain a benchmark silicone button image; the benchmark silicone button image is converted into a benchmark silicone button grayscale image, and the benchmark silicone button grayscale image is divided into several areas according to preset division rules, and the grayscale value of each pixel point in each area of the benchmark silicone button grayscale image is obtained, and the grayscale value is used as the corresponding benchmark grayscale value.
3. The method for measuring the surface gloss of a silicone keypad based on a machine vision system according to claim 1, wherein: The fill light source projection angle is 60°.
4. The method for measuring the surface gloss of a silicone keypad based on a machine vision system according to claim 1, wherein: In step 2, the threshold segmentation + edge search method is used to identify each area and remove the interfering pixels at the edge of each area.
Citation Information
Patent Citations
Surface gloss detection method based on camera
CN114839165A