A method and system for detecting lighting effect of light source in the design process of intelligent light mirror
By using genetic algorithms to optimize the light source layout in the design of smart light mirrors, the problem of design relying on subjective experience is solved, real-time feedback and optimization in the design stage is achieved, and the reliability and lighting effect of the light source design are improved.
Patent Information
- Application Number
- CN202410326326.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-21
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-03-21
AI Technical Summary
In the design process of smart light mirrors, light source design relies too much on the subjective experience of designers, resulting in uncertainty and subjectivity in lighting effects, and a lack of real-time feedback and optimization solutions in the design stage.
By linking to the computer-aided design software, the lamp mirror parameters are read, the lamp source position and layout boundary conditions are set, the genetic algorithm is used to generate and iteratively optimize the lamp source layout plan, the illumination adaptability is evaluated, and the lamp source position is adjusted to improve lighting uniformity and Visual comfort.
It achieves real-time feedback and optimization in the design stage, improves the reliability and lighting effect of the light source design scheme, and improves the lighting adaptability of the light source layout.
Smart Images

Figure CN118095097B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of lighting optimization, and in particular to a method and system for detecting lighting effects of a light source in a smart light mirror design process. Background Art
[0002] Light mirrors are used to solve the imaging problem of users using traditional mirrors to dress or put on clothes. Specifically, traditional mirrors rely on the weak natural light reflection in the room and are difficult to present the user's true skin color and details. The light source of the light mirror is generally set on the frame or back of the mirror, and the light source generates light to project in the direction of the user, thereby significantly improving the lighting effect. Some smart light mirrors also have some intelligent functions, such as adjusting the brightness and color temperature of the light to provide the most suitable lighting effect for human vision. However, with the development of various special-shaped light mirrors, such as oval, square, pear-shaped frames, how to reasonably arrange the light source in the specific position of the mirror is a problem that needs to be solved. In the current design and development process of smart light mirrors, the selection and layout of light sources often rely on the subjective experience of designers, and there is a lack of solutions to instantly display lighting effects and lighting parameters in the design stage. At present, designers often repeatedly place small movable physical light sources on the mirror model for many times, and finally adjust to obtain a solution that is subjectively considered to have better lighting effects. This traditional design method causes the light source design effect of the light mirror to be highly uncertain and subjective. Therefore, it is necessary to develop a technology that can provide real-time feedback during the design stage to guide lighting selection and layout optimization. Summary of the invention
[0003] (1) Technical issues to be solved
[0004] The purpose of the present invention is to provide a method and system for detecting lighting effects of light sources in the process of intelligent light mirror design, so as to solve the problem that the light source design in the process of light mirror design relies too much on the subjective consciousness of designers and improve the reliability of the lighting effects of the light source design scheme.
[0005] (2) Technical solution
[0006] To achieve the above-mentioned object, on the one hand, the present invention provides a method for detecting the lighting effect of a light source in a design process of an intelligent light mirror, the method comprising:
[0007] Link to the lamp mirror design file of the computer-aided design software, read the lamp mirror parameters of the lamp mirror design file, the lamp mirror parameters include mirror direction area parameters and mirror frame area parameters; set the position boundary conditions and layout boundary conditions of the lamp source, the position boundary conditions are the restriction conditions that the installation position of the lamp source needs to meet, and the position boundary conditions are set according to the mirror frame area parameters and the mirror direction area parameters; the layout boundary conditions are the restriction conditions that the overall installation layout of multiple lamp sources needs to meet;
[0008] The number of light sources N that can be installed is obtained through the size parameters and position boundary conditions of the light sources, and N arranged light sources are generated under the position boundary conditions of the light sources. Each light source is provided with parameter states including existence state, brightness and color temperature, where the existence state includes two states of 0 or 1; an initial population of light source layout schemes is generated, and the initial population includes P individuals X, each individual represents a light source layout scheme, and each light source layout scheme has N light sources arranged under the position boundary conditions of the light sources, and the parameter states of the light sources are randomly generated; individuals that do not meet the layout boundary conditions in the initial population are eliminated to obtain Q individuals X;
[0009] The initial population is iteratively evolved, and the iterative evolution steps include: at a set test position T facing the light mirror, sequentially evaluating the illumination fitness of the individuals in the initial population under the parameter state, wherein the illumination fitness is based on illumination uniformity and visual comfort; selecting the winning individuals through a roulette wheel selection method according to the illumination fitness ranking, performing crossover and mutation on the winning individuals to obtain offspring individuals X′, and eliminating offspring individuals X′ that do not meet the layout boundary conditions until Q offspring individuals X′ are obtained; replacing the initial population with offspring individuals X′, and iteratively evolving again until the improvement in illumination fitness of the offspring individuals and the parent individuals is lower than the set fitness threshold; and using the parameter state of the final winning individual after completing the iterative evolution as the layout plan of the light source in the light mirror design file.
[0010] Furthermore, the method of sequentially evaluating the illumination fitness of individuals in the initial population under the parameter state includes: obtaining the individual X of the i-th light source layout scheme in the initial population i ={(s i1 ,b i1 ,t i1 ),…,(s ij ,b ij ,t ij ),…,(s iN ,b iN ,t iN )}, where s ij Represents the i-th light source layout plan X i The existence state of the j-th light source, b ij Represents the i-th light source layout plan X i The brightness of the jth light source, t ij Represents the i-th light source layout plan X i The color temperature of the jth light source;
[0011] Through the i-th light source layout plan X i Get the angle θ formed by the coordinates of the jth light source and the coordinates of the test position T ij and irradiation distance d ij; When the jth light source is on the back of the mirror, the illumination distance d ij is the cumulative distance that the jth light source is reflected to the wall and then reflected from the wall again to the test position T, and the angle θ ij It is the angle between the path of the j-th light source reflected to the wall and reflected again from the wall and the line connecting the wall reflection point to the test position T; if the j-th light source is on the front of the mirror, the directional coefficient z ij =1, and the jth light source is set at the back of the mirror with a directional coefficient z ij =0; the back of the mirror is set as a virtual wall, ρ is the reflectivity of the wall;
[0012] The i-th light source layout plan X i The illumination E(X i ) is calculated as:
[0013]
[0014] Change the coordinates of the test position T and test the illumination E(X i ), and find multiple illumination E(X i ), and the i-th light source layout scheme X is obtained based on the variance i The illumination uniformity U(X i );
[0015] The i-th light source layout plan X i Visual comfort C(X i ) is calculated as:
[0016]
[0017] Where E(X i ) is the illumination at the test position T, T(X i ) is the color temperature at the test position T, E0 is the ideal illumination of the lamp mirror in the set usage scenario, and T0 is the ideal color temperature of the lamp mirror in the set usage scenario; σ b is the set illumination tolerance, σ T is the set color temperature tolerance; the color temperature T(X i ) is obtained by superimposing the color temperature of the light source and the brightness of the light source reaching the test position T;
[0018] Change the coordinates of the test position T and test the visual comfort C(X i ), find the visual comfort C(X i ) is the mean value of visual comfort
[0019] Calculate the light fitness F(Xi ), light adaptation F(X i ) is calculated as:
[0020]
[0021] Where ω1 and ω2 are based on the illumination uniformity U(X i ) and mean visual comfort The parameter range is normalized and the coefficients of weight distribution are calculated.
[0022] Furthermore, the color temperature T(X i ) is obtained by superimposing the color temperature of the light source and the brightness of the light source at the test position T, including:
[0023] At the test position T, the color temperature T(X i ) is calculated as:
[0024]
[0025] Furthermore, the method further comprises:
[0026] The mirror surface is set as an xy coordinate plane, and the light source coordinates are obtained by using the light source mark coordinates of the light source with a state of 1 in the parameter state of the light source in the light source layout plan in the light mirror design file, and the offset threshold of the light source coordinates in the x-axis direction is set as the distance between the light source center and the light source edge along the x-axis direction, and the offset threshold of the light source coordinates in the y-axis direction is set as the distance between the light source center and the light source edge along the y-axis direction. The offset threshold is divided into several equal distances and set as the offset step. The light source in the light source layout plan is moved along the x-axis or y-axis direction by an offset step each time, and the corresponding light adaptation is calculated respectively; when the light adaptation is the highest, the accumulated offset step at this time is used to correct the installation position of the light source in the light source layout plan.
[0027] Furthermore, the method of moving the light sources in the light source layout scheme along the x-axis or y-axis direction by one offset step each time includes:
[0028] Move the light sources in the light source layout plan along the x-axis by an offset step, and use the gradient descent method to obtain the extreme value of the light fitness in the x-axis direction and the corresponding x-axis cumulative offset; move the light sources in the light source layout plan along the y-axis by an offset step, and use the gradient descent method to obtain the extreme value of the light fitness in the y-axis direction and the corresponding y-axis cumulative offset; use the x-axis cumulative offset and the y-axis cumulative offset as the cumulative offset step.
[0029] Based on the same inventive concept, on the other hand, the present invention also provides a lighting source lighting effect detection system in the design process of an intelligent light mirror, the system comprising:
[0030] A lamp mirror parameter acquisition module is used to link to a lamp mirror design file of a computer-aided design software, read the lamp mirror parameters of the lamp mirror design file, the lamp mirror parameters include mirror direction area parameters and mirror frame area parameters; set the position boundary conditions and layout boundary conditions of the lamp source, the position boundary conditions are the restriction conditions that the installation position of the lamp source needs to meet, and the position boundary conditions are set according to the mirror frame area parameters and the mirror direction area parameters; the layout boundary conditions are the restriction conditions that the overall installation layout of multiple lamp sources needs to meet;
[0031] A light source layout scheme generating module is used to obtain the number of light sources N that can be installed through the size parameters and position boundary conditions of the light sources, generate N arranged light sources under the position boundary conditions of the light sources, each light source is provided with a parameter state including an existence state, brightness and color temperature, wherein the existence state includes two states of 0 or 1; generate an initial population of light source layout schemes, the initial population includes P individuals X, each individual represents a light source layout scheme, each light source layout scheme has N light sources arranged under the position boundary conditions of the light sources, and the parameter states of the light sources are randomly generated; remove individuals in the initial population that do not meet the layout boundary conditions to obtain Q individuals X;
[0032] The light source layout scheme iteration module is used to iteratively evolve the initial population, and the iterative evolution steps include: at the set test position T facing the light mirror, sequentially evaluating the illumination fitness of the individuals in the initial population under the parameter state, wherein the illumination fitness is based on the illumination uniformity and visual comfort; selecting the winning individuals through the roulette wheel selection method according to the illumination fitness ranking, crossover and mutation of the winning individuals to obtain the offspring individuals X′, and eliminating the offspring individuals X′ that do not meet the layout boundary conditions until Q offspring individuals X′ are obtained; replacing the initial population with the offspring individuals X′, and iteratively evolving again until the improvement of the illumination fitness of the offspring individuals and the parent individuals is lower than the set fitness threshold; and using the parameter state of the final winning individual after the iterative evolution as the layout scheme of the light source in the light mirror design file.
[0033] Furthermore, the system further comprises:
[0034] The illumination fitness calculation module is used to obtain the individual X of the i-th light source layout scheme in the initial population i ={(s i1 ,b i1 ,t i1 ),…,(s ij ,b ij ,t ij ),…,(s iN ,b iN ,t iN )}, where s ijRepresents the i-th light source layout plan X i The existence state of the j-th light source, b ij Represents the i-th light source layout plan X i The brightness of the jth light source, t ij Represents the i-th light source layout plan X i The color temperature of the jth light source;
[0035] Through the i-th light source layout plan X i Get the angle θ formed by the coordinates of the jth light source and the coordinates of the test position T ij and irradiation distance d ij ; When the jth light source is on the back of the mirror, the illumination distance d ij is the cumulative distance that the jth light source is reflected to the wall and then reflected from the wall again to the test position T, and the angle θ ij It is the angle between the path of the j-th light source reflected to the wall and reflected again from the wall and the line connecting the wall reflection point to the test position T; if the j-th light source is on the front of the mirror, the directional coefficient z ij =1, and the jth light source is set at the back of the mirror with a directional coefficient z ij =0; the back of the mirror is set as a virtual wall, ρ is the reflectivity of the wall;
[0036] The i-th light source layout plan X i The illumination E(X i ) is calculated as:
[0037]
[0038] Change the coordinates of the test position T and test the illumination E(X i ), and find multiple illumination E(X i ), and the i-th light source layout scheme X is obtained based on the variance i The illumination uniformity U(X i );
[0039] The i-th light source layout plan X i Visual comfort C(X i ) is calculated as:
[0040]
[0041] Where E(X i ) is the illumination at the test position T, T(X i ) is the color temperature at the test position T, E0 is the ideal illumination of the lamp mirror in the set usage scenario, and T0 is the ideal color temperature of the lamp mirror in the set usage scenario; σ b is the set illumination tolerance, σT is the set color temperature tolerance; the color temperature T(X i ) is obtained by superimposing the color temperature of the light source and the brightness of the light source reaching the test position T;
[0042] Change the coordinates of the test position T and test the visual comfort C(X i ), find the visual comfort C(X i ) is the mean value of visual comfort
[0043] Calculate the light fitness F(X i ), light adaptation F(X i ) is calculated as:
[0044]
[0045] Where ω1 and ω2 are based on the illumination uniformity U(X i ) and mean visual comfort The parameter range is normalized and the coefficients of weight distribution are calculated.
[0046] Furthermore, the illumination adaptability calculation module also includes a method for obtaining the color temperature T(X i ), where color temperature T(X i ) is calculated as:
[0047]
[0048] Furthermore, the system further comprises:
[0049] An offset adjustment module is used to set the mirror surface as an xy coordinate plane, obtain the light source coordinates from the light source mark coordinates of the light source with a state of 1 in the parameter state of the light source in the light source layout plan in the light mirror design file, set the offset threshold of the light source coordinates in the x-axis direction to the distance between the light source center and the light source edge along the x-axis direction, set the offset threshold of the light source coordinates in the y-axis direction to the distance between the light source center and the light source edge along the y-axis direction, divide the offset threshold into several equal distances as the offset step, move the light source in the light source layout plan along the x-axis or y-axis direction one offset step at a time, and calculate the corresponding lighting adaptability respectively; when the lighting adaptability is the highest, use the accumulated offset step at this time to correct the installation position of the light source in the light source layout plan.
[0050] Furthermore, the offset adjustment module also includes a module for moving the light sources in the light source layout scheme along the x-axis by an offset step, and obtaining the extreme value of the light fitness in the x-axis direction and the corresponding x-axis cumulative offset by the gradient descent method; moving the light sources in the light source layout scheme along the y-axis by an offset step, and obtaining the extreme value of the light fitness in the y-axis direction and the corresponding y-axis cumulative offset by the gradient descent method; and using the x-axis cumulative offset and the y-axis cumulative offset as the cumulative offset step.
[0051] (3) Beneficial effects
[0052] Compared with the prior art, the present invention detects the light adaptability during the lamp mirror design process, and obtains an optimized solution for the light source layout through continuous iterative optimization of the light adaptability; at the same time, the layout of the light source on the front and back of the mirror is taken into consideration, and the position of the light source is fine-tuned based on the optimized layout plan to further improve the light adaptability of the light source. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 This is a flowchart of a method for detecting lighting effects of a light source in a design process of an intelligent light mirror according to Embodiment 1 of the present invention;
[0054] Figure 2 is a schematic diagram of a smart light mirror according to Embodiment 1 of the present invention;
[0055] Figure 3 This is a module block diagram of a light source lighting effect detection system in a smart light mirror design process according to Embodiment 2 of the present invention;
[0056] 1-Mirror frame; 2-Light source; 3-Mirror surface; 4-Switch button. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] Before giving examples, it is necessary to explain the application scenarios of the present invention. In the design process of the smart light mirror, how to arrange the light source in the correct position can improve the user's best lighting effect when making up or tidying up. Computer-aided design software can have corresponding size information and spatial position information, but the current design of the light mirror still relies on the personal experience of the designer, or selectively ignores the optimization of the lighting effect when the lighting effect error is not large. The current light source, that is, smart lamps such as LED lamps, can already achieve different color temperature and brightness adjustments for a single lamp. The light source design that relies on the personal experience of the designer often simply selects the same color temperature or brightness for all lamps, or has a color temperature or brightness adjustment function, but adjusts all light sources as a whole, which actually does not fully utilize the function of intelligent adjustment of a single LED light source. Our ultimate goal is to achieve the best lighting effect at a set test position, such as the midline area directly in front of the mirror, so we should pay attention to the final lighting effect and intelligently plan the color temperature or brightness of the light source based on the final lighting effect.
[0059] Example 1: Figure 1 As shown, this embodiment provides a method for detecting lighting effects of light sources in a smart light mirror design process, the method comprising:
[0060] Link to the lamp mirror design file of the computer-aided design software, read the lamp mirror parameters of the lamp mirror design file, the lamp mirror parameters include mirror direction area parameters and mirror frame area parameters; set the position boundary conditions and layout boundary conditions of the lamp source, the position boundary conditions are the restriction conditions that the installation position of the lamp source needs to meet, and the position boundary conditions are set according to the mirror frame area parameters and the mirror direction area parameters; the layout boundary conditions are the restriction conditions that the overall installation layout of multiple lamp sources needs to meet;
[0061] For example, the design team first created a three-dimensional model of the light mirror in CAD or other three-dimensional software. The three-dimensional model can be used to obtain the direction and area parameters of the mirror surface, such as the size and shape of the mirror surface, and the design parameters of the frame, such as the size. Based on the parameters of the mirror surface and the frame, the design team set the position boundary conditions of the light source, such as the number of light sources that can be accommodated when the frame is full of light sources, and the number of light sources that can be accommodated when the back of the mirror is full of light sources. Furthermore, the team also set the layout boundary conditions of the light sources. For example, in order to achieve visual balance and beauty, it may be required that the light sources must be symmetrically arranged on both sides of the frame, or arranged in a straight line with a specific spacing.
[0062] The number of light sources N that can be installed is obtained through the size parameters and position boundary conditions of the light sources, and N arranged light sources are generated under the position boundary conditions of the light sources. Each light source is provided with parameter states including existence state, brightness and color temperature, where the existence state includes two states of 0 or 1; an initial population of light source layout schemes is generated, and the initial population includes P individuals X, each individual represents a light source layout scheme, and each light source layout scheme has N light sources arranged under the position boundary conditions of the light sources, and the parameter states of the light sources are randomly generated; individuals that do not meet the layout boundary conditions in the initial population are eliminated to obtain Q individuals X;
[0063] For example, Figure 2 As shown, the main components of the light mirror include a mirror frame 1, a light source 2, a mirror surface 3 and a switch button 4, and the structures that can be clearly known include the back of the mirror surface and the wall behind the mirror surface after the light mirror is installed. The arrangement of the light source 2 on the mirror frame 1 is only drawn for example. After obtaining the parameter size of the relevant light mirror, a genetic algorithm is used to optimize the light source layout. First, according to the size parameters of the light source and the physical limitations of the light mirror such as the width of the frame and the space behind the mirror surface, the position boundary conditions where the light source can be installed are determined, thereby calculating the maximum number of light sources N that can be installed. Then, under the constraints of these position boundary conditions, an initial population containing P individuals X is randomly generated, each of which represents a potential light source layout scheme, in which each scheme randomly sets the existence state, brightness and color temperature of N light sources. It should be noted that if the existence state is 1, the light source exists, and if the existence state is 0, the light source does not exist. Then, by checking whether these initial plans meet the preset layout boundary conditions, such as the light sources must be arranged symmetrically or in a straight line, unqualified individuals are eliminated and Q individuals that meet all conditions are retained, preparing for further iterative evolution.
[0064] The initial population is iteratively evolved, and the iterative evolution steps include: at a set test position T facing the light mirror, sequentially evaluating the illumination fitness of the individuals in the initial population under the parameter state, wherein the illumination fitness is based on illumination uniformity and visual comfort; selecting the winning individuals through a roulette wheel selection method according to the illumination fitness ranking, performing crossover and mutation on the winning individuals to obtain offspring individuals X′, and eliminating offspring individuals X′ that do not meet the layout boundary conditions until Q offspring individuals X′ are obtained; replacing the initial population with offspring individuals X′, and iteratively evolving again until the improvement in illumination fitness of the offspring individuals and the parent individuals is lower than the set fitness threshold; and using the parameter state of the final winning individual after completing the iterative evolution as the layout plan of the light source in the light mirror design file.
[0065] For example, the iterative evolution process is started by using a genetic algorithm. First, the illumination fitness of each light source layout scheme in the initial population is evaluated, which includes measuring the impact of each scheme on the illumination uniformity and visual comfort at the set test position T. A scheme with high illumination fitness means the best experience of the illumination process, such as providing sufficient brightness and ensuring the uniform distribution of light on the model's face. Then, these individuals are sorted based on illumination fitness by the roulette wheel selection method, and the best performing individuals are selected for crossover and mutation operations to generate a new generation of offspring individuals X'. At the same time, those offspring individuals X' that do not meet the boundary conditions of the light source layout are eliminated, and Q offspring individuals X' that meet the conditions are retained. This process is repeated, and each round of iteration is looking for a better light source layout scheme, until the improvement of the illumination fitness of the new generation of individuals compared with the previous generation is lower than the set threshold, indicating that it is close to the optimal solution. Finally, the best individual obtained by this iterative evolution process is determined as the light source layout scheme.
[0066] Furthermore, the method of sequentially evaluating the illumination fitness of individuals in the initial population under the parameter state includes: obtaining the individual X of the i-th light source layout scheme in the initial population i ={(s i1 ,b i1 ,t i1 ),…,(s ij ,b ij ,t ij ),…,(s iN ,b iN ,t iN )}, where s ij Represents the i-th light source layout plan X i The existence state of the j-th light source, b ij Represents the i-th light source layout plan X i The brightness of the jth light source, t ij Represents the i-th light source layout plan X i The color temperature of the jth light source;
[0067] Through the i-th light source layout plan X i Get the angle θ formed by the coordinates of the jth light source and the coordinates of the test position T ij and irradiation distance d ij ; When the jth light source is on the back of the mirror, the illumination distance d ij is the cumulative distance that the jth light source is reflected to the wall and then reflected from the wall again to the test position T, and the angle θ ij It is the angle between the path of the j-th light source reflected to the wall and reflected again from the wall and the line connecting the wall reflection point to the test position T; if the j-th light source is on the front of the mirror, the directional coefficient z ij =1, and the jth light source is set at the back of the mirror with a directional coefficient zij =0; the back of the mirror is set as a virtual wall, ρ is the reflectivity of the wall;
[0068] The i-th light source layout plan X i The illumination E(X i ) is calculated as:
[0069]
[0070] Change the coordinates of the test position T and test the illumination E(X i ), and find multiple illumination E(X i ), and the i-th light source layout scheme X is obtained based on the variance i The illumination uniformity U(X i );
[0071] The i-th light source layout plan X i Visual comfort C(X i ) is calculated as:
[0072]
[0073] Where E(X i ) is the illumination at the test position T, T(X i ) is the color temperature at the test position T, E0 is the ideal illumination of the lamp mirror in the set usage scenario, and T0 is the ideal color temperature of the lamp mirror in the set usage scenario; σ b is the set illumination tolerance, σ T is the set color temperature tolerance; the color temperature T(X i ) is obtained by superimposing the color temperature of the light source and the brightness of the light source reaching the test position T;
[0074] Change the coordinates of the test position T and test the visual comfort C(X i ), find the visual comfort C(X i ) is the mean value of visual comfort
[0075] Calculate the light fitness F(X i ), light adaptation F(X i ) is calculated as:
[0076]
[0077] Where ω1 and ω2 are based on the illumination uniformity U(X i ) and mean visual comfort The parameter range is normalized and the coefficients of weight distribution are calculated.
[0078] For example, the light source layout is optimized by genetic algorithm. First, each light source layout scheme individual X is defined. i , which includes the existence status s of the light source ij , brightness b ij and color temperature t ij After randomly generating these parameters, the initial population is obtained. The position of the light source on the back of the mirror needs to be considered. The reflection characteristics of the wall are used to consider the path of the light reflected from the wall to the test position. The irradiation distance and angle are calculated to estimate the illumination. Illumination E(X i ) takes into account the effects of direct and reflected light, while visual comfort It is based on the deviation of illumination and color temperature from the ideal value. i ) is used as the optimization goal, combining the weighted sum of lighting uniformity and visual comfort, where the weights ω1 and ω2 are adjusted according to the actual needs of the scene. The ideal illumination E0 and the ideal color temperature T0 should be determined based on specific application scenarios and user preferences. For example, the ideal illumination for an office may be between 500 and 750 lumens, while a living space may prefer a softer illumination and color temperature. These values can be determined by consulting relevant design standards or conducting user surveys. Tolerance standard deviation σ b and σ T reflects the tolerance to illumination and color temperature deviations. These parameters need to be set based on experimental data and visual science literature, such as b Set to 10% to 20% of the ideal illumination, σ T Set to 5 to 10 percent of your ideal color temperature.
[0079] Furthermore, the color temperature T(X i ) is obtained by superimposing the color temperature of the light source and the brightness of the light source at the test position T, including:
[0080] At the test position T, the color temperature T(X i ) is calculated as:
[0081]
[0082] Exemplarily, a further embodiment is to calculate the color temperature contribution of all light sources to the test location, taking into account the existence, brightness, color temperature, position of each light source and the interactions between them, including front illumination and indirect illumination reflected by the wall.
[0083] Furthermore, the method further comprises:
[0084] The mirror surface is set as an xy coordinate plane, and the light source coordinates are obtained by using the light source mark coordinates of the light source with a state of 1 in the parameter state of the light source in the light source layout plan in the light mirror design file, and the offset threshold of the light source coordinates in the x-axis direction is set as the distance between the light source center and the light source edge along the x-axis direction, and the offset threshold of the light source coordinates in the y-axis direction is set as the distance between the light source center and the light source edge along the y-axis direction. The offset threshold is divided into several equal distances and set as the offset step. The light source in the light source layout plan is moved along the x-axis or y-axis direction by an offset step each time, and the corresponding light adaptation is calculated respectively; when the light adaptation is the highest, the accumulated offset step at this time is used to correct the installation position of the light source in the light source layout plan.
[0085] Exemplarily, the above-mentioned embodiments are arranged according to the existing limited space, such as the mirror frame and the back of the mirror. The light source position with the best lighting effect is finally found, that is, all areas are divided into many small areas that can accommodate a single light source. The planning is based on the maximum number of light sources that can be accommodated. The solution to find the best lighting effect is actually to find which of these small areas can be installed with light sources. However, this small area is not necessarily the original layout and may be offset by a certain distance. By setting the mirror as an xy coordinate plane and making fine position adjustments to the light source layout plan, the position of the light source is adjusted by a slight offset on the xy plane. The offset distance is limited to half the size of the light source. By evaluating the light adaptability of each offset position, the layout of the light source can be further optimized.
[0086] Furthermore, the method of moving the light sources in the light source layout scheme along the x-axis or y-axis direction by one offset step each time includes:
[0087] Move the light sources in the light source layout plan along the x-axis by an offset step, and use the gradient descent method to obtain the extreme value of the light fitness in the x-axis direction and the corresponding x-axis cumulative offset; move the light sources in the light source layout plan along the y-axis by an offset step, and use the gradient descent method to obtain the extreme value of the light fitness in the y-axis direction and the corresponding y-axis cumulative offset; use the x-axis cumulative offset and the y-axis cumulative offset as the cumulative offset step.
[0088] For example, by fine-tuning the position of the light source on the xy plane and applying the gradient descent method to find the extreme value of the light adaptation, the light source layout can be accurately optimized to achieve a more uniform and comfortable lighting effect. By fine-tuning the offset distance, the impact of different light source positions on the lighting effect is detected, and finally the optimal position for improving lighting uniformity and visual comfort is found through the cumulative offset in the x-axis and y-axis directions.
[0089] Embodiment 2: Based on the same inventive concept, Figure 3As shown, this embodiment also provides a lighting source lighting effect detection system in the design process of an intelligent light mirror, and the system includes:
[0090] A lamp mirror parameter acquisition module is used to link to a lamp mirror design file of a computer-aided design software, read the lamp mirror parameters of the lamp mirror design file, the lamp mirror parameters include mirror direction area parameters and mirror frame area parameters; set the position boundary conditions and layout boundary conditions of the lamp source, the position boundary conditions are the restriction conditions that the installation position of the lamp source needs to meet, and the position boundary conditions are set according to the mirror frame area parameters and the mirror direction area parameters; the layout boundary conditions are the restriction conditions that the overall installation layout of multiple lamp sources needs to meet;
[0091] A light source layout scheme generating module is used to obtain the number of light sources N that can be installed through the size parameters and position boundary conditions of the light sources, generate N arranged light sources under the position boundary conditions of the light sources, each light source is provided with a parameter state including an existence state, brightness and color temperature, wherein the existence state includes two states of 0 or 1; generate an initial population of light source layout schemes, the initial population includes P individuals X, each individual represents a light source layout scheme, each light source layout scheme has N light sources arranged under the position boundary conditions of the light sources, and the parameter states of the light sources are randomly generated; remove individuals in the initial population that do not meet the layout boundary conditions to obtain Q individuals X;
[0092] The light source layout scheme iteration module is used to iteratively evolve the initial population, and the iterative evolution steps include: at the set test position T facing the light mirror, sequentially evaluating the illumination fitness of the individuals in the initial population under the parameter state, wherein the illumination fitness is based on the illumination uniformity and visual comfort; selecting the winning individuals through the roulette wheel selection method according to the illumination fitness ranking, crossover and mutation of the winning individuals to obtain the offspring individuals X′, and eliminating the offspring individuals X′ that do not meet the layout boundary conditions until Q offspring individuals X′ are obtained; replacing the initial population with the offspring individuals X′, and iteratively evolving again until the improvement of the illumination fitness of the offspring individuals and the parent individuals is lower than the set fitness threshold; and using the parameter state of the final winning individual after the iterative evolution as the layout scheme of the light source in the light mirror design file.
[0093] Furthermore, the system further comprises:
[0094] The illumination fitness calculation module is used to obtain the individual X of the i-th light source layout scheme in the initial population i ={(s i1 ,b i1 ,t i1 ),…,(s ij ,b ij ,t ij ),…,(s iN ,biN ,t iN )}, where s ij Represents the i-th light source layout plan X i The existence state of the j-th light source, b ij Represents the i-th light source layout plan X i The brightness of the jth light source, t ij Represents the i-th light source layout plan X i The color temperature of the jth light source;
[0095] Through the i-th light source layout plan X i Get the angle θ formed by the coordinates of the jth light source and the coordinates of the test position T ij and irradiation distance d ij ; When the jth light source is on the back of the mirror, the illumination distance d ij is the cumulative distance that the jth light source is reflected to the wall and then reflected from the wall again to the test position T, and the angle θ ij It is the angle between the path of the j-th light source reflected to the wall and reflected again from the wall and the line connecting the wall reflection point to the test position T; if the j-th light source is on the front of the mirror, the directional coefficient z ij =1, and the jth light source is set at the back of the mirror with a directional coefficient z ij =0; the back of the mirror is set as a virtual wall, ρ is the reflectivity of the wall;
[0096] The i-th light source layout plan X i The illumination E(X i ) is calculated as:
[0097]
[0098] Change the coordinates of the test position T and test the illumination E(X i ), and find multiple illumination E(X i ), and the i-th light source layout scheme X is obtained based on the variance i The illumination uniformity U(X i );
[0099] The i-th light source layout plan X i Visual comfort C(X i ) is calculated as:
[0100]
[0101] Where E(X i ) is the illumination at the test position T, T(X i) is the color temperature at the test position T, E0 is the ideal illumination of the lamp mirror in the set usage scenario, and T0 is the ideal color temperature of the lamp mirror in the set usage scenario; σ b is the set illumination tolerance, σ T is the set color temperature tolerance; the color temperature T(X i ) is obtained by superimposing the color temperature of the light source and the brightness of the light source reaching the test position T;
[0102] Change the coordinates of the test position T and test the visual comfort C(X i ), find the visual comfort C(X i ) is the mean value of visual comfort
[0103] Calculate the light fitness F(X i ), light adaptation F(X i ) is calculated as:
[0104]
[0105] Where ω1 and ω2 are based on the illumination uniformity U(X i ) and mean visual comfort The parameter range is normalized and the coefficients of weight distribution are calculated.
[0106] Furthermore, the illumination adaptability calculation module also includes a method for obtaining the color temperature T(X i ), where color temperature T(X i ) is calculated as:
[0107]
[0108] Furthermore, the system further comprises:
[0109] An offset adjustment module is used to set the mirror surface as an xy coordinate plane, obtain the light source coordinates from the light source mark coordinates of the light source with a state of 1 in the parameter state of the light source in the light source layout plan in the light mirror design file, set the offset threshold of the light source coordinates in the x-axis direction to the distance between the light source center and the light source edge along the x-axis direction, set the offset threshold of the light source coordinates in the y-axis direction to the distance between the light source center and the light source edge along the y-axis direction, divide the offset threshold into several equal distances as the offset step, move the light source in the light source layout plan along the x-axis or y-axis direction one offset step at a time, and calculate the corresponding lighting adaptability respectively; when the lighting adaptability is the highest, use the accumulated offset step at this time to correct the installation position of the light source in the light source layout plan.
[0110] Furthermore, the offset adjustment module also includes a method for moving the light sources in the light source layout scheme along the x-axis by an offset step, and obtaining the extreme value of the light fitness in the x-axis direction and the corresponding x-axis cumulative offset by the gradient descent method; moving the light sources in the light source layout scheme along the y-axis by an offset step, and obtaining the extreme value of the light fitness in the y-axis direction and the corresponding y-axis cumulative offset by the gradient descent method; and using the x-axis cumulative offset and the y-axis cumulative offset as the cumulative offset step.
[0111] It should be noted that, regarding the system in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0112] Finally, it should be noted that: Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for detecting lighting effects of light sources in the design process of intelligent light mirrors, characterized in that: The method comprises: Link to the lamp mirror design file of the computer-aided design software, read the lamp mirror parameters of the lamp mirror design file, the lamp mirror parameters include mirror direction area parameters and mirror frame area parameters; set the position boundary conditions and layout boundary conditions of the lamp source, the position boundary conditions are the restriction conditions that the installation position of the lamp source needs to meet, and the position boundary conditions are set according to the mirror frame area parameters and the mirror direction area parameters; the layout boundary conditions are the restriction conditions that the overall installation layout of multiple lamp sources needs to meet; The number of light sources N that can be installed is obtained through the size parameters and position boundary conditions of the light sources, and N arranged light sources are generated under the position boundary conditions of the light sources. Each light source is provided with parameter states including existence state, brightness and color temperature, where the existence state includes two states of 0 or 1; an initial population of light source layout schemes is generated, and the initial population includes P individuals X, each individual represents a light source layout scheme, and each light source layout scheme has N light sources arranged under the position boundary conditions of the light sources, and the parameter states of the light sources are randomly generated; individuals that do not meet the layout boundary conditions in the initial population are eliminated to obtain Q individuals X; The initial population is iteratively evolved, and the iterative evolution steps include: at a set test position T facing the light mirror, sequentially evaluating the illumination fitness of the individuals in the initial population under the parameter state, wherein the illumination fitness is based on illumination uniformity and visual comfort; selecting the winning individuals through a roulette wheel selection method according to the illumination fitness ranking, performing crossover and mutation on the winning individuals to obtain offspring individuals X′, and eliminating offspring individuals X′ that do not meet the layout boundary conditions until Q offspring individuals X′ are obtained; replacing the initial population with offspring individuals X′, and iteratively evolving again until the improvement in illumination fitness of the offspring individuals and the parent individuals is lower than the set fitness threshold; and using the parameter state of the final winning individual after completing the iterative evolution as the layout plan of the light source in the light mirror design file.
2. A method for detecting lighting effects of a light source in a design process of an intelligent light mirror as claimed in claim 1, characterized in that: The method of sequentially evaluating the light fitness of individuals in the initial population under the parameter state comprises: Get the individual X of the i-th light source layout plan in the initial population i ={(s i1 , b i1 , t i1 ),...,(s ij , b ij , t ij ),...,(s iN , b iN , t iN )}, where s ij Represents the i-th light source layout plan X i The existence state of the j-th light source, b ij Represents the i-th light source layout plan X i The brightness of the jth light source, t ij Represents the i-th light source layout plan X i The color temperature of the jth light source; Through the i-th light source layout plan X i Get the angle θ formed by the coordinates of the jth light source and the coordinates of the test position T ij and irradiation distance d ij ; When the jth light source is on the back of the mirror, the illumination distance d ij is the cumulative distance that the jth light source is reflected to the wall and then reflected from the wall again to the test position T, and the angle θ ij It is the angle between the path of the j-th light source reflected to the wall and reflected again from the wall and the line connecting the wall reflection point to the test position T; if the j-th light source is on the front of the mirror, the directional coefficient z ij =1, and the jth light source is set at the back of the mirror with a directional coefficient z ij =0; the back of the mirror is set as a virtual wall, ρ is the reflectivity of the wall; The i-th light source layout plan X i The illumination E(X i ) is calculated as: Change the coordinates of the test position T and test the illumination E(X i ), and find multiple illumination E(X i ), and the i-th light source layout scheme X is obtained based on the variance i The illumination uniformity U(X i ); The i-th light source layout plan X i Visual comfort C(X i ) is calculated as: Where E(X i ) is the illumination at the test position T, T(X i ) is the color temperature at the test position T, b0 is the ideal illumination of the lamp mirror in the set usage scenario, T0 is the ideal color temperature of the lamp mirror in the set usage scenario; σ b is the set illumination tolerance, σ T is the set color temperature tolerance; the color temperature T(X i ) is obtained by superimposing the color temperature of the light source and the brightness of the light source reaching the test position T; Change the coordinates of the test position T and test the visual comfort C(X i ), find the visual comfort C(X i ) is the mean value of visual comfort Calculate the light fitness F(X i ), light adaptation F(X i ) is calculated as: Where ω1 and ω2 are based on the illumination uniformity U(X i ) and mean visual comfort The parameter range is normalized and the coefficients of weight distribution are calculated.
3. A method for detecting lighting effects of a light source in a design process of an intelligent light mirror as claimed in claim 2, characterized in that: The color temperature T(X i ) is obtained by superimposing the color temperature of the light source and the brightness of the light source at the test position T, including: At the test position T, the color temperature T(X i ) is calculated as:
4. The method for detecting lighting effects of a light source in a design process of an intelligent light mirror according to claim 1, characterized in that: The method further comprises: The mirror surface is set as an xy coordinate plane, and the light source coordinates are obtained by using the light source mark coordinates of the light source with a state of 1 in the parameter state of the light source in the light source layout plan in the light mirror design file, and the offset threshold of the light source coordinates in the x-axis direction is set as the distance between the light source center and the light source edge along the x-axis direction, and the offset threshold of the light source coordinates in the y-axis direction is set as the distance between the light source center and the light source edge along the y-axis direction. The offset threshold is divided into several equal distances and set as the offset step. The light source in the light source layout plan is moved along the x-axis or y-axis direction by an offset step each time, and the corresponding light adaptation is calculated respectively; when the light adaptation is the highest, the accumulated offset step at this time is used to correct the installation position of the light source in the light source layout plan.
5. The method for detecting lighting effect of a light source in the design process of an intelligent light mirror as claimed in claim 4, characterized in that: The method of moving the light sources in the light source layout scheme along the x-axis or y-axis direction by one offset step each time comprises: Move the light sources in the light source layout plan along the x-axis by an offset step, and use the gradient descent method to obtain the extreme value of the light fitness in the x-axis direction and the corresponding x-axis cumulative offset; move the light sources in the light source layout plan along the y-axis by an offset step, and use the gradient descent method to obtain the extreme value of the light fitness in the y-axis direction and the corresponding y-axis cumulative offset; use the x-axis cumulative offset and the y-axis cumulative offset as the cumulative offset step.
6. A lighting source lighting effect detection system in the process of intelligent light mirror design, characterized in that: The system comprises: A lamp mirror parameter acquisition module is used to link to a lamp mirror design file of a computer-aided design software, read the lamp mirror parameters of the lamp mirror design file, the lamp mirror parameters include mirror direction area parameters and mirror frame area parameters; set the position boundary conditions and layout boundary conditions of the lamp source, the position boundary conditions are the restriction conditions that the installation position of the lamp source needs to meet, and the position boundary conditions are set according to the mirror frame area parameters and the mirror direction area parameters; the layout boundary conditions are the restriction conditions that the overall installation layout of multiple lamp sources needs to meet; A light source layout scheme generating module is used to obtain the number of light sources N that can be installed through the size parameters and position boundary conditions of the light sources, generate N arranged light sources under the position boundary conditions of the light sources, each light source is provided with a parameter state including an existence state, brightness and color temperature, wherein the existence state includes two states of 0 or 1; generate an initial population of light source layout schemes, the initial population includes P individuals X, each individual represents a light source layout scheme, each light source layout scheme has N light sources arranged under the position boundary conditions of the light sources, and the parameter states of the light sources are randomly generated; remove individuals in the initial population that do not meet the layout boundary conditions to obtain Q individuals X; The light source layout scheme iteration module is used to iteratively evolve the initial population, and the iterative evolution steps include: at the set test position T facing the light mirror, sequentially evaluating the illumination fitness of the individuals in the initial population under the parameter state, wherein the illumination fitness is based on the illumination uniformity and visual comfort; selecting the winning individuals through the roulette wheel selection method according to the illumination fitness ranking, crossover and mutation of the winning individuals to obtain the offspring individuals X′, and eliminating the offspring individuals X′ that do not meet the layout boundary conditions until Q offspring individuals X′ are obtained; replacing the initial population with the offspring individuals X′, and iteratively evolving again until the improvement of the illumination fitness of the offspring individuals and the parent individuals is lower than the set fitness threshold; and using the parameter state of the final winning individual after the iterative evolution as the layout scheme of the light source in the light mirror design file.
7. The intelligent light mirror design process lighting source lighting effect detection system as claimed in claim 6, characterized in that: The system further comprises: The illumination fitness calculation module is used to obtain the individual X of the i-th light source layout scheme in the initial population i ={(s i1 , b i1 , t i1 ),...,(s ij , b ij , t ij ),...,(s iN , b iN , t iN )}, where s ij Represents the i-th light source layout plan X i The existence state of the j-th light source, b ij Represents the i-th light source layout plan X i The brightness of the jth light source, t ij Represents the i-th light source layout plan X i The color temperature of the jth light source; Through the i-th light source layout plan X i Get the angle θ formed by the coordinates of the jth light source and the coordinates of the test position T ij and irradiation distance d ij ; When the jth light source is on the back of the mirror, the illumination distance d ij is the cumulative distance that the jth light source is reflected to the wall and then reflected from the wall again to the test position T, and the angle θ ij It is the angle between the path of the j-th light source reflected to the wall and reflected again from the wall and the line connecting the wall reflection point to the test position T; if the j-th light source is on the front of the mirror, the directional coefficient z ij =1, and the jth light source is set at the back of the mirror with a directional coefficient z ij =0; the back of the mirror is set as a virtual wall, ρ is the reflectivity of the wall; The i-th light source layout plan X i The illumination E(X i ) is calculated as: Change the coordinates of the test position T and test the illumination E(X i ), and find multiple illumination E(X i ), and the i-th light source layout scheme X is obtained based on the variance i The illumination uniformity U(X i ); The i-th light source layout plan X i Visual comfort C(X i ) is calculated as: Where E(X i ) is the illumination at the test position T, T(X i ) is the color temperature at the test position T, b0 is the ideal illumination of the lamp mirror in the set usage scenario, T0 is the ideal color temperature of the lamp mirror in the set usage scenario; σ b is the set illumination tolerance, σ T is the set color temperature tolerance; the color temperature T(X i ) is obtained by superimposing the color temperature of the light source and the brightness of the light source reaching the test position T; Change the coordinates of the test position T and test the visual comfort C(X i ), find the visual comfort C(X i ) is the mean value of visual comfort Calculate the light fitness F(X i ), light adaptation F(X i ) is calculated as: Where ω1 and ω2 are based on the illumination uniformity U(X i ) and mean visual comfort The parameter range is normalized and the coefficients of weight distribution are calculated.
8. The intelligent light mirror design process lighting source lighting effect detection system as claimed in claim 7, characterized in that: The illumination adaptability calculation module also includes a method for obtaining the color temperature T(X i ), where color temperature T(X i ) is calculated as:
9. The intelligent light mirror design process lighting source lighting effect detection system as claimed in claim 6, characterized in that: The system further comprises: An offset adjustment module is used to set the mirror surface as an xy coordinate plane, obtain the light source coordinates from the light source mark coordinates of the light source with a state of 1 in the parameter state of the light source in the light source layout plan in the light mirror design file, set the offset threshold of the light source coordinates in the x-axis direction to the distance between the light source center and the light source edge along the x-axis direction, set the offset threshold of the light source coordinates in the y-axis direction to the distance between the light source center and the light source edge along the y-axis direction, divide the offset threshold into several equal distances as the offset step, move the light source in the light source layout plan along the x-axis or y-axis direction one offset step at a time, and calculate the corresponding lighting adaptability respectively; when the lighting adaptability is the highest, use the accumulated offset step at this time to correct the installation position of the light source in the light source layout plan.
10. The intelligent light mirror design process lighting source lighting effect detection system as claimed in claim 9, characterized in that: The offset adjustment module also includes a method for moving the light source in the light source layout scheme along the x-axis by an offset step length, and obtaining the extreme value of the light fitness in the x-axis direction and the corresponding x-axis cumulative offset by a gradient descent method; moving the light source in the light source layout scheme along the y-axis by an offset step length, and obtaining the extreme value of the light fitness in the y-axis direction and the corresponding y-axis cumulative offset by a gradient descent method; The accumulated offset of the x-axis and the accumulated offset of the y-axis are used as the accumulated offset step.
Citation Information
Patent Citations
A DNN-based neural network indoor lamp source layout method
CN109167630A
LED light source layout method based on genetic algorithm optimization
CN110457805A
Bathroom mirror lighting control device and control method
CN113347765A
Light source layout solving model of g-NSGA2 algorithm based on roulette
CN116757089A
Multi-group intelligent lamp mirror cooperative illumination control method and system
CN117676992A
