A flexible LED filament power-on detection method and system based on image processing
By using image processing-based methods to perform multi-dimensional evaluation of flexible LED filaments, the problems of insufficient accuracy and single index in existing detection methods are solved, achieving efficient and accurate quality detection and improving the brightness uniformity and color consistency of flexible LED filaments.
Patent Information
- Application Number
- CN202510583312.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2045-05-07
AI Technical Summary
Existing methods for quality inspection of flexible LED filaments rely on manual or simple visual processing, resulting in low accuracy, low efficiency, and inconsistent test results, making it difficult to meet the requirements for high-precision quality control.
Using an image processing-based approach, the RGB image is converted to the Lab color space, and the L and ab channels are extracted. Binary segmentation, denoising, and smoothing are then performed. The brightness area and gradient change rate are calculated, and the Mahalanobis distance of the chromaticity coordinates are combined to achieve a multi-dimensional evaluation of flexible LED filaments.
It improves detection accuracy and efficiency, reduces human intervention, lowers subjective errors, ensures brightness uniformity and color consistency, enhances product quality, and provides reliable quality assurance for large-scale production.
Smart Images

Figure CN120495230B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of LED power-on detection technology, and in particular to a method and system for power-on detection of flexible LED filaments based on image processing. Background Technology
[0002] Flexible LED filaments are a new type of lighting element that uses flexible materials as a substrate to integrate LED chips or light-emitting units onto a bendable, foldable strip or wire structure. Currently, quality inspection methods for flexible LED filaments often rely on manual labor or simple visual processing. For example, if a spot is not lit or has a dark spot, it is immediately marked as a defective product, while filaments that emit light normally are marked as acceptable. Clearly, this inspection method is based on a single indicator of the light-emitting point, resulting in low accuracy and failing to meet the demands of high-precision quality control. Furthermore, this method, which relies heavily on manual inspection, generally suffers from low efficiency and inconsistent test results. Summary of the Invention
[0003] To address at least one of the aforementioned technical problems, this invention provides a method and system for detecting the power-on of flexible LED filaments based on image processing.
[0004] In a first aspect, the present invention provides a method for detecting the power-on of a flexible LED filament based on image processing, the method comprising:
[0005] RGB images of the light-emitting points of multiple flexible LED filaments after power-on were acquired, and the RGB images were converted to the Lab color space. The L channel image and ab channel image were extracted respectively. The L channel image was subjected to binary segmentation, noise reduction and edge smoothing to obtain the binary mask image of each flexible LED filament.
[0006] Identify independent light-emitting points in the binary mask image and mark connected components. After traversing each connected component, obtain the total number of pixels as the brightness area. Remove flexible LED filaments whose brightness area is outside the preset area range. Divide the remaining connected components into concentric ring regions to obtain the central circle, middle ring and outer ring regions.
[0007] Calculate the brightness of each region and the gradient change rate of the brightness of adjacent regions; when the difference between the brightness of the center 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 brightness exceeds the preset change rate, the corresponding flexible LED filament is discarded.
[0008] Based on the ab channel image 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 removed, and all the remaining flexible LED filaments are marked as qualified products.
[0009] Preferably, the binary segmentation of the L-channel image includes performing binary segmentation of the L-channel image using a dynamic thresholding method, including:
[0010] The ambient light intensity and the transmittance of the flexible LED filament adhesive layer are obtained. The global threshold is calculated based on the ambient light intensity, transmittance, and calibration coefficient. The L-channel image is divided into multiple sub-regions, and the local brightness average of each sub-region is calculated.
[0011] Calculate the ratio of the local average brightness to the global average brightness, determine whether the ratio exceeds a preset value, and when the ratio exceeds the preset value, multiply the current global threshold by the brightness ratio to dynamically update the global threshold.
[0012] The L-channel image is binary segmented based on the dynamically updated global threshold. The misclassification rate of the segmentation results is calculated. When the misclassification rate exceeds the preset limit, the calibration coefficient is optimized by gradient descent to adjust the global threshold.
[0013] Preferably, before converting the RGB image to the Lab color space, the method further includes:
[0014] Divide the RGB image into a pixel grid and calculate the local entropy of the grid;
[0015] An entropy distribution matrix is constructed based on the local entropy of the grid. Abnormal regions are detected based on the entropy distribution matrix, and the flexible LED filaments corresponding to the abnormal regions are identified and removed.
[0016] Preferably, after marking all remaining flexible LED filaments as qualified products, the method further includes:
[0017] All rejected flexible LED filaments are marked as non-conforming products, and a recycling strategy is matched according to the type of defect.
[0018] Obtain the brightness area index, brightness distribution index, and color state index of each flexible LED filament in the qualified products, and determine the quality assessment result of the flexible LED filament by weighted summation of each index;
[0019] The quality grade of each qualified product is determined based on the quality assessment results, and different usage strategies are matched according to different quality grades.
[0020] Secondly, the present invention also provides an image processing-based flexible LED filament power-on detection system, the system comprising:
[0021] The power-on image segmentation module is used to acquire RGB images of the light-emitting points of multiple flexible LED filaments after power-on, convert the RGB images to the Lab color space, and extract the L channel image and ab channel image respectively; perform binary segmentation, noise reduction and edge smoothing processing on the L channel image to obtain the binary mask image of each flexible LED filament;
[0022] The brightness area detection module is used to identify independent light-emitting points in the binary mask image and mark connected regions. After traversing each connected region, the total number of pixels is obtained as the brightness area. Flexible LED filaments whose brightness area is outside the preset area range are removed. The remaining connected regions are divided into concentric ring regions to obtain the central circle, the middle ring and the outer ring region.
[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 center 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 brightness exceeds the preset change rate, the corresponding flexible LED filament is discarded.
[0024] The emission color detection module is used to calculate the Mahalanobis distance between the chromaticity coordinates and the standard value based on the ab channel image of the remaining flexible LED filaments. When the Mahalanobis distance exceeds the distance tolerance, the corresponding flexible LED filament is removed, and all the remaining flexible LED filaments are marked as qualified products.
[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 average of each sub-region is calculated;
[0027] The global threshold update unit is used to calculate the brightness ratio between the local average brightness and the global average brightness, determine whether the brightness ratio exceeds the 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 based on the dynamically updated global threshold, and to calculate the misclassification rate of the segmentation results. When the misclassification rate exceeds the preset limit, the calibration coefficient is optimized by gradient descent method to adjust the global threshold in response to feedback.
[0029] Preferably, the power-on image segmentation module further includes:
[0030] Pixel grid division unit is used to divide the RGB image into a pixel grid before converting the RGB image to the Lab color space and to calculate the local entropy of the grid;
[0031] The abnormal region detection unit is used to construct an entropy distribution matrix based on the local entropy of the grid, and to detect abnormal regions based on the entropy distribution matrix; it identifies the flexible LED filaments corresponding to the abnormal regions, marks them as unqualified products, and removes them.
[0032] Preferably, the system further includes a quality assessment module for:
[0033] All rejected flexible LED filaments are marked as non-conforming products, and a recycling strategy is matched according to the type of defect.
[0034] Obtain the brightness area index, brightness distribution index, and color state index of each flexible LED filament in the qualified products, and determine the quality assessment result of the flexible LED filament by weighted summation of each index;
[0035] The quality grade of each qualified product is determined based on the quality assessment results, and different usage strategies are matched according to different quality grades.
[0036] Thirdly, the present invention also provides an electronic device including a processor and a memory, the memory being used to store computer program code, the computer program code including computer instructions, wherein when the processor executes the computer instructions, the electronic device performs a method as described in the first aspect above and any possible implementation thereof.
[0037] Fourthly, the present invention also provides a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor of an electronic device, cause the processor to perform a method as described in the first aspect above and any possible implementation thereof.
[0038] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0039] This invention proposes an image processing-based method for detecting the power-on state of flexible LED filaments. This method converts RGB images to the Lab color space and extracts the L and ab channels, enabling 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 substandard filaments are filtered out using preset area ranges. Furthermore, the remaining connected components are divided into concentric ring 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 standard values is calculated based on the ab channel images to ensure chromaticity consistency. This scheme, through multi-dimensional image processing technology, solves the problems of insufficient accuracy and single indicator in existing detection methods, achieving a comprehensive evaluation of the brightness uniformity and chromaticity consistency of flexible LED filaments. The automated image processing workflow not only improves detection efficiency but also reduces manual intervention and subjective errors. In addition, this method can effectively eliminate filaments with brightness or chromaticity that do not meet standards, thereby improving product quality and providing reliable quality assurance for the large-scale production and application of flexible LED filaments.
[0040] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the background art, the accompanying drawings used in the embodiments of the present invention or the background art will be described below.
[0042] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the specification, serve to illustrate the technical solutions of this disclosure.
[0043] Figure 1 A flowchart illustrating a flexible LED filament power-on detection method based on image processing, provided in an embodiment of the present invention;
[0044] Figure 2 for Figure 1 A flowchart illustrating a sub-step of step S10;
[0045] Figure 3 for Figure 1 A flowchart illustrating another seed step in step S10;
[0046] Figure 4 A flowchart illustrating another image processing-based method for detecting the power-on of a flexible LED filament, provided in an embodiment of the present invention;
[0047] Figure 5A schematic diagram of a flexible LED filament power-on detection system based on image processing is provided in an embodiment of the present invention;
[0048] Figure 6 for Figure 5 A schematic diagram of the structure of a submodule of the image segmentation module 100;
[0049] Figure 7 for Figure 5 A schematic diagram of the structure of another seed module of the image segmentation module 100;
[0050] Figure 8 This is a schematic diagram of another flexible LED filament power-on detection system based on image processing, provided as an embodiment of the present invention. Detailed Implementation
[0051] To enable those skilled in the art to better understand the present invention, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0052] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0053] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0054] Please see Figure 1 , Figure 1 This is a flowchart illustrating a flexible LED filament power-on detection method based on image processing, provided as an embodiment of the present invention. Figure 1 As shown, a method for detecting the power-on of a flexible LED filament based on image processing includes the following steps:
[0055] S10. Acquire 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 the L channel image and ab channel image respectively; perform binary segmentation, noise reduction and edge smoothing processing on the L channel image to obtain the binary mask image of each flexible LED filament.
[0056] When acquiring RGB images, a high-resolution industrial camera is used in conjunction with a uniform light source to ensure that the image of the light-emitting point of the flexible LED filament is clear and shadow-free after being powered on. The camera exposure time and aperture size are adjusted to avoid overexposure or underexposure. For the bending or deformed shape of the flexible LED filament, multi-angle imaging or dynamic acquisition can be used. In addition, polarizing filters can be introduced to reduce reflections, or dark field illumination can be used to enhance contrast.
[0057] After obtaining the RGB image, convert the RGB image to the Lab color space and extract the L channel image and ab channel images respectively. The reason for converting the RGB image to the Lab color space instead of the HSV color space is that the luminance channel L and the chrominance channels a and b are completely decoupled in the Lab color space, which is more suitable for independent analysis of luminance uniformity and chrominance consistency.
[0058] Furthermore, the L-channel image undergoes preprocessing, including the following steps:
[0059] Binary segmentation: Thresholding segmentation typically includes global thresholding and adaptive thresholding. Global thresholding methods, such as the Otsu algorithm, can automatically calculate the optimal threshold, dividing the L-channel image into foreground (light-emitting points) and background. Adaptive thresholding, on the other hand, can dynamically adjust the threshold based on the brightness of local areas of the image, making it suitable for scenes with uneven lighting.
[0060] Noise reduction: Median filtering or Gaussian filtering is used. Median filtering replaces the current pixel value with the median of the pixel's neighborhood, effectively removing salt-and-pepper noise; Gaussian filtering smooths the image through Gaussian kernel convolution, reducing Gaussian noise.
[0061] Edge smoothing can be achieved through morphological operations or smoothing after edge detection. Morphological operations are used to perform dilation, erosion, and opening / closing operations on binary mask images to eliminate small noise points and smooth edges. Smoothing after edge detection first uses edge detection algorithms such as Canny to locate edges, and then smooths the edges through polynomial fitting or spline interpolation.
[0062] S20. Identify independent light-emitting points in the binary mask image and mark connected components. After traversing each connected component, obtain the total number of pixels as the brightness area. Remove the flexible LED filaments whose brightness area is outside the preset area range. Divide the remaining connected components into concentric ring regions to obtain the central circle, middle ring and outer ring regions.
[0063] Using connected component labeling algorithms in image morphology, such as four-neighbor or eight-neighbor connectivity analysis, information such as the position, area, and centroid of connected components can be obtained simultaneously, making it suitable for fast processing. For scenarios involving curved or densely arranged flexible LED filaments, connectivity rules (such as eight-neighbor) can be adjusted to avoid missegmentation; if the spacing between light-emitting points is large, four-neighbor can be used to improve efficiency. The labels of each connected component are traversed, and the number of corresponding pixels is counted as the luminance area. Minimum and maximum area thresholds are set according to filament design standards, and filaments with abnormal areas are removed.
[0064] For the flexible LED filaments that were not removed, the remaining connected regions are divided into concentric annular regions, resulting in a central circle, an intermediate ring, and an outer ring. The brightness of each region and the gradient rate of change of brightness between adjacent regions are then calculated. Specifically, during cutting, the centroid of the connected region is used as the center of the circle, or a more precise center is obtained by fitting the minimum circumcircle. Based on the width and height of the connected region, 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%, generating a central circle (radius ≤ 20%), an intermediate ring (20% < radius ≤ 60%), and an outer ring (60% < radius ≤ 100%). It is understandable that the proportions can be dynamically adjusted according to the shape complexity of the connected regions; for example, ellipses can be used instead of circles to divide elongated connected regions. Alternatively, the region can be divided into more sub-rings (such as quartering) for a more detailed analysis of the brightness distribution; no limitations are imposed here.
[0065] S30. Calculate the brightness of each region and the gradient change rate of the brightness of adjacent regions; when the difference between the brightness of the center 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 brightness exceeds the preset change rate, the corresponding flexible LED filament is removed.
[0066] For the central circle, middle ring, and outer ring regions, in the L-channel image, the brightness values of all pixels within each region are summed, and then divided by the total number of pixels in that region to obtain the average brightness of that region, which is taken as the region brightness. When calculating the region brightness, it is crucial to ensure correct boundary processing of the mask image to avoid errors in boundary pixel calculation. The gradient rate of change of brightness between adjacent regions can be calculated using the following formula:
[0067] For the central circle and the intermediate ring, the gradient change rate is G. cm For the middle loop and the outer loop, the gradient change rate is G. mo :
[0068]
[0069] In the formula, B c B m B oThese are the brightness of the center circle, the brightness of the middle ring, and the brightness of the outer ring.
[0070] Finally, a threshold judgment is used, setting a preset difference ΔB and a preset rate of change ΔG. When |B c -B m |>ΔB, or |B m -B o |>ΔB; or G cm >ΔG, or G mo When the value is greater than ΔG, the corresponding flexible LED filament is removed.
[0071] S40. Based on the ab channel image 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, the corresponding flexible LED filament is removed, and all remaining flexible LED filaments are marked as qualified products.
[0072] In step S10, the ab channel images have been obtained. For the remaining ab channel image regions corresponding to each flexible LED filament, their chromaticity coordinates need to be extracted. This can be done by statistically analyzing the a and b channel values of all pixels within that region. The average a channel value and the average b channel value of all pixels within that region are then calculated and used as the chromaticity coordinates of the filament. Standard chromaticity coordinates can be obtained by testing a large number of qualified flexible LED filaments and statistically analyzing the average a and b channel values, denoted as (a0, b0). Then, based on the collected chromaticity coordinates... Calculate the covariance matrix using the standard chromaticity coordinates (a0, b0), and then calculate the Mahalanobis distance D using the Mahalanobis distance formula. m .
[0073] Based on the product's 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 is discarded; otherwise, it is retained, and all remaining flexible LED filaments are marked as qualified products.
[0074] In one embodiment, when calculating chromaticity coordinates, different weights can be assigned to pixels at different locations. For example, pixels closer to the center have higher weights, which can highlight the chromaticity influence of the central region.
[0075] In summary, the image processing-based power-on detection method for flexible LED filaments proposed in this embodiment achieves refined analysis of brightness and chromaticity by converting RGB images to the Lab color space and extracting L-channel and ab-channel images respectively. 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 filtered out using preset area ranges. Furthermore, the remaining connected components are divided into concentric ring 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 image to ensure chromaticity consistency. This scheme, through multi-dimensional image processing technology, solves the problems of insufficient accuracy and single indicator in existing detection methods, achieving a comprehensive evaluation of the brightness uniformity and chromaticity consistency of flexible LED filaments. The automated image processing workflow not only improves detection efficiency but also reduces manual intervention and subjective errors. In addition, this method can effectively eliminate filaments with brightness or chromaticity that do 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 Figure 2 In one embodiment, the binary segmentation of the L-channel image includes performing binary segmentation of the L-channel image using a dynamic thresholding method, comprising:
[0077] S101. 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; divide the L-channel image into multiple sub-regions and calculate the local brightness average of each sub-region.
[0078] S102. Calculate the brightness ratio between the local average brightness and the global average brightness, and determine whether the brightness ratio exceeds the preset ratio. When the brightness ratio exceeds the preset ratio, multiply the current global threshold by the brightness ratio and dynamically update the global threshold.
[0079] S103. Perform binary segmentation on the L-channel image based on the dynamically updated global threshold, and calculate the misclassification rate of the segmentation results. When the misclassification rate exceeds the preset limit, optimize the calibration coefficient using the gradient descent method to adjust the global threshold in response to feedback.
[0080] Specifically, it includes the following steps:
[0081] 1) The ambient light intensity E is obtained in real time by an ambient light sensor, and the transmittance parameter P is obtained by detecting the reflectivity of the adhesive layer or by pre-stored batch data;
[0082] 2) Calculate the global threshold T based on the formula T=αE+βP+γ, where α, β, and γ are pre-calibration coefficients;
[0083] 3) Divide the image into multiple sub-regions and calculate the mean local brightness of each sub-region;
[0084] 4) If the difference between the local average brightness of a sub-region and the global average brightness exceeds a preset ratio, calculate the ratio of the local average brightness of the sub-region to the global average brightness, and then multiply this ratio by the global threshold T to adjust the sub-region threshold.
[0085] 5) Perform binarization segmentation on the image based on the dynamic threshold, and calculate the misclassification rate in the segmentation results;
[0086] 6) If the false positive rate exceeds the limit, optimize α, β, and γ online using the gradient descent method and update the global threshold formula.
[0087] This embodiment dynamically adjusts the threshold based on feedback from ambient light and the transmittance of the adhesive layer, adapting to fluctuations in workshop lighting and material differences. Parameters are continuously optimized based on the false positive rate feedback, improving long-term stability. By fusing multi-source data and employing locally adaptive thresholds, the failure problem of traditional methods in dynamic environments is solved, achieving both robustness and real-time performance, making it suitable for high-precision LED industrial testing scenarios.
[0088] See Figure 3 In one embodiment, prior to converting the RGB image to the Lab color space, the method further includes:
[0089] S01. Divide the RGB image into a pixel grid 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 regions based on the entropy distribution matrix, and identify and remove the flexible LED filaments corresponding to the abnormal regions.
[0091] Specifically, the RGB image is divided into multiple non-overlapping pixel grids, each grid 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 region of the image; the higher the entropy value, the more complex the pixel values in that region. Further, the local entropy values of each grid are stored in a matrix, forming 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 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 image regions can be sensitively captured. Regions with high entropy values usually indicate a higher probability of discrete pixel value distribution, noise, or defects, such as impurities, cracks, or poor welding. By setting a threshold based on the entropy distribution matrix, abnormal regions can be accurately identified, and their corresponding flexible LED filaments can be eliminated in advance. This avoids the introduction of interference from abnormal filaments in subsequent L-channel and ab-channel analysis, thereby improving the accuracy of the overall detection process.
[0093] See Figure 4 In one embodiment, after marking all remaining flexible LED filaments as qualified, the method further includes:
[0094] S50. Mark all rejected flexible LED filaments as non-conforming products and match 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, chromaticity deviation, etc.) is recorded, and a defect type database is established. Based on preset recycling rules, the defect type is associated with the recycling strategy. For example:
[0096] Repairable defects (such as uneven local brightness): marked as to be repaired and enter the rework process.
[0097] Irreversible defects (such as severe color deviation): Dismantle and recycle according to material type (such as metal, plastic).
[0098] Defects that are destined for scrap (such as base fracture): directly proceed to the scrapping process.
[0099] S60. Obtain the brightness area index, brightness distribution index, and color state index of each flexible LED filament in the qualified product, and determine the quality assessment result of the flexible LED filament by weighted summation of each index.
[0100] Brightness area index: Obtain the brightness area of qualified filaments from step S20, normalize it and use it 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: Obtain the Mahalanobis distance of the chromaticity coordinates from step S40, normalize it and use it as the 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 status; then sum the weighted values of each indicator to obtain a comprehensive quality score.
[0104] S70. Determine the quality grade of each qualified product based on the quality assessment results, and match different usage strategies according to different quality grades.
[0105] Finally, grading standards are set based on the quality assessment scores, for example:
[0106] Excellent (90-100 points): Used in high-end lighting products;
[0107] Good (80-89 points): Used in general lighting products;
[0108] Pass (70-79 points): Suitable for scenarios with lower accuracy requirements;
[0109] Qualified products are allocated to different production stages or market channels based on their grade. For example, high-quality products are given priority to high-value-added customers, while qualified products are used for cost-sensitive projects.
[0110] This embodiment, through defect type classification and recycling strategy matching, enables targeted repair, material recycling, or scrapping of non-conforming products, reducing resource waste and aligning with green manufacturing principles. It provides data feedback for production process improvement; for example, frequently occurring defect types can guide production line optimization. The use of quality grading helps in the rational allocation of resources, matching high-quality products with high-value applications and improving overall economic efficiency.
[0111] See Figure 5 In one embodiment, the present invention also provides an image processing-based flexible LED filament power-on detection system, the system comprising:
[0112] The power-on image segmentation module 100 is used to acquire RGB images of the light-emitting points of multiple flexible LED filaments after power-on, convert the RGB images to the Lab color space, and extract the L channel image and ab channel image respectively; perform binary segmentation, noise reduction and edge smoothing processing on the L channel image to obtain the binary mask image of each flexible LED filament.
[0113] The brightness area detection module 200 is used to identify independent light-emitting points in the binary mask image and mark connected regions. After traversing each connected region, the total number of pixels is obtained as the brightness area. Flexible LED filaments whose brightness area is outside the preset area range are removed. The remaining connected regions are divided into concentric ring regions to obtain the central circle, the middle ring and the outer ring region.
[0114] The brightness distribution detection module 300 is used to calculate the brightness of each region and the gradient change rate of brightness in adjacent regions. When the difference between the brightness of the center circle and the brightness of the middle ring or the brightness of the outer ring exceeds a preset difference, or when the gradient change rate of brightness exceeds a preset change rate, the corresponding flexible LED filament is discarded.
[0115] The emission color detection module 400 is used to calculate the Mahalanobis distance between the chromaticity coordinates and the standard value based on the ab channel image of the remaining flexible LED filaments. When the Mahalanobis distance exceeds the distance tolerance, the corresponding flexible LED filament is removed, and all the remaining flexible LED filaments are marked as qualified products.
[0116] See Figure 6 In one embodiment, the power-on 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 average of each sub-region;
[0118] The global threshold update unit 102 is used to calculate the brightness ratio between the local average brightness and the global average brightness, determine whether the brightness ratio exceeds the 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 based on the dynamically updated global threshold, and to calculate the misclassification rate of the segmentation results. When the misclassification rate exceeds the preset limit, the calibration coefficient is optimized by gradient descent method to adjust the global threshold in response to feedback.
[0120] See Figure 7 In one embodiment, the power-on image segmentation module 100 further includes:
[0121] Pixel grid division unit 104 is used to divide the RGB image into a pixel grid before converting the RGB image to the Lab color space and to calculate the local entropy of the grid.
[0122] The abnormal region detection unit 105 is used to construct an entropy distribution matrix based on the local entropy of the grid, detect abnormal regions based on the entropy distribution matrix, identify the flexible LED filaments corresponding to the abnormal regions, mark them as unqualified products and remove them.
[0123] See Figure 8 In one embodiment, the system further includes a quality assessment module 500, used for:
[0124] All rejected flexible LED filaments are marked as non-conforming products, and a recycling strategy is matched according to the type of defect.
[0125] Obtain the brightness area index, brightness distribution index, and color state index of each flexible LED filament in the qualified products, and determine the quality assessment result of the flexible LED filament by weighted summation of each index;
[0126] The quality grade of each qualified product is determined based on the quality assessment results, and different usage strategies are matched according to different quality grades.
[0127] It is understood that the system provided in this embodiment has functions or includes modules that can be used to execute the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and 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, the memory being used to store computer program code, the computer program code including computer instructions, wherein when the processor executes the computer instructions, the electronic device performs a method as described in any of the above possible implementations.
[0129] The present invention also provides a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor of an electronic device, cause the processor to perform a method as described in any of the above possible implementations.
[0130] Those skilled in the art will recognize that the units and algorithm steps of the various examples 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 implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0131] Those skilled in the art will readily understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. Those skilled in the art will also readily understand that the various embodiments of the present invention have different focuses, and for the sake of convenience and brevity, the same or similar parts may not be repeated in different embodiments. Therefore, parts not described or not described in detail in one embodiment can be referred to in other embodiments.
Claims
1. A method for detecting the power-on of a flexible LED filament based on image processing, characterized in that, The method includes: RGB images of the light-emitting points of multiple flexible LED filaments after power-on were acquired, and the RGB images were converted to the Lab color space. The L channel image and ab channel image were extracted respectively. The L channel image was subjected to binary segmentation, noise reduction and edge smoothing to obtain the binary mask image of each flexible LED filament. Identify independent light-emitting points in the binary mask image and mark connected components. After traversing each connected component, obtain the total number of pixels as the brightness area. Remove flexible LED filaments whose brightness area is outside the preset area range. Divide the remaining connected components into concentric ring regions to obtain the central circle, middle ring and outer ring regions. Calculate the brightness of each region and the gradient change rate of the brightness of adjacent regions; when the difference between the brightness of the center 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 brightness exceeds the preset change rate, the corresponding flexible LED filament is discarded. Based on the ab channel image 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 removed, and all the remaining flexible LED filaments are marked as qualified products.
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 performing binary segmentation of the L-channel image using a dynamic thresholding method, including: The ambient light intensity and the transmittance of the flexible LED filament adhesive layer are obtained. The global threshold is calculated based on the ambient light intensity, transmittance, and calibration coefficient. The L-channel image is divided into multiple sub-regions, and the local brightness average of each sub-region is calculated. Calculate the ratio of the local average brightness to the global average brightness, determine whether the ratio exceeds a preset value, and when the ratio exceeds the preset value, multiply the current global threshold by the brightness ratio to dynamically update the global threshold. The L-channel image is binary segmented based on the dynamically updated global threshold. The misclassification rate of the segmentation results is calculated. When the misclassification rate exceeds the preset limit, the calibration coefficient is optimized by gradient descent to 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 is also included: Divide the RGB image into a pixel grid and calculate the local entropy of the grid; An entropy distribution matrix is constructed based on the local entropy of the grid. Abnormal regions are detected based on the entropy distribution matrix, and the flexible LED filaments corresponding to the abnormal regions are identified and removed.
4. The flexible LED filament power-on detection method based on image processing according to any one of claims 1-3, characterized in that, After marking all remaining flexible LED filaments as qualified products, the process also includes: All rejected flexible LED filaments are marked as non-conforming products, and a recycling strategy is matched according to the type of defect. Obtain the brightness area index, brightness distribution index, and color state index of each flexible LED filament in the qualified products, and determine the quality assessment result of the flexible LED filament by weighted summation of each index; The quality grade of each qualified product is determined based on the quality assessment results, and different usage strategies are matched according to different quality grades.
5. A flexible LED filament power-on detection system based on image processing, characterized in that, The system includes: The power-on image segmentation module is used to acquire RGB images of the light-emitting points of multiple flexible LED filaments after power-on, convert the RGB images to the Lab color space, and extract the L channel image and ab channel image respectively; perform binary segmentation, noise reduction and edge smoothing processing on the L channel image to obtain the binary mask image of each flexible LED filament; The brightness area detection module is used to identify independent light-emitting points in the binary mask image and mark connected regions. After traversing each connected region, the total number of pixels is obtained as the brightness area. Flexible LED filaments whose brightness area is outside the preset area range are removed. The remaining connected regions are divided into concentric ring regions to obtain the central circle, the middle ring and the outer ring region. 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 center 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 brightness exceeds the preset change rate, the corresponding flexible LED filament is discarded. The emission color detection module is used to calculate the Mahalanobis distance between the chromaticity coordinates and the standard value based on the ab channel image of the remaining flexible LED filaments. When the Mahalanobis distance exceeds the distance tolerance, the corresponding flexible LED filament is removed, and all the remaining flexible LED filaments are marked as qualified products.
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 average of each sub-region is calculated; The global threshold update unit is used to calculate the brightness ratio between the local average brightness and the global average brightness, determine whether the brightness ratio exceeds the 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 based on the dynamically updated global threshold, and to calculate the misclassification rate of the segmentation results. When the misclassification rate exceeds the preset limit, the calibration coefficient is optimized by gradient descent method to adjust the global threshold in response to feedback.
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: Pixel grid division unit is used to divide the RGB image into a pixel grid before converting the RGB image to the Lab color space and to calculate the local entropy of the grid; The abnormal region detection unit is used to construct an entropy distribution matrix based on the local entropy of the grid, and to detect abnormal regions based on the entropy distribution matrix; it identifies the flexible LED filaments corresponding to the abnormal regions, marks them as unqualified products, and removes them.
8. The flexible LED filament power-on detection system based on image processing according to any one of claims 5-7, characterized in that, The system also includes a quality assessment module for: All rejected flexible LED filaments are marked as non-conforming products, and a recycling strategy is matched according to the type of defect. Obtain the brightness area index, brightness distribution index, and color state index of each flexible LED filament in the qualified products, and determine the quality assessment result of the flexible LED filament by weighted summation of each index; The quality grade of each qualified product is determined based on the quality assessment results, and different usage strategies are matched according to different quality grades.
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, wherein when the processor executes the computer instructions, the electronic device performs the image processing-based flexible LED filament power-on detection method 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 that, when executed by a processor of an electronic device, cause the processor to perform the image processing-based flexible LED filament power-on detection method 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