LED table lamp automatic dimming method based on multi-path light sensor three-dimensional detection
Through the three-dimensional detection method of multiple light sensors, an environmental detection network is constructed and the brightness adjustment model is optimized, which solves the problem of the overall and uniformity of the lighting area of the desk lamp, realizes the intelligent and uniform adjustment of the brightness of the desk lamp, and reduces visual fatigue.
Patent Information
- Application Number
- CN202510781059.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-09-12
AI Technical Summary
Existing desk lamp brightness adjustment methods ignore the overall lighting area and lighting uniformity of the desk lamp, causing the user's eyes to adjust back and forth between strong light and weak light, causing fatigue.
A multi-channel optical sensor stereo detection method is adopted. By installing laser cameras and multiple groups of optical sensors, an environmental detection network is built to collect and process brightness data, build a human eye brightness parameter model, and optimize the brightness adjustment model through an adaptive optimization algorithm. The brightness of the desk lamp is calculated and adjusted in real time, and uniformity detection and correction are performed.
The rationality, accuracy and intelligence of the desk lamp brightness adjustment are improved, the uniformity and stability of the desk lamp lighting are ensured, and the visual fatigue of the user is reduced.
Smart Images

Figure CN120640463A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of dimming control, and in particular to an automatic dimming method for an LED desk lamp based on stereo detection of multiple light sensors. Background Art
[0002] Due to the wide variety of desk lamps on the market and their uneven quality, some of them have too strong light and are prone to glare; some of them have too weak light and are easy to damage eyesight; some of them have too poor light uniformity, which will cause the user's eyes to constantly adjust back and forth between strong light and weak light, causing fatigue.
[0003] Prior art, such as the invention patent application with announcement number: CN111556605A, discloses a method, system, storage medium and desk lamp for controlling the constant brightness of the working surface of a desk lamp, the method comprising: obtaining the angle formed by rotating the lampshade from a preset initial position to a corresponding position; obtaining the center point brightness value corresponding to the center point coordinates according to a calibrated light source brightness field formula; obtaining the ambient brightness value in the current environment and the target brightness value preset in the target working area; obtaining the current light source brightness level according to the ambient brightness value and the target brightness value, and performing dimming control according to the current light source brightness level.
[0004] As can be seen from the above solutions, the current brightness adjustment of desk lamps mostly focuses on the adjustment relationship between the central brightness and the ambient light, ignoring the overall lighting area of the desk lamp and the lighting uniformity of the desk lamp, which has certain limitations. Summary of the Invention
[0005] The purpose of the present invention is to provide an automatic dimming method for an LED desk lamp based on stereo detection of multiple light sensors, which solves the problems existing in the background technology.
[0006] To solve the above technical problems, the present invention adopts the following technical solution: The present invention provides an automatic dimming method for an LED desk lamp based on stereo detection of a multi-path light sensor, which specifically includes the following steps:
[0007] S1. Set the working area of the LED desk lamp and install a laser camera and multiple sets of light sensors in the set working area of the LED desk lamp; and build an environmental detection network based on the installed laser camera and multiple sets of light sensors.
[0008] S2. Based on the constructed environment detection network, collect historical brightness data of the LED desk lamp and the surrounding environment in the working area of the LED desk lamp, and construct a training set based on the collected historical brightness data of the LED desk lamp and the surrounding environment;
[0009] S3. Process and analyze the historical brightness data of LED desk lamps and surrounding environment in the training set through data processing and analysis methods to build a human eye brightness parameter model;
[0010] S31, processing the historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment in the training set by a data processing method to obtain processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment;
[0011] S32, analyzing the processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment by a data analysis method, and constructing a human eye brightness parameter model;
[0012] S4, constructing a brightness adjustment model based on the constructed human eye brightness parameter model and the processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment, and optimizing the constructed brightness adjustment model through an adaptive optimization algorithm to obtain an optimized brightness adjustment model;
[0013] S5. Real-time collection of LED desk lamp brightness data and surrounding environment brightness data within the working area of the LED desk lamp, and input into an optimized brightness adjustment model, and real-time calculation of LED desk lamp brightness adjustment parameters by the optimized brightness adjustment model. At the same time, the brightness of the LED desk lamp is controlled and adjusted using the real-time calculated LED desk lamp brightness adjustment parameters.
[0014] S6. After the adjustment is completed, the brightness of the adjusted LED desk lamp is tested for uniformity, and brightness correction adjustment is performed based on the uniformity test result.
[0015] Preferably, the step of setting a working area of the LED desk lamp and installing a laser camera and multiple groups of light sensors within the set working area of the LED desk lamp; and constructing an environment detection network based on the installed laser camera and multiple groups of light sensors comprises the following steps:
[0016] Based on the installed laser camera, number the light sensors installed in the working area of the LED desk lamp;
[0017] Set a triplet m to save the installed light sensors;
[0018] m=(A, N, D)
[0019] Where A represents the number of the installed light sensor; N represents the brightness data of the LED desk lamp collected in real time by the light sensor with the corresponding number; D represents the brightness data of the surrounding environment collected in real time by the light sensor with the corresponding number;
[0020] Build an environment detection network based on the saved triples.
[0021] Preferably, the environmental detection network constructed based on the LED desk lamp collects historical brightness data of the LED desk lamp and historical brightness data of the surrounding environment within the working area of the LED desk lamp, and constructs a training set based on the collected historical brightness data of the LED desk lamp and historical brightness data of the surrounding environment, including the following steps:
[0022] Set up a calibration area within the working area of the LED desk lamp, and set up multiple groups of reference points within the calibration area;
[0023] Fix the relative position of the laser camera and the calibration area so that the reference points in the calibration area are evenly distributed throughout the camera's field of view;
[0024] Set the sampling interval of the laser camera, and collect the calibration area image taken by the laser camera at each sampling interval according to the set sampling interval;
[0025] Combine the historical brightness data of the surrounding environment collected by the light sensor and the calibration area image taken by the laser camera under the corresponding historical brightness data of the surrounding environment to construct a training set;
[0026] The calibration area image captured by the laser camera under the corresponding historical brightness data of the surrounding environment is set as the collected historical brightness data of the LED desk lamp.
[0027] Preferably, the processing of the historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment in the training set by the data processing method to obtain the processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment comprises the following steps:
[0028] S311, performing grayscale histogram photometry processing on the historical brightness data of LED desk lamps in the training set;
[0029] S312, standardizing the surrounding environment historical brightness data in the training set;
[0030] The brightness data normalization formula is as follows:
[0031] ;
[0032] in, Represents the normalized historical brightness data of the surrounding environment. represents the brightness data within the monitoring area of the kth light sensor, and n represents the number of light sensors.
[0033] Preferably, performing grayscale histogram photometry processing on the historical brightness data of LED desk lamps in the training set comprises the following steps:
[0034] Set the calibration area image taken by the laser camera to ;
[0035] Calculate the pixel probability distribution based on the grayscale value distribution in the calibration area image captured by the laser camera; the grayscale value is the value of the pixel point that satisfies the condition R=G=B;
[0036] The pixel probability distribution formula of the calibration area image taken by the laser camera is as follows:
[0037] ;
[0038] in, represents the pixel probability of the calibration area image taken by the laser camera, Indicates the gray value is The number of pixels, is the total number of pixels;
[0039] Constructing a grayscale histogram feature function based on the calculated pixel probability distribution;
[0040] The formula for constructing the grayscale histogram feature is as follows:
[0041] ;
[0042] Where L represents the total number of grayscale values in the image, Indicates the The gray value after the gray value is mapped by the cumulative distribution function;
[0043] The grayscale value after mapping is set to represent the processed historical brightness data of the LED desk lamp;
[0044] Based on the constructed grayscale histogram feature function, the historical brightness data of each group of LED desk lamps in the training set is calculated, and the processed historical brightness data of LED desk lamps is summarized and output.
[0045] Preferably, the process of analyzing the processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment by a data analysis method to construct a human eye brightness parameter model comprises the following steps:
[0046] The brightness parameter perceived by the human eye in real time is calculated by summarizing the processed historical brightness data of the surrounding environment and the historical brightness data of the LED desk lamp processed under the corresponding historical brightness data of the surrounding environment;
[0047] The formula for calculating the brightness parameter perceived by the human eye in real time is as follows;
[0048] ;
[0049] in, Indicates the brightness parameter perceived by the human eye, that is, the overall brightness parameter, represents contrast sensitivity, K represents the weight of the relationship between the overall brightness parameter and the historical brightness data of the surrounding environment and the historical brightness data of the LED desk lamp processed under the corresponding historical brightness data of the surrounding environment, H represents the relationship constant between the overall brightness parameter and the historical brightness data of the surrounding environment and the historical brightness data of the LED desk lamp processed under the corresponding historical brightness data of the surrounding environment, Represents the processed historical brightness data of the LED desk lamp;
[0050] The calculation formula of the brightness parameter perceived by the human eye in real time is set as the human eye brightness parameter model.
[0051] Preferably, the brightness adjustment model is constructed based on the constructed human eye brightness parameter model and the processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment, and the constructed brightness adjustment model is optimized by an adaptive optimization algorithm to obtain the optimized brightness adjustment model, which includes the following steps:
[0052] S41, constructing a brightness adjustment model;
[0053] ;
[0054] in, Indicates the brightness adjustment parameter, Indicates the standard brightness parameter of the human eye;
[0055] S42. Optimize the constructed brightness adjustment model through an adaptive optimization algorithm.
[0056] Preferably, the optimizing the constructed brightness adjustment model by the adaptive optimization algorithm comprises the following steps:
[0057] S421, initializing parameters of the processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment by using a particle swarm optimization algorithm;
[0058] The historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment processed at the same time are regarded as a set of parameter data;
[0059] Set each particle to represent a set of parameter data, set the group size, and the maximum number of iterations , random particle positions , particle speed and inertia factor ;
[0060] S422, using the brightness adjustment model as the fitness function of the particle swarm optimization algorithm, and calculating the fitness of each particle in the swarm;
[0061] The fitness calculation formula for each particle is as follows:
[0062] ;
[0063] in, represents the fitness of the u-th individual;
[0064] S423, updating the optimal position of a single particle based on the calculated fitness;
[0065] S424. Updating the optimal position of the group based on the calculated fitness;
[0066] S425, updating the inertia factor, and updating the positions and velocities of all particles based on the updated inertia factor;
[0067] S426, repeating steps S422-S425 until the maximum number of iterations is reached, and outputting the brightness adjustment model corresponding to the optimal position;
[0068] The brightness adjustment model corresponding to the optimal output position is set as the optimized brightness adjustment model.
[0069] Preferably, after the adjustment is completed, the uniformity test is performed on the brightness of the adjusted LED desk lamp, and the brightness correction adjustment is performed according to the uniformity test result, which includes the following steps:
[0070] After the adjustment is completed, the brightness data of each reference point in the calibration area is collected in real time through the laser camera;
[0071] Calculate the uniformity of the brightness data of each reference point through the uniformity detection algorithm;
[0072] ;
[0073] in, Indicates the calculation of the uniformity of the brightness data of each reference point. Indicates the maximum value of the brightness data of each reference point, Indicates the minimum value of the brightness data of each reference point;
[0074] Set a uniformity detection result threshold. When the calculated uniformity of the brightness data of each reference point is less than the set uniformity detection result threshold, perform brightness correction on the LED desk lamp.
[0075] The brightness correction steps are as follows:
[0076] Calculate the average brightness of the brightness data of each reference point, and use the calculated average brightness as a benchmark to reduce the brightness data of the corresponding reference points that are higher than the average brightness to the average brightness.
[0077] The present invention also discloses a method and system for automatically dimming an LED desk lamp based on stereo detection of multiple light sensors, comprising: a brightness data acquisition module, a brightness data processing module, a brightness data analysis module, a brightness adjustment optimization module, and a brightness uniformity detection module;
[0078] The brightness data acquisition module is used to collect the brightness data of the LED desk lamp and the surrounding environment brightness data in the working area of the LED desk lamp in real time;
[0079] The brightness data processing module is used to process the collected LED desk lamp brightness data and the surrounding environment brightness data;
[0080] The brightness data analysis module is used to analyze the processed LED desk lamp brightness data and the surrounding environment brightness data and construct a human eye brightness parameter model;
[0081] The brightness adjustment optimization module is used to construct a brightness adjustment model based on the human eye brightness parameter model, the processed LED desk lamp brightness data and the surrounding environment brightness data, and optimize the constructed brightness adjustment model;
[0082] The brightness uniformity detection module is used to perform brightness uniformity detection on the working area of the adjusted LED desk lamp.
[0083] The beneficial effects of the present invention are:
[0084] (1) The present invention installs a laser camera and multiple groups of light sensors in a set working area of an LED desk lamp and constructs an environmental detection network; at the same time, based on the constructed environmental detection network, collects historical brightness data of the LED desk lamp and historical brightness data of the surrounding environment in the working area of the LED desk lamp and processes and analyzes them; after the analysis is completed, a human eye brightness parameter model is constructed based on the analysis results, and at the same time, a brightness adjustment model is constructed based on the constructed human eye brightness parameter model and the processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment and optimizes them; after the optimization is completed, the brightness adjustment parameters of the desk lamp are calculated in real time, and the adjustment is performed according to the calculated parameters; after the adjustment is completed, the uniformity of the adjusted LED desk lamp brightness is detected and corrected, thereby improving the rationality of the desk lamp adjustment.
[0085] (2) The present invention processes the historical brightness data of LED desk lamps and the historical brightness data of the surrounding environment in the training set through a data processing method, and at the same time constructs a human eye brightness parameter model through data analysis, determines the relationship between ambient light, desk lamp brightness and human eye perception, and improves the accuracy of desk lamp brightness adjustment.
[0086] (3) The present invention constructs a brightness adjustment model by analyzing the relationship between the human eye brightness parameter model and the processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment; at the same time, after determining the brightness adjustment model, the determined brightness adjustment model is optimized by the particle swarm optimization algorithm, thereby improving the intelligence of the desk lamp brightness adjustment.
[0087] (4) The present invention detects the brightness of the desk lamp after adjustment by using a desk lamp brightness uniformity detection algorithm; after the detection is completed, the brightness of the desk lamp is corrected by lowering the brightness to avoid the problem of poor brightness correction results, thereby improving the stability of the brightness uniformity of the desk lamp. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0089] Figure 1 This is a flow chart of the method for realizing automatic light adjustment by using multi-channel light sensors to detect ambient light in three dimensions according to the present invention. DETAILED DESCRIPTION
[0090] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0091] In a specific embodiment of the present invention,
[0092] Reference Figure 1 As shown, the present invention provides an automatic dimming method for an LED desk lamp based on stereo detection of multiple light sensors, comprising the following steps:
[0093] S1. Set the working area of the LED desk lamp and install a laser camera and multiple sets of light sensors in the set working area of the LED desk lamp; and build an environmental detection network based on the installed laser camera and multiple sets of light sensors.
[0094] S2. Based on the constructed environment detection network, collect historical brightness data of the LED desk lamp and the surrounding environment in the working area of the LED desk lamp, and construct a training set based on the collected historical brightness data of the LED desk lamp and the surrounding environment;
[0095] S3. Process and analyze the historical brightness data of LED desk lamps and surrounding environment in the training set through data processing and analysis methods to build a human eye brightness parameter model;
[0096] S31, processing the historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment in the training set by a data processing method to obtain processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment;
[0097] S32, analyzing the processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment by a data analysis method, and constructing a human eye brightness parameter model;
[0098] S4, constructing a brightness adjustment model based on the constructed human eye brightness parameter model and the processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment, and optimizing the constructed brightness adjustment model through an adaptive optimization algorithm to obtain an optimized brightness adjustment model;
[0099] S5. Real-time collection of LED desk lamp brightness data and surrounding environment brightness data within the working area of the LED desk lamp, and input into an optimized brightness adjustment model, and real-time calculation of LED desk lamp brightness adjustment parameters by the optimized brightness adjustment model. At the same time, the brightness of the LED desk lamp is controlled and adjusted using the real-time calculated LED desk lamp brightness adjustment parameters.
[0100] S6. After the adjustment is completed, the uniformity of the brightness of the adjusted LED desk lamp is tested, and the brightness correction adjustment is performed according to the uniformity test result;
[0101] Further, refer to Figure 1 As shown, the working area of the LED desk lamp is set, and a laser camera and multiple groups of light sensors are installed in the set working area of the LED desk lamp; at the same time, building an environmental detection network based on the installed laser camera and multiple groups of light sensors includes the following steps:
[0102] Based on the installed laser camera, number the light sensors installed in the working area of the LED desk lamp;
[0103] Set a triplet m to save the installed light sensors;
[0104] m=(A, N, D)
[0105] Where A represents the number of the installed light sensor; N represents the brightness data of the LED desk lamp collected in real time by the light sensor with the corresponding number; D represents the brightness data of the surrounding environment collected in real time by the light sensor with the corresponding number;
[0106] Furthermore, an environment detection network is constructed based on the saved triples;
[0107] Further, refer to Figure 1 As shown, based on the constructed environment detection network, the historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment in the working area of the LED desk lamp are collected, and the training set is constructed based on the collected historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment, including the following steps:
[0108] Set up a calibration area within the working area of the LED desk lamp, and set up multiple groups of reference points within the calibration area;
[0109] Fix the relative position of the laser camera and the calibration area so that the reference points in the calibration area are evenly distributed throughout the camera's field of view;
[0110] Set the sampling interval of the laser camera, and collect the calibration area image taken by the laser camera at each sampling interval according to the set sampling interval;
[0111] Furthermore, the historical brightness data of the surrounding environment collected by the light sensor and the images of the calibration area taken by the laser camera under the corresponding historical brightness data of the surrounding environment are combined to construct a training set;
[0112] Set the calibration area image captured by the laser camera under the corresponding historical brightness data of the surrounding environment to the collected historical brightness data of the LED desk lamp;
[0113] Further, refer to Figure 1 As shown, the historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment in the training set are processed by the data processing method to obtain the processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment, including the following steps:
[0114] S311, performing grayscale histogram photometry processing on the historical brightness data of LED desk lamps in the training set;
[0115] Set the calibration area image taken by the laser camera to ;
[0116] Calculate the pixel probability distribution based on the grayscale value distribution in the calibration area image captured by the laser camera; the grayscale value is the value of the pixel point that satisfies the condition R=G=B;
[0117] The pixel probability distribution formula of the calibration area image taken by the laser camera is as follows:
[0118] ;
[0119] in, represents the pixel probability of the calibration area image taken by the laser camera, Indicates the gray value is The number of pixels, is the total number of pixels;
[0120] Furthermore, a grayscale histogram feature function is constructed based on the calculated pixel probability distribution;
[0121] The formula for constructing the grayscale histogram feature is as follows:
[0122] ;
[0123] Where L represents the total number of grayscale values in the image, Indicates the The gray value after the gray value is mapped by the cumulative distribution function;
[0124] The grayscale value after mapping is set to represent the processed historical brightness data of the LED desk lamp;
[0125] Furthermore, the historical brightness data of each group of LED desk lamps in the training set is calculated based on the constructed grayscale histogram feature function, and the processed historical brightness data of the LED desk lamps is summarized and output;
[0126] S312, standardizing the surrounding environment historical brightness data in the training set;
[0127] The brightness data normalization formula is as follows:
[0128] ;
[0129] in, Represents the normalized historical brightness data of the surrounding environment. represents the brightness data within the monitoring area of the kth light sensor, and n represents the number of light sensors;
[0130] Further, refer to Figure 1 As shown, the processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment are analyzed by a data analysis method, and the construction of a human eye brightness parameter model includes the following steps:
[0131] The brightness parameter perceived by the human eye in real time is calculated by summarizing the processed historical brightness data of the surrounding environment and the historical brightness data of the LED desk lamp processed under the corresponding historical brightness data of the surrounding environment;
[0132] The formula for calculating the brightness parameter perceived by the human eye in real time is as follows;
[0133] ;
[0134] in, Indicates the brightness parameter perceived by the human eye, that is, the overall brightness parameter, represents contrast sensitivity, K represents the weight of the relationship between the overall brightness parameter and the historical brightness data of the surrounding environment and the historical brightness data of the LED desk lamp processed under the corresponding historical brightness data of the surrounding environment, H represents the relationship constant between the overall brightness parameter and the historical brightness data of the surrounding environment and the historical brightness data of the LED desk lamp processed under the corresponding historical brightness data of the surrounding environment, Represents the processed historical brightness data of the LED desk lamp;
[0135] Furthermore, a calculation formula for brightness parameters perceived by the human eye in real time is set as a human eye brightness parameter model;
[0136] Further, refer to Figure 1 As shown in FIG, a brightness adjustment model is constructed based on the constructed human eye brightness parameter model and the processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment. At the same time, the constructed brightness adjustment model is optimized by an adaptive optimization algorithm. The optimized brightness adjustment model includes the following steps:
[0137] S41, constructing a brightness adjustment model;
[0138] ;
[0139] in, Indicates the brightness adjustment parameter, Indicates the standard brightness parameter of the human eye;
[0140] S42, optimizing the constructed brightness adjustment model through an adaptive optimization algorithm;
[0141] S421, initializing parameters of the processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment by using a particle swarm optimization algorithm;
[0142] The historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment processed at the same time are regarded as a set of parameter data;
[0143] Set each particle to represent a set of parameter data, set the group size, and the maximum number of iterations , random particle positions , particle speed and inertia factor ;
[0144] S422, using the brightness adjustment model as the fitness function of the particle swarm optimization algorithm, and calculating the fitness of each particle in the swarm;
[0145] The fitness calculation formula for each particle is as follows:
[0146] ;
[0147] in, represents the fitness of the u-th individual;
[0148] S423, updating the optimal position of a single particle based on the calculated fitness;
[0149] The formula for updating the velocity of a single particle is as follows:
[0150] ;
[0151] in, Represents particles In the The speed during the iteration, Represents particles In the The speed during the iteration, represents the inertia factor, Represents particles In the The position during the iteration, 、 represents the acceleration constant, 、 represents a random number in the interval [0,1], Represents particles The individual extreme value of Represents the global extreme value of all particles;
[0152] The formula for updating the position of a single particle is as follows:
[0153] ;
[0154] in, Represents particles In the The position during the iteration;
[0155] For each particle calculated, the fitness of its current position is compared with the best position it has passed. If the fitness of the current position is greater than the best position it has passed, The current position is taken as the current best position. , if the fitness of the current position is less than or equal to the best position it has passed The fitness of , then the current best position will not be changed ;
[0156] S424. Updating the optimal position of the group based on the calculated fitness;
[0157] For each particle calculated, the fitness of its current position is compared with the best position that the particle in its population has passed. If the fitness of the current position is greater than the best position that the particle in the population has passed through, The current position is taken as the current best position. , if the fitness of the current position is less than or equal to the best position that the particle in the population has passed The fitness of , then the current best position will not be changed ;
[0158] S425, updating the inertia factor, and updating the positions and velocities of all particles based on the updated inertia factor;
[0159] The inertia factor update formula is as follows:
[0160] ;
[0161] in, represents the inertia factor at the beginning of iteration, represents the inertia factor at the final iteration, Indicates the current iteration number, Indicates the maximum number of iterations;
[0162] S426, repeating steps S422-S425 until the maximum number of iterations is reached, and outputting the brightness adjustment model corresponding to the optimal position;
[0163] The brightness adjustment model corresponding to the optimal output position is set as the optimized brightness adjustment model;
[0164] Further, refer to Figure 1 As shown, after the adjustment is completed, the uniformity test of the adjusted LED desk lamp brightness is performed, and the brightness correction adjustment is performed according to the uniformity test result, including the following steps:
[0165] After the adjustment is completed, the brightness data of each reference point in the calibration area is collected in real time through the laser camera;
[0166] Calculate the uniformity of the brightness data of each reference point through the uniformity detection algorithm;
[0167] ;
[0168] in, Indicates the calculation of the uniformity of the brightness data of each reference point. Indicates the maximum value of the brightness data of each reference point, Indicates the minimum value of the brightness data of each reference point;
[0169] Furthermore, a uniformity detection result threshold is set, and when the calculated uniformity of the brightness data of each reference point is less than the set uniformity detection result threshold, the brightness of the LED desk lamp is corrected;
[0170] The brightness correction steps are as follows:
[0171] Calculate the average brightness of the brightness data of each reference point, and use the calculated average brightness as a benchmark to reduce the brightness data of the corresponding reference points that are higher than the average brightness to the average brightness;
[0172] In a specific embodiment, a method and system for automatically dimming an LED desk lamp based on stereoscopic detection of multiple light sensors is provided, comprising: a brightness data acquisition module, a brightness data processing module, a brightness data analysis module, a brightness adjustment optimization module, and a brightness uniformity detection module;
[0173] The brightness data acquisition module is used to collect the brightness data of the LED desk lamp and the surrounding environment brightness data in the working area of the LED desk lamp in real time;
[0174] The brightness data processing module is used to process the collected LED desk lamp brightness data and the surrounding environment brightness data;
[0175] The brightness data analysis module is used to analyze the processed LED desk lamp brightness data and the surrounding environment brightness data and construct a human eye brightness parameter model;
[0176] The brightness adjustment optimization module is used to construct a brightness adjustment model based on the human eye brightness parameter model, the processed LED desk lamp brightness data and the surrounding environment brightness data, and optimize the constructed brightness adjustment model;
[0177] The brightness uniformity detection module is used to perform brightness uniformity detection on the working area of the adjusted LED desk lamp.
[0178] It should be noted that
[0179] The above contents are merely examples and explanations of the concept of the present invention. Those skilled in the art may make various modifications or additions to the described specific embodiments or replace them in a similar manner. As long as they do not deviate from the concept of the invention or exceed the scope defined by the present invention, they should all fall within the scope of protection of the present invention.
Claims
1. A method for automatic dimming of LED desk lamps based on stereo detection of multiple light sensors, characterized in that: The following steps are involved: S1. Set the working area of the LED desk lamp and install a laser camera and multiple sets of light sensors in the set working area of the LED desk lamp; and build an environmental detection network based on the installed laser camera and multiple sets of light sensors. S2. Based on the constructed environment detection network, collect historical brightness data of the LED desk lamp and the surrounding environment in the working area of the LED desk lamp, and construct a training set based on the collected historical brightness data of the LED desk lamp and the surrounding environment; S3. Process and analyze the historical brightness data of LED desk lamps and surrounding environment in the training set through data processing and analysis methods to build a human eye brightness parameter model; S31, processing the historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment in the training set by a data processing method to obtain processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment; S32, analyzing the processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment by a data analysis method, and constructing a human eye brightness parameter model; S4, constructing a brightness adjustment model based on the constructed human eye brightness parameter model and the processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment, and optimizing the constructed brightness adjustment model through an adaptive optimization algorithm to obtain an optimized brightness adjustment model; S5. Real-time collection of LED desk lamp brightness data and surrounding environment brightness data within the working area of the LED desk lamp, and input into an optimized brightness adjustment model, and real-time calculation of LED desk lamp brightness adjustment parameters by the optimized brightness adjustment model. At the same time, the brightness of the LED desk lamp is controlled and adjusted using the real-time calculated LED desk lamp brightness adjustment parameters. S6. After the adjustment is completed, the brightness of the adjusted LED desk lamp is tested for uniformity, and brightness correction adjustment is performed based on the uniformity test result.
2. The method for automatic dimming of LED desk lamp based on stereo detection of multiple light sensors according to claim 1, characterized in that: The step of setting a working area of the LED desk lamp and installing a laser camera and multiple groups of light sensors within the working area of the LED desk lamp; and constructing an environment detection network based on the installed laser camera and multiple groups of light sensors includes the following steps: Based on the installed laser camera, number the light sensors installed in the working area of the LED desk lamp; Set a triplet m to save the installed light sensors; m=(A, N, D) Where A represents the number of the installed light sensor; N represents the brightness data of the LED desk lamp collected in real time by the light sensor with the corresponding number; D represents the brightness data of the surrounding environment collected in real time by the light sensor with the corresponding number; Build an environment detection network based on the saved triples.
3. The LED desk lamp automatic dimming method based on multi-path light sensor stereo detection according to claim 1, characterized in that: The method of collecting historical brightness data of the LED desk lamp and the surrounding environment within the working area of the LED desk lamp based on the constructed environment detection network and constructing a training set based on the collected historical brightness data of the LED desk lamp and the surrounding environment includes the following steps: Set up a calibration area within the working area of the LED desk lamp, and set up multiple groups of reference points within the calibration area; Fix the relative position of the laser camera and the calibration area so that the reference points in the calibration area are evenly distributed throughout the camera's field of view; Set the sampling interval of the laser camera, and collect the calibration area image taken by the laser camera at each sampling interval according to the set sampling interval; Combine the historical brightness data of the surrounding environment collected by the light sensor and the calibration area image taken by the laser camera under the corresponding historical brightness data of the surrounding environment to construct a training set; The calibration area image captured by the laser camera under the corresponding historical brightness data of the surrounding environment is set as the collected historical brightness data of the LED desk lamp.
4. The method for automatic dimming of an LED desk lamp based on stereo detection of multiple light sensors according to claim 1, characterized in that: The method of processing the historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment in the training set to obtain the processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment comprises the following steps: S311, performing grayscale histogram photometry processing on the historical brightness data of LED desk lamps in the training set; S312, standardizing the surrounding environment historical brightness data in the training set; The brightness data normalization formula is as follows: ; in, Represents the normalized historical brightness data of the surrounding environment. represents the brightness data within the monitoring area of the kth light sensor, and n represents the number of light sensors.
5. The method for automatic dimming of LED desk lamp based on stereo detection of multiple light sensors according to claim 4, characterized in that: The grayscale histogram photometry processing of the historical brightness data of the LED desk lamps in the training set includes the following steps: Set the calibration area image taken by the laser camera to ; Calculate the pixel probability distribution based on the grayscale value distribution in the calibration area image captured by the laser camera; the grayscale value is the value of the pixel point that satisfies the condition R=G=B; The pixel probability distribution formula of the calibration area image taken by the laser camera is as follows: ; in, represents the pixel probability of the calibration area image taken by the laser camera, Indicates the gray value is The number of pixels, is the total number of pixels; Constructing a grayscale histogram feature function based on the calculated pixel probability distribution; The formula for constructing the grayscale histogram feature is as follows: ; Where L represents the total number of grayscale values in the image, Indicates the The gray value after the gray value is mapped by the cumulative distribution function; The grayscale value after mapping is set to represent the processed historical brightness data of the LED desk lamp; Based on the constructed grayscale histogram feature function, the historical brightness data of each group of LED desk lamps in the training set is calculated, and the processed historical brightness data of LED desk lamps is summarized and output.
6. The method for automatic dimming of an LED desk lamp based on stereo detection of multiple light sensors according to claim 1, characterized in that: The method of analyzing the processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment by the data analysis method to construct a human eye brightness parameter model includes the following steps: The brightness parameter perceived by the human eye in real time is calculated by summarizing the processed historical brightness data of the surrounding environment and the historical brightness data of the LED desk lamp processed under the corresponding historical brightness data of the surrounding environment; The formula for calculating the brightness parameter perceived by the human eye in real time is as follows; ; in, Indicates the brightness parameter perceived by the human eye, that is, the overall brightness parameter, represents contrast sensitivity, K represents the weight of the relationship between the overall brightness parameter and the historical brightness data of the surrounding environment and the historical brightness data of the LED desk lamp processed under the corresponding historical brightness data of the surrounding environment, H represents the relationship constant between the overall brightness parameter and the historical brightness data of the surrounding environment and the historical brightness data of the LED desk lamp processed under the corresponding historical brightness data of the surrounding environment, Represents the processed historical brightness data of the LED desk lamp; The calculation formula of the brightness parameter perceived by the human eye in real time is set as the human eye brightness parameter model.
7. The method for automatic dimming of LED desk lamp based on stereo detection of multiple light sensors according to claim 1, characterized in that: The method of constructing a brightness adjustment model based on the constructed human eye brightness parameter model and the processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment, and optimizing the constructed brightness adjustment model by an adaptive optimization algorithm to obtain the optimized brightness adjustment model includes the following steps: S41, constructing a brightness adjustment model; ; in, Indicates the brightness adjustment parameter, Indicates the standard brightness parameter of the human eye; S42. Optimize the constructed brightness adjustment model through an adaptive optimization algorithm.
8. The method for automatic dimming of an LED desk lamp based on stereo detection of multiple light sensors according to claim 7, characterized in that: The optimization of the constructed brightness adjustment model by the adaptive optimization algorithm includes the following steps: S421, initializing parameters of the processed historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment by using a particle swarm optimization algorithm; The historical brightness data of the LED desk lamp and the historical brightness data of the surrounding environment processed at the same time are regarded as a set of parameter data; Set each particle to represent a set of parameter data, set the group size, and the maximum number of iterations , random particle positions , particle speed and inertia factor ; S422, using the brightness adjustment model as the fitness function of the particle swarm optimization algorithm, and calculating the fitness of each particle in the swarm; The fitness calculation formula for each particle is as follows: ; in, represents the fitness of the u-th individual; S423, updating the optimal position of a single particle based on the calculated fitness; S424. Updating the optimal position of the group based on the calculated fitness; S425, updating the inertia factor, and updating the positions and velocities of all particles based on the updated inertia factor; S426, repeating steps S422-S425 until the maximum number of iterations is reached, and outputting the brightness adjustment model corresponding to the optimal position; The brightness adjustment model corresponding to the optimal output position is set as the optimized brightness adjustment model.
9. The method for automatic dimming of an LED desk lamp based on stereo detection of multiple light sensors according to claim 1, characterized in that: After the adjustment is completed, the uniformity test of the adjusted LED desk lamp brightness is performed, and the brightness correction adjustment is performed according to the uniformity test result, including the following steps: After the adjustment is completed, the brightness data of each reference point in the calibration area is collected in real time through the laser camera; Calculate the uniformity of the brightness data of each reference point through the uniformity detection algorithm; ; in, Indicates the calculation of the uniformity of the brightness data of each reference point. Indicates the maximum value of the brightness data of each reference point, Indicates the minimum value of the brightness data of each reference point; Set a uniformity detection result threshold. When the calculated uniformity of the brightness data of each reference point is less than the set uniformity detection result threshold, perform brightness correction on the LED desk lamp. The brightness correction steps are as follows: Calculate the average brightness of the brightness data of each reference point, and use the calculated average brightness as a benchmark to reduce the brightness data of the corresponding reference points that are higher than the average brightness to the average brightness.
10. A method for automatically dimming an LED desk lamp based on stereoscopic detection of multiple light sensors according to any one of claims 1 to 9, characterized in that: include: Brightness data acquisition module, brightness data processing module, brightness data analysis module, brightness adjustment optimization module and brightness uniformity detection module; The brightness data acquisition module is used to collect the brightness data of the LED desk lamp and the surrounding environment brightness data in the working area of the LED desk lamp in real time; The brightness data processing module is used to process the collected LED desk lamp brightness data and surrounding environment brightness data; The brightness data analysis module is used to analyze the processed LED desk lamp brightness data and the surrounding environment brightness data and construct a human eye brightness parameter model; The brightness adjustment optimization module is used to construct a brightness adjustment model based on the human eye brightness parameter model, the processed LED desk lamp brightness data and the surrounding environment brightness data, and optimize the constructed brightness adjustment model; The brightness uniformity detection module is used to perform brightness uniformity detection on the working area of the adjusted LED desk lamp.
Citation Information
Patent Citations
Desk lamp working face constant brightness control method and system, storage medium and desk lamp
CN111556605A