Flexible LED filament power-on detection method and system based on image processing
By analyzing the brightness and chromaticity of the flexible LED filament based on image processing, the problems of insufficient accuracy and single index in the existing detection methods are solved, efficient and accurate quality evaluation is achieved, and the detection accuracy and consistency of the flexible LED filament are improved.
Patent Information
- Application Number
- CN202510583312.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-05-07
AI Technical Summary
The existing flexible LED filament detection methods rely on manual or simple visual processing, resulting in low detection accuracy, low efficiency and inconsistent results, making it difficult to meet the needs of high-precision quality control.
Using an image processing-based method, by converting the RGB image to the Lab color space, extracting the L channel and ab channel images respectively, performing binary segmentation, denoising and smoothing, calculating the brightness area and gradient change rate, and combining the Mahayana distance of the chromaticity coordinates, a comprehensive evaluation of the brightness uniformity and chromaticity consistency of the flexible LED filament is achieved.
It improves detection efficiency, reduces manual intervention, reduces subjective errors, can effectively identify filaments that do not meet the standards of brightness and chromaticity, improves product quality, and provides reliable quality assurance for large-scale production.
Smart Images

Figure CN120495230A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of LED power-on detection, and in particular to a flexible LED filament power-on detection method and system based on image processing. Background Art
[0002] Flexible LED filaments are a new type of lighting component that uses a flexible material as a substrate and integrates LED chips or light-emitting units into a bendable, foldable ribbon or linear structure. Currently, quality inspection methods for flexible LED filaments often rely on manual or simple visual processing. For example, if a certain area is not bright or there is a brightness defect such as a dark spot, it will be immediately marked as a substandard product, while a filament that can emit light normally will be marked as a qualified product. Obviously, this inspection method is still based on a single indicator of light point detection, and the evaluation results are low in accuracy, which is difficult to meet the needs of high-precision quality control. In addition, this method relies heavily on manual inspection and is generally subject to problems such as low efficiency and uneven inspection results. Summary of the Invention
[0003] In order to solve at least one of the above-mentioned technical problems, the present invention provides a method and system for detecting power-on of a flexible LED filament based on image processing.
[0004] In a first aspect, the present invention provides a method for detecting power-on of a flexible LED filament based on image processing, the method comprising:
[0005] The RGB images of the luminous points of multiple flexible LED filaments after power-on were collected, and the RGB images were converted to Lab color space. The L channel image and the ab channel image were extracted respectively. The L channel image was subjected to binary segmentation, denoising, and edge smoothing to obtain a binary mask image of each flexible LED filament.
[0006] Identify independent luminous points in the binary mask image and mark connected domains. After traversing each connected domain, obtain the total number of pixels as the brightness area. Remove flexible LED filaments whose brightness areas are outside the preset area range, and segment the remaining connected domains into concentric annular regions to obtain the central circle, middle ring, and outer ring regions.
[0007] Calculate the brightness of each area and the gradient change rate of the brightness of adjacent areas; when the difference between the brightness of the central circle and the brightness of the middle ring or the brightness of the outer ring exceeds the preset difference, or the gradient change rate of the brightness exceeds the preset change rate, the corresponding flexible LED filament will be removed;
[0008] Based on the ab channel images of the remaining flexible LED filaments, the Mahalanobis distance between the chromaticity coordinates and the standard value is calculated. When the Mahalanobis distance exceeds the distance tolerance, the corresponding flexible LED filament is eliminated, and all the remaining flexible LED filaments are marked as qualified.
[0009] Preferably, the binary segmentation of the L channel image comprises using a dynamic threshold method to perform binary segmentation on the L channel image, including:
[0010] Obtain the ambient light intensity and the transmittance of the flexible LED filament adhesive layer, and calculate the global threshold based on the ambient light intensity, transmittance, and calibration coefficient. Segment the L channel image into multiple sub-regions and calculate the local brightness mean of each sub-region.
[0011] Calculate the brightness ratio of the local brightness mean to the global brightness mean, determine whether the brightness ratio exceeds a preset ratio, and when the brightness ratio exceeds the preset ratio, multiply the current global threshold by the brightness ratio to dynamically update the global threshold;
[0012] The L channel image is binary segmented according to the dynamically updated global threshold, and the error rate of the segmentation result is counted. When the error rate exceeds the preset limit, the calibration coefficient is optimized by the gradient descent method to feedback and adjust the global threshold.
[0013] Preferably, before converting the RGB image to the Lab color space, the method further comprises:
[0014] Divide the RGB image into a pixel grid and calculate the local entropy of the grid;
[0015] An entropy distribution matrix is constructed according to the local entropy of the grid. Abnormal areas are detected according to the entropy distribution matrix, and the flexible LED filaments corresponding to the abnormal areas are identified and removed.
[0016] Preferably, after marking all remaining flexible LED filaments as qualified products, the method further comprises:
[0017] Mark all rejected flexible LED filaments as defective and match recycling strategies based on defect types;
[0018] Obtain the brightness area index, brightness distribution index, and color state index of each flexible LED filament among qualified products, and determine the quality assessment result of the flexible LED filament by weighted summation of each index;
[0019] The quality level of each qualified product is determined based on the quality assessment results, and different usage strategies are matched according to different quality levels.
[0020] In a second aspect, the present invention further provides a flexible LED filament power-on detection system based on image processing, the system comprising:
[0021] The power-on image segmentation module is used to collect RGB images of the luminous points of multiple flexible LED filaments after power-on, convert the RGB images to Lab color space, and extract the L channel image and ab channel images respectively. The L channel image is subjected to binary segmentation, denoising, and edge smoothing processing to obtain a binary mask image of each flexible LED filament.
[0022] The luminance area detection module is used to identify independent luminous points in the binary mask image and mark connected domains. After traversing each connected domain, the total number of pixels is obtained as the luminance area. Flexible LED filaments with luminance areas outside the preset area range are eliminated, and the remaining connected domains are divided into concentric annular regions to obtain the central circle, middle ring, and outer ring regions.
[0023] The brightness distribution detection module is used to calculate the brightness of each area and the gradient change rate of the brightness of adjacent areas. When the difference between the brightness of the central circle and the brightness of the middle ring or the brightness of the outer ring exceeds a preset difference, or the gradient change rate of the brightness exceeds a preset change rate, the corresponding flexible LED filament is removed.
[0024] The luminous color detection module is used to calculate the Mahalanobis distance between the chromaticity coordinates and the standard value based on the ab channel images of the remaining flexible LED filaments. When the Mahalanobis distance exceeds the distance tolerance, the corresponding flexible LED filament is eliminated and all the remaining flexible LED filaments are marked as qualified.
[0025] Preferably, the power-on image segmentation module further includes:
[0026] The local brightness calculation unit is used to obtain the ambient light intensity and the transmittance of the flexible LED filament adhesive layer, and calculate the global threshold based on the ambient light intensity, transmittance and calibration coefficient; the L channel image is divided into multiple sub-regions, and the local brightness mean of each sub-region is calculated;
[0027] A global threshold updating unit is used to calculate the brightness ratio of the local brightness mean to the global brightness mean, determine whether the brightness ratio exceeds a preset ratio, and when the brightness ratio exceeds the preset ratio, multiply the current global threshold by the brightness ratio to dynamically update the global threshold;
[0028] The calibration coefficient optimization unit is used to perform binary segmentation on the L channel image according to the dynamically updated global threshold, and to calculate the error rate of the segmentation result. When the error rate exceeds the preset limit, the calibration coefficient is optimized by the gradient descent method to feedback and adjust the global threshold.
[0029] Preferably, the power-on image segmentation module further includes:
[0030] A pixel grid division unit is used to divide the RGB image into a pixel grid and calculate the local entropy of the grid before converting the RGB image to the Lab color space;
[0031] The abnormal area detection unit is used to construct an entropy distribution matrix based on the local entropy of the grid, detect abnormal areas based on the entropy distribution matrix, identify the flexible LED filaments corresponding to the abnormal areas, mark them as unqualified products and remove them.
[0032] Preferably, the system further comprises a quality assessment module, configured to:
[0033] Mark all rejected flexible LED filaments as defective and match recycling strategies based on defect types;
[0034] Obtain the brightness area index, brightness distribution index, and color state index of each flexible LED filament among qualified products, and determine the quality assessment result of the flexible LED filament by weighted summation of each index;
[0035] The quality level of each qualified product is determined based on the quality assessment results, and different usage strategies are matched according to different quality levels.
[0036] In a third aspect, the present invention also provides an electronic device comprising a processor and a memory, wherein the memory is used to store computer program code, and the computer program code comprises computer instructions. When the processor executes the computer instructions, the electronic device executes the method as described in the first aspect above and any possible implementation thereof.
[0037] In a fourth aspect, the present invention also provides a computer-readable storage medium, in which a computer program is stored. The computer program includes program instructions, and when the program instructions are executed by a processor of an electronic device, the processor executes the method as described in the first aspect above and any possible implementation method thereof.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] This invention proposes a power-on detection method for flexible LED filaments based on image processing. This method converts an RGB image into Lab color space and extracts L and ab channel images, respectively, achieving refined analysis of brightness and chromaticity. By performing binary segmentation, denoising, and smoothing on the L channel image, the brightness area of the filament is accurately determined, and unqualified filaments are screened using preset area intervals. The remaining connected domain is further divided into concentric annular regions, and the brightness and gradient change rate of each region are calculated to effectively identify filaments with abnormal brightness distribution. Simultaneously, the Mahalanobis distance between the chromaticity coordinates and the standard value is calculated based on the ab channel images to ensure chromatic consistency. This solution, through multi-dimensional image processing technology, addresses the problems of insufficient precision and single-value indicators in existing detection methods, achieving a comprehensive assessment of the brightness uniformity and chromaticity consistency of flexible LED filaments. The automated image processing process not only improves detection efficiency, but also reduces manual intervention and subjective errors. Furthermore, this method can effectively eliminate filaments with substandard brightness or chromaticity, thereby improving product quality and providing reliable quality assurance for the large-scale production and application of flexible LED filaments.
[0040] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background technology, the drawings required for use in the embodiments of the present invention or the background technology will be described below.
[0042] The accompanying drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used to explain the technical solutions of the present disclosure.
[0043] Figure 1 A schematic flow chart of a flexible LED filament power-on detection method based on image processing provided by an embodiment of the present invention;
[0044] Figure 2 for Figure 1 A schematic flow chart of a sub-step of step S10;
[0045] Figure 3 for Figure 1 A schematic flow chart of another sub-step of step S10;
[0046] Figure 4 A schematic flow chart of another method for detecting power-on of a flexible LED filament based on image processing provided by an embodiment of the present invention;
[0047] Figure 5A schematic structural diagram of a flexible LED filament power-on detection system based on image processing provided by an embodiment of the present invention;
[0048] Figure 6 for Figure 5 A schematic structural diagram of a submodule of the power-up image segmentation module 100;
[0049] Figure 7 for Figure 5 A schematic structural diagram of another submodule of the power-on image segmentation module 100;
[0050] Figure 8 A schematic structural diagram of another flexible LED filament power-on detection system based on image processing provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the embodiments described 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 making creative efforts shall fall within the scope of protection of the present invention.
[0052] The terms "first," "second," and so on, in the description and claims of the present invention and the accompanying drawings are used to distinguish between different objects, not to describe a specific order. Furthermore, the terms "including," "having," and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0053] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute a separate or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0054] See also Figure 1 , Figure 1 The present invention provides a flow chart of a flexible LED filament power-on detection method based on image processing. Figure 1 As shown, a flexible LED filament power-on detection method based on image processing includes the following steps:
[0055] S10, collecting RGB images of the light-emitting points of multiple flexible LED filaments after power-on, converting the RGB images to Lab color space, and extracting L channel images and ab channel images respectively; performing binary segmentation, denoising, and edge smoothing on the L channel image to obtain a binary mask image of each flexible LED filament.
[0056] When capturing RGB images, use a high-resolution industrial camera with a uniform light source to ensure a clear, shadow-free image of the light point of the flexible LED filament after power is applied. Adjust the camera's exposure time and aperture to avoid overexposure or underexposure. For curved or deformed flexible LED filaments, use multi-angle imaging or dynamic capture. Additionally, use a polarizing filter to reduce reflections or darkfield lighting to enhance contrast.
[0057] After obtaining the RGB image, convert it to the Lab color space and extract the L channel image and the ab channel image respectively. The reason why the RGB image is converted to the Lab color space instead of the HSV color space is that the luminance channel L and the chrominance channels a and b in the Lab color space are completely decoupled, making it more suitable for independent analysis of luminance uniformity and chrominance consistency.
[0058] Furthermore, the L channel image is preprocessed, including the following steps:
[0059] Binary segmentation: Threshold segmentation typically involves global thresholding and adaptive thresholding. Global thresholding methods, such as the Otsu algorithm, automatically calculate the optimal threshold to separate the L channel image into foreground (luminous points) and background. Adaptive thresholding, on the other hand, dynamically adjusts the threshold based on the brightness of local areas in the image, making it suitable for scenes with uneven lighting.
[0060] Denoising: Use median filtering or Gaussian filtering. Median filtering replaces the current pixel value with the median value of the pixel neighborhood to effectively remove salt and pepper noise; Gaussian filtering smoothes the image through Gaussian kernel convolution to reduce Gaussian noise.
[0061] Edge smoothing: Morphological operations or smoothing after edge detection can be used. Morphological operations perform dilation, erosion, and opening and closing operations on binary mask images to remove small noise points and smooth edges. Smoothing after edge detection first locates edges using edge detection algorithms such as Canny, then smoothes them using polynomial fitting or spline interpolation.
[0062] S20, identifying independent luminous points in the binary mask image and marking connected domains, traversing each connected domain and obtaining the total number of pixels as the brightness area; removing flexible LED filaments whose brightness areas are outside the preset area range, and dividing the remaining connected domains into concentric ring areas to obtain a central circle, an intermediate ring, and an outer edge ring area.
[0063] Using connected domain labeling algorithms from image morphology, such as four-neighborhood or eight-neighborhood connectivity analysis, we can simultaneously obtain information such as the location, area, and centroid of the connected domain, making it suitable for rapid processing. For curved or densely packed flexible LED filaments, connectivity rules (such as eight-neighborhood) can be adjusted to avoid missegmentation. If the spacing between luminous points is large, four-neighborhood can be used to improve efficiency. The labels of each connected domain are traversed, and the number of corresponding pixels is counted as the brightness area. Minimum and maximum area thresholds are set according to filament design standards to eliminate filaments with abnormal areas.
[0064] For the flexible LED filaments that are not eliminated, the remaining connected domains are divided into concentric annular regions to obtain the central circle, middle ring and outer ring regions, and the gradient change rate of the brightness of each region and the brightness of the adjacent regions is calculated. Specifically, when cutting, the center of mass of the connected domain is used as the center of the circle, or a more accurate center is obtained by fitting the minimum circumscribed circle. Based on the width and height of the connected domain, half of the maximum value is taken as the maximum radius; the maximum radius is divided into three proportional intervals, such as 20%, 60%, and 100%, to generate a central circle (radius ≤ 20%), an intermediate ring (20% < radius ≤ 60%), and an outer ring (60% < radius ≤ 100%). It is understandable that the proportion can also be dynamically adjusted according to the shape complexity of the connected domain, for example, an ellipse is used instead of a circle to segment the slender connected domain. Alternatively, the area can be divided into more sub-rings (such as four equal parts) to analyze the brightness distribution in more detail, without any limitation here.
[0065] S30, calculating the gradient change rate of the brightness of each area and the brightness of adjacent areas; when the difference between the brightness of the central circle and the brightness of the middle ring or the brightness of the outer ring exceeds a preset difference, or the gradient change rate of the brightness exceeds a preset change rate, the corresponding flexible LED filament is removed.
[0066] For the center circle, middle ring, and outer ring regions, in the L channel image, add the brightness values of all pixels within each region and divide by the total number of pixels in the region to obtain the average brightness of the region, which is used as the regional brightness. When calculating regional brightness, ensure that the boundaries of the mask image are processed correctly to avoid incorrect calculation of boundary pixels. The gradient change rate of brightness of adjacent regions can be calculated using the following formula:
[0067] For the center circle and the middle ring, the gradient change rate is G cm ; For the middle ring and the outer ring, the gradient change rate is G mo :
[0068]
[0069] Where B c 、B m 、B oThey are the brightness of the central circle, the brightness of the middle ring and the brightness of the outer ring.
[0070] Finally, threshold judgment is adopted to set the preset difference ΔB and the preset change rate ΔG. c -B m |>ΔB, or |B m -B o |>ΔB; or G cm >ΔG, or G mo When >ΔG, the corresponding flexible LED filament will be removed.
[0071] S40. Based on the ab channel images of the remaining flexible LED filaments, calculate the Mahalanobis distance between the chromaticity coordinates and the standard value. When the Mahalanobis distance exceeds the distance tolerance, remove the corresponding flexible LED filaments, and mark all the remaining flexible LED filaments as qualified products.
[0072] In step S10, the ab channel image has been obtained. For the remaining ab channel image area corresponding to each flexible LED filament, its chromaticity coordinates need to be extracted. The a and b channel values of all pixels in the area can be counted separately. The average a channel value and the average b channel value of all pixels in the area are calculated respectively, and the average a channel value and b channel value of all pixels in the area are used as the chromaticity coordinates of the filament. The standard chromaticity coordinates can be obtained by testing a large number of qualified flexible LED filaments and statistically obtaining the average a and b channel values, which are recorded as (a0, b0). Calculate the covariance matrix with the standard chromaticity coordinates (a0, b0), and use the Mahalanobis distance formula to calculate the Mahalanobis distance D m .
[0073] According to the product quality requirements and actual production conditions, a distance tolerance ΔD is set. When the calculated Mahalanobis distance D M If the value is greater than ΔD, the corresponding flexible LED filament will be discarded; otherwise, it will be retained and all the remaining flexible LED filaments will be marked as qualified.
[0074] In one embodiment, when calculating the chromaticity coordinates, different weights may be assigned to pixels at different positions. For example, pixels closer to the center have higher weights, which can highlight the chromaticity influence of the central area.
[0075] In summary, the image processing-based flexible LED filament power-on detection method proposed in this embodiment converts the RGB image into Lab color space and extracts the L channel and ab channel images separately, achieving a refined analysis of brightness and chromaticity. By performing binary segmentation, denoising, and smoothing on the L channel image, the brightness area of the filament is accurately obtained, and unqualified filaments are screened using preset area intervals. The remaining connected domain is further divided into concentric annular regions, and the brightness and gradient change rate of each region are calculated to effectively identify filaments with abnormal brightness distribution. Simultaneously, the Mahalanobis distance between the chromaticity coordinates and the standard value is calculated based on the ab channel images to ensure chromaticity consistency. This solution uses multi-dimensional image processing technology to address the problems of insufficient precision and single indicators in existing detection methods, achieving a comprehensive assessment of the brightness uniformity and chromaticity consistency of flexible LED filaments. The automated image processing process not only improves detection efficiency, but also reduces manual intervention and subjective errors. In addition, this method can effectively eliminate filaments whose brightness or chromaticity does not meet the standards, thereby improving product quality and providing reliable quality assurance for the large-scale production and application of flexible LED filaments.
[0076] See also Figure 2 In one embodiment, the binary segmentation of the L channel image includes using a dynamic threshold method to perform binary segmentation on the L channel image, including:
[0077] S101, obtaining the ambient light intensity and the transmittance of the flexible LED filament adhesive layer, calculating a global threshold based on the ambient light intensity, transmittance, and calibration coefficient; dividing the L channel image into multiple sub-regions, and calculating the local brightness mean of each sub-region;
[0078] S102, calculating the brightness ratio of the local brightness mean to the global brightness mean, determining whether the brightness ratio exceeds a preset ratio, and when the brightness ratio exceeds the preset ratio, multiplying the current global threshold by the brightness ratio to dynamically update the global threshold;
[0079] S103, performing binary segmentation on the L channel image according to the dynamically updated global threshold, and calculating the error rate of the segmentation result. When the error rate exceeds a preset limit, the calibration coefficient is optimized by the gradient descent method to feedback and adjust the global threshold.
[0080] Specifically, the method includes the following steps:
[0081] 1) Obtain the ambient light intensity E in real time through the ambient light sensor, and obtain the transmittance parameter P through the reflectivity detection of the adhesive layer or pre-stored batch data;
[0082] 2) Calculate the global threshold T based on the formula T = αE + βP + γ, where α, β, and γ are pre-calibrated coefficients;
[0083] 3) Divide the image into multiple sub-regions and calculate the local brightness mean of each sub-region;
[0084] 4) If the difference between the local brightness mean of the sub-region and the global brightness mean exceeds a preset ratio, the ratio of the local brightness mean of the sub-region to the global brightness mean is calculated, and then this ratio is multiplied by the global threshold T to adjust the sub-region threshold;
[0085] 5) Perform binary segmentation on the image based on the dynamic threshold and calculate the error rate in the segmentation results;
[0086] 6) If the misjudgment rate exceeds the limit, α, β, and γ are optimized online through the gradient descent method to update the global threshold formula.
[0087] This implementation dynamically adjusts thresholds based on feedback from ambient light and the transmittance of the adhesive layer, adapting to lighting fluctuations and material differences in the workshop. Parameters are continuously optimized based on feedback from false positive rates, improving long-term stability. By integrating multi-source data and locally adaptive thresholds, this approach overcomes the failure of traditional methods in dynamic environments, achieving both robustness and real-time performance, making it suitable for high-precision industrial LED inspection scenarios.
[0088] See also Figure 3 In one embodiment, before converting the RGB image to the Lab color space, the method further includes:
[0089] S01, divide the RGB image into pixel grids and calculate the local entropy of the grid;
[0090] S02. Construct an entropy distribution matrix based on the local entropy of the grid, detect abnormal areas based on the entropy distribution matrix, identify the flexible LED filaments corresponding to the abnormal areas, and remove them.
[0091] Specifically, the RGB image is segmented into multiple non-overlapping pixel grids, each consisting of a certain number of pixels. For each grid, the entropy of its pixel values is calculated. Entropy measures the information richness of a local area in the image; higher entropy values indicate more complex pixel values in that area. Furthermore, the local entropy values of each grid are stored in a matrix to form an entropy distribution matrix. Based on the entropy distribution matrix, an entropy threshold is set, and regions with entropy values exceeding this threshold are identified as abnormal regions. The flexible LED filaments corresponding to these abnormal regions are then identified and removed from subsequent processing.
[0092] In this embodiment, by dividing the RGB image into a pixel grid and calculating local entropy, the complexity of local areas of the image can be sensitively captured. Regions with higher entropy values typically indicate a higher likelihood of discrete pixel value distributions, noise, or defects such as impurities, cracks, and poor welds. By setting a threshold based on the entropy distribution matrix, abnormal regions can be accurately identified and their corresponding flexible LED filaments can be preemptively removed. This prevents abnormal filaments from introducing interference in subsequent L-channel and ab-channel analysis, thereby improving the accuracy of the overall detection process.
[0093] See also Figure 4 In one embodiment, after marking all remaining flexible LED filaments as qualified products, the method further includes:
[0094] S50, marking all rejected flexible LED filaments as defective products and matching recycling strategies according to defect types;
[0095] During the inspection process, the defect type of each rejected flexible LED filament (such as abnormal brightness area, uneven brightness distribution, color deviation, etc.) is recorded and a defect type database is established. According to the preset recycling rules, the defect type is associated with the recycling strategy. For example:
[0096] Repairable defects (such as local uneven brightness): Marked as pending repair and enter the rework process.
[0097] Unrepairable defects (such as severe color deviation): Disassemble and recycle according to the material type (such as metal, plastic).
[0098] Scrap defects (such as base breakage): directly enter the scrap processing process.
[0099] S60, obtaining a brightness area index, a brightness distribution index, and a color state index of each flexible LED filament among qualified products, and determining a quality assessment result of the flexible LED filament by weighted summing of the various indexes;
[0100] Brightness area index: The brightness area of the qualified filament is obtained from step S20 and normalized as an index.
[0101] Brightness distribution index: Calculate the uniformity score based on the regional brightness difference and gradient change rate in step S30.
[0102] Color state index: The Mahalanobis distance of the chromaticity coordinates obtained from step S40 is normalized and used as an index.
[0103] Assign weights to each indicator based on product requirements, such as 40% for brightness area, 30% for brightness distribution, and 30% for color state; perform weighted summation of each indicator to obtain a comprehensive quality score.
[0104] S70. Determine the quality level of each qualified product based on the quality assessment results, and match different usage strategies according to different quality levels.
[0105] Finally, set grading standards based on the quality assessment scores, such as:
[0106] Excellent (90-100 points): used for high-end lighting products;
[0107] Good (80-89 points): used for general lighting products;
[0108] Pass (70-79 points): used for scenarios with lower accuracy requirements;
[0109] Qualified products are allocated to different production links or market channels according to their grades. For example, high-quality products are supplied first to high-value-added customers; qualified products are used for cost-sensitive projects.
[0110] This embodiment, by classifying defect types and matching recycling strategies, can target defective products for repair, material recovery, or scrapping, reducing resource waste and aligning with the concept of green manufacturing. Data feedback is provided for production process improvements, such as high-frequency defect types, to guide production line optimization. Quality grading helps rationally allocate resources, matching high-quality products with high-value applications, and improving overall economic efficiency.
[0111] See also Figure 5 In one embodiment, the present invention further provides a flexible LED filament power-on detection system based on image processing, the system comprising:
[0112] The power-on image segmentation module 100 is used to collect RGB images of the light-emitting points of multiple flexible LED filaments after power-on, convert the RGB images to Lab color space, and extract L channel images and ab channel images respectively; perform binary segmentation, denoising, and edge smoothing on the L channel image to obtain a binary mask image of each flexible LED filament;
[0113] The luminance area detection module 200 is used to identify independent luminous points in the binary mask image and mark connected domains. After traversing each connected domain, the total number of pixels is obtained as the luminance area. Flexible LED filaments with luminance areas outside a preset area range are removed, and the remaining connected domains are divided into concentric annular regions to obtain the central circle, middle ring, and outer ring regions.
[0114] The brightness distribution detection module 300 is used to calculate the gradient change rate of the brightness of each area and the brightness of adjacent areas; when the difference between the brightness of the central circle and the brightness of the middle ring or the brightness of the outer ring exceeds a preset difference, or the gradient change rate of the brightness exceeds a preset change rate, the corresponding flexible LED filament is removed.
[0115] The luminous color detection module 400 is used to calculate the Mahalanobis distance between the chromaticity coordinates and the standard value based on the ab channel images of the remaining flexible LED filaments. When the Mahalanobis distance exceeds the distance tolerance, the corresponding flexible LED filament is eliminated, and all remaining flexible LED filaments are marked as qualified.
[0116] See also Figure 6 In one embodiment, the powered image segmentation module 100 further includes:
[0117] The local brightness calculation unit 101 is used to obtain the ambient light intensity and the transmittance of the flexible LED filament adhesive layer, calculate the global threshold based on the ambient light intensity, transmittance and calibration coefficient; divide the L channel image into multiple sub-regions, and calculate the local brightness mean of each sub-region;
[0118] A global threshold updating unit 102 is configured to calculate a brightness ratio between a local brightness mean and a global brightness mean, determine whether the brightness ratio exceeds a preset ratio, and when the brightness ratio exceeds the preset ratio, multiply the current global threshold by the brightness ratio to dynamically update the global threshold;
[0119] The calibration coefficient optimization unit 103 is used to perform binary segmentation on the L channel image according to the dynamically updated global threshold, and to calculate the error rate of the segmentation result. When the error rate exceeds the preset limit, the calibration coefficient is optimized by the gradient descent method to feedback and adjust the global threshold.
[0120] See also Figure 7 In one embodiment, the powered image segmentation module 100 further includes:
[0121] A pixel grid division unit 104 is used to divide the RGB image into a pixel grid and calculate the local entropy of the grid before converting the RGB image to the Lab color space;
[0122] The abnormal area detection unit 105 is used to construct an entropy distribution matrix based on the local entropy of the grid, detect abnormal areas based on the entropy distribution matrix, identify the flexible LED filaments corresponding to the abnormal areas, mark them as unqualified products and remove them.
[0123] See also Figure 8 In one embodiment, the system further comprises a quality assessment module 500 for:
[0124] Mark all rejected flexible LED filaments as defective and match recycling strategies based on defect types;
[0125] Obtain the brightness area index, brightness distribution index, and color state index of each flexible LED filament among qualified products, and determine the quality assessment result of the flexible LED filament by weighted summation of each index;
[0126] The quality level of each qualified product is determined based on the quality assessment results, and different usage strategies are matched according to different quality levels.
[0127] It can be understood that the functions or modules included in the system provided in this embodiment can be used to execute the method described in the above method embodiment. Its specific implementation can refer to the description of the above method embodiment. For the sake of brevity, it will not be repeated here.
[0128] The present invention also provides an electronic device, including a processor and a memory, wherein the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes a method as described in any one of the possible implementation modes.
[0129] The present invention also provides a computer-readable storage medium, in which a computer program is stored. The computer program includes program instructions. When the program instructions are executed by a processor of an electronic device, the processor executes a method as described in any one of the possible implementation methods described above.
[0130] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0131] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here. Those skilled in the art will also clearly understand that the descriptions of the various embodiments of the present invention have different focuses. For the convenience and brevity of description, the same or similar parts may not be repeated in different embodiments. Therefore, for parts not described or not described in detail in one embodiment, reference can be made to the descriptions of other embodiments.
Claims
1. A flexible LED filament power-on detection method based on image processing, characterized in that: The method comprises: The RGB images of the luminous points of multiple flexible LED filaments after power-on were collected, and the RGB images were converted to Lab color space. The L channel image and the ab channel image were extracted respectively. The L channel image was subjected to binary segmentation, denoising, and edge smoothing to obtain a binary mask image of each flexible LED filament. Identify independent luminous points in the binary mask image and mark connected domains. After traversing each connected domain, obtain the total number of pixels as the brightness area. Remove flexible LED filaments whose brightness areas are outside the preset area range, and segment the remaining connected domains into concentric annular regions to obtain the central circle, middle ring, and outer ring regions. Calculate the brightness of each area and the gradient change rate of the brightness of adjacent areas; when the difference between the brightness of the central circle and the brightness of the middle ring or the brightness of the outer ring exceeds the preset difference, or the gradient change rate of the brightness exceeds the preset change rate, the corresponding flexible LED filament will be removed; Based on the ab channel images of the remaining flexible LED filaments, the Mahalanobis distance between the chromaticity coordinates and the standard value is calculated. When the Mahalanobis distance exceeds the distance tolerance, the corresponding flexible LED filament is eliminated, and all the remaining flexible LED filaments are marked as qualified.
2. The flexible LED filament power-on detection method based on image processing according to claim 1, characterized in that: The binary segmentation of the L channel image includes adopting a dynamic threshold method to perform binary segmentation on the L channel image, including: Obtain the ambient light intensity and the transmittance of the flexible LED filament adhesive layer, and calculate the global threshold based on the ambient light intensity, transmittance, and calibration coefficient. Segment the L channel image into multiple sub-regions and calculate the local brightness mean of each sub-region. Calculate the brightness ratio of the local brightness mean to the global brightness mean, determine whether the brightness ratio exceeds a preset ratio, and when the brightness ratio exceeds the preset ratio, multiply the current global threshold by the brightness ratio to dynamically update the global threshold; The L channel image is binary segmented according to the dynamically updated global threshold, and the error rate of the segmentation result is counted. When the error rate exceeds the preset limit, the calibration coefficient is optimized by the gradient descent method to feedback and adjust the global threshold.
3. The flexible LED filament power-on detection method based on image processing according to claim 1, characterized in that: Before converting the RGB image to the Lab color space, the following steps are also included: Divide the RGB image into a pixel grid and calculate the local entropy of the grid; An entropy distribution matrix is constructed according to the local entropy of the grid. Abnormal areas are detected according to the entropy distribution matrix, and the flexible LED filaments corresponding to the abnormal areas are identified and removed.
4. The flexible LED filament power-on detection method based on image processing according to any one of claims 1 to 3, characterized in that: After marking all remaining flexible LED filaments as qualified products, the following steps are also included: Mark all rejected flexible LED filaments as defective and match recycling strategies based on defect types; Obtain the brightness area index, brightness distribution index, and color state index of each flexible LED filament among qualified products, and determine the quality assessment result of the flexible LED filament by weighted summation of each index; The quality level of each qualified product is determined based on the quality assessment results, and different usage strategies are matched according to different quality levels.
5. A flexible LED filament power-on detection system based on image processing, characterized in that: The system comprises: The power-on image segmentation module is used to collect RGB images of the luminous points of multiple flexible LED filaments after power-on, convert the RGB images to Lab color space, and extract the L channel image and ab channel images respectively. The L channel image is subjected to binary segmentation, denoising, and edge smoothing processing to obtain a binary mask image of each flexible LED filament. The luminance area detection module is used to identify independent luminous points in the binary mask image and mark connected domains. After traversing each connected domain, the total number of pixels is obtained as the luminance area. Flexible LED filaments with luminance areas outside the preset area range are eliminated, and the remaining connected domains are divided into concentric annular regions to obtain the central circle, middle ring, and outer ring regions. The brightness distribution detection module is used to calculate the brightness of each area and the gradient change rate of the brightness of adjacent areas. When the difference between the brightness of the central circle and the brightness of the middle ring or the brightness of the outer ring exceeds a preset difference, or the gradient change rate of the brightness exceeds a preset change rate, the corresponding flexible LED filament is removed. The luminous color detection module is used to calculate the Mahalanobis distance between the chromaticity coordinates and the standard value based on the ab channel images of the remaining flexible LED filaments. When the Mahalanobis distance exceeds the distance tolerance, the corresponding flexible LED filament is eliminated and all the remaining flexible LED filaments are marked as qualified.
6. The flexible LED filament power-on detection system based on image processing according to claim 5, characterized in that: The power-on image segmentation module further includes: The local brightness calculation unit is used to obtain the ambient light intensity and the transmittance of the flexible LED filament adhesive layer, and calculate the global threshold based on the ambient light intensity, transmittance and calibration coefficient; the L channel image is divided into multiple sub-regions, and the local brightness mean of each sub-region is calculated; A global threshold updating unit is used to calculate the brightness ratio of the local brightness mean to the global brightness mean, determine whether the brightness ratio exceeds a preset ratio, and when the brightness ratio exceeds the preset ratio, multiply the current global threshold by the brightness ratio to dynamically update the global threshold; The calibration coefficient optimization unit is used to perform binary segmentation on the L channel image according to the dynamically updated global threshold, and to calculate the error rate of the segmentation result. When the error rate exceeds the preset limit, the calibration coefficient is optimized by the gradient descent method to feedback and adjust the global threshold.
7. The flexible LED filament power-on detection system based on image processing according to claim 5, characterized in that: The power-on image segmentation module further includes: A pixel grid division unit is used to divide the RGB image into a pixel grid and calculate the local entropy of the grid before converting the RGB image to the Lab color space; The abnormal area detection unit is used to construct an entropy distribution matrix based on the local entropy of the grid, detect abnormal areas based on the entropy distribution matrix, identify the flexible LED filaments corresponding to the abnormal areas, mark them as unqualified products and remove them.
8. The flexible LED filament power-on detection system based on image processing according to any one of claims 5 to 7, characterized in that: The system further comprises a quality assessment module for: Mark all rejected flexible LED filaments as defective and match recycling strategies based on defect types; Obtain the brightness area index, brightness distribution index, and color state index of each flexible LED filament among qualified products, and determine the quality assessment result of the flexible LED filament by weighted summation of each index; The quality level of each qualified product is determined based on the quality assessment results, and different usage strategies are matched according to different quality levels.
9. An electronic device, characterized in that: include: A processor and a memory, the memory being used to store computer program code, the computer program code including computer instructions, and when the processor executes the computer instructions, the electronic device executes the flexible LED filament power-on detection method based on image processing as described in any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor of an electronic device, the processor executes the flexible LED filament power-on detection method based on image processing according to any one of claims 1 to 4.
Citation Information
Patent Citations
Method for detecting dirt on lens of camera module
CN112583999A
Damper fault detection method and system based on intelligent pattern recognition
CN114581692A
LED lamp bead detection method and device, equipment and storage medium
CN118470030A
Edge gradient detection method, stain defect detection method, edge gradient detection device and stain defect detection device
JP2007172397A