An intelligent lamp control method and control system based on environmental images

By obtaining the HSV data and IR grayscale data of the environment image, building feature sequences, and using the many-to-many recurrent neural network model to generate intelligent lamp control instructions, solving the complex hardware problems of the existing intelligent lamp control system, achieving fast and accurate lighting adjustments to meet users' personalized needs.

CN114549864BActive Publication Date: 2025-07-04XIAMEN YANKON ENERGETIC LIGHTING CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111679309.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-07-04
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

The existing smart light control system requires complex hardware equipment, making it difficult to quickly adjust the color and brightness of the light according to environmental changes, and cannot meet the personalized needs of users.

Method used

By obtaining the HSV data and IR grayscale data of the environment image, a feature sequence is constructed, and a multi-to-multi-cycle neural network model is used to train the color and brightness instructions of the smart lamp to achieve intelligent lamp control without hardware equipment.

Benefits of technology

It realizes the rapid and accurate adjustment of the color and brightness of the smart lamp according to environmental information, and is simple to operate and conforms to the configuration of existing home smart lamps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114549864B_ABST
    Figure CN114549864B_ABST
Patent Text Reader

Abstract

The present invention provides an intelligent lamp control method based on environmental images. First, the HSV data and IR grayscale data of the environmental images are obtained; according to the HSV data and IR grayscale data of the environmental images, a feature sequence is constructed; the feature sequence is input into a trained network model to obtain the corresponding color and brightness of the intelligent lamp; an instruction for the corresponding color and brightness of the intelligent lamp is sent to control the intelligent lamp; based on image recognition and machine learning, the color and brightness of the intelligent lamp can be quickly adjusted according to environmental information. The intelligent lamp control method based on environmental images provided by the present invention is simple to operate, accurate in recognition, and does not require hardware devices, meeting the configuration of existing household intelligent lamps.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart home, and particularly to an intelligent lamp control method and control system based on environmental images. Background Art

[0002] With the development of smart home, it can increasingly meet the personalized needs of users. As an important smart furniture, the intelligent lamp is responsible for illuminating the entire indoor environment and providing people with a comfortable living and working environment. However, in different weather and different spaces, the light and brightness presented by the environment are different. At this time, the required brightness and color of the lamp are also different.

[0003] In the prior art, CN105135263N discloses a brightness self - adaptive adjustable table lamp based on image analysis. In the solution, a photosensitive sensor is set to sense the environmental brightness and transmit it to the control module. The control module adjusts the brightness of the table lamp according to the control mechanism. The hardware structure and control mechanism are complex and not suitable for the configuration of existing smart homes. Summary of the Invention

[0004] The main object of the present invention is to overcome the above - mentioned defects in the prior art, and propose an intelligent lamp control method based on environmental images. Based on image recognition and machine learning, it can quickly adjust the color and brightness of the intelligent lamp according to environmental information, with simple operation and accurate recognition, and does not require hardware devices, which is in line with the configuration of existing smart home intelligent lamps.

[0005] The present invention adopts the following technical solutions:

[0006] An intelligent lamp control method based on environmental images, comprising:

[0007] Obtain the HSV data and IR grayscale data of the environmental image;

[0008] Construct a feature sequence according to the HSV data and IR grayscale data of the environmental image;

[0009] Input the feature sequence into the trained network model to obtain the corresponding color and brightness of the intelligent lamp;

[0010] Send instructions for the corresponding color and brightness of the intelligent lamp to control the intelligent lamp.

[0011] Before the above steps, it also includes training the network model, specifically:

[0012] Obtain the HSV data and IR grayscale data of the environmental image;

[0013] Construct a feature sequence based on the HSV data and IR grayscale data of the environmental image; and determine the color corresponding to the intelligent lamp as the first label according to the HSV data of the environmental image, and determine the brightness corresponding to the intelligent lamp as the second label according to the IR grayscale data of the environmental image;

[0014] Input the feature sequence, the first label, and the second label into a pre-trained network model for training to obtain a trained network model.

[0015] Specifically, determining the color corresponding to the intelligent lamp as the first label according to the HSV data of the environmental image and determining the brightness corresponding to the intelligent lamp as the second label according to the IR grayscale data of the environmental image is specifically as follows:

[0016] Obtain the color with the largest proportion in the environment according to the HSV data of the environmental image, and determine the color corresponding to the intelligent lamp in combination with the color types of the intelligent lamp;

[0017] Determine the average IR grayscale value of the environmental image according to the IR grayscale data of the environmental image, obtain the corresponding environmental brightness data, and add the set threshold to the corresponding environmental brightness data to determine the brightness of the intelligent lamp.

[0018] Specifically, constructing a feature sequence based on the HSV data and IR grayscale data of the environmental image is specifically as follows:

[0019] Take the average value of the H values of the pixels in the image as the first eigenvalue;

[0020] Take the average value of the S values of the pixels in the image as the second eigenvalue;

[0021] Take the average value of the V values of the pixels in the image as the third eigenvalue;

[0022] Take the average value of the IR values of the pixels in the image as the fourth eigenvalue;

[0023] Construct the first eigenvalue, the second eigenvalue, the third eigenvalue, and the fourth eigenvalue into a feature sequence.

[0024] Another aspect of the embodiments of the present invention provides an intelligent lamp control system based on an environmental image, including:

[0025] An environmental data acquisition unit: acquire the HSV data and IR grayscale data of the environmental image;

[0026] A feature sequence construction unit: construct a feature sequence according to the HSV data and IR grayscale data of the environmental image;

[0027] An intelligent lamp data acquisition unit: input the feature sequence into the trained network model to obtain the color and brightness corresponding to the intelligent lamp;

[0028] Transmission instruction unit: Transmit instructions corresponding to the color and brightness of the smart lamp to control the smart lamp.

[0029] Specifically, it further includes a model training unit that trains the network model, specifically as follows:

[0030] Obtain the HSV data and IR grayscale data of the environmental image;

[0031] Construct a feature sequence based on the HSV data and IR grayscale data of the environmental image; and determine the color corresponding to the smart lamp as the first label according to the HSV data of the environmental image, and determine the brightness corresponding to the smart lamp as the second label according to the IR grayscale data of the environmental image;

[0032] Input the feature sequence, the first label, and the second label into the pre-trained network model for training to obtain a trained network model.

[0033] Specifically, determining the color corresponding to the smart lamp as the first label according to the HSV data of the environmental image, and determining the brightness corresponding to the smart lamp as the second label according to the IR grayscale data of the environmental image, specifically as follows:

[0034] Obtain the color with the largest proportion in the environment according to the HSV data of the environmental image, and combine it with the color types of the smart lamp to determine the color corresponding to the smart lamp;

[0035] Determine the average IR grayscale value of the environmental image according to the IR grayscale data of the environmental image, obtain the corresponding environmental brightness data, and add the set threshold to the corresponding environmental brightness data to determine the brightness of the smart lamp.

[0036] Specifically, constructing a feature sequence according to the HSV data and IR grayscale data of the environmental image, specifically as follows:

[0037] Take the average value of the H values of the pixels in the image as the first eigenvalue;

[0038] Take the average value of the S values of the pixels in the image as the second eigenvalue;

[0039] Take the average value of the V values of the pixels in the image as the third eigenvalue;

[0040] Take the average value of the IR values of the pixels in the image as the fourth eigenvalue;

[0041] Construct a feature sequence from the first eigenvalue, the second eigenvalue, the third eigenvalue, and the fourth eigenvalue.

[0042] Another aspect of the embodiments of the present invention provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the above-mentioned intelligent lamp control method based on environmental images are implemented.

[0043] Another aspect of the embodiments of the present invention provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned intelligent lamp control method based on environmental images are implemented.

[0044] As can be seen from the above description of the present invention, compared with the prior art, the present invention has the following beneficial effects:

[0045] (1) The present invention provides an intelligent lamp control method based on environmental images. First, the HSV data and IR grayscale data of the environmental image are obtained; according to the HSV data and IR grayscale data of the environmental image, a feature sequence is constructed; the feature sequence is input into a trained network model to obtain the corresponding color and brightness of the intelligent lamp; an instruction for the corresponding color and brightness of the intelligent lamp is sent to control the intelligent lamp; based on image recognition and machine learning, the color and brightness of the intelligent lamp can be quickly adjusted according to environmental information. The method provided by the present invention is simple to operate, accurate in recognition, and does not require hardware devices, which is in line with the configuration of existing household intelligent lamps.

[0046] (2) For the intelligent lamp control method based on environmental images provided by the present invention, four input feature values are constructed based on the HSV data and IR grayscale data of the environmental image, which comprehensively characterize the attributes of the environmental image and make the training model accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a flowchart of an intelligent lamp control method based on environmental images provided by an embodiment of the present invention;

[0048] Figure 2 It is a system structure diagram of an intelligent lamp control based on environmental images provided by an embodiment of the present invention;

[0049] Figure 3 It is a schematic diagram of an embodiment of an electronic device provided by an embodiment of the present invention;

[0050] Figure 4 It is a schematic diagram of an embodiment of a computer-readable storage medium provided by an embodiment of the present invention.

[0051] The following further details the present invention in conjunction with the accompanying drawings and specific embodiments. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0052] The present invention provides an intelligent lamp control method based on environmental images. Based on image recognition and machine learning, it can quickly adjust the color and brightness of intelligent lamps according to environmental information, with simple operation and accurate recognition, and does not require hardware devices, meeting the configuration of existing home intelligent lamps.

[0053] As Figure 1 FIG. is a flowchart of an intelligent lamp control method based on environmental images provided by the present invention, specifically including:

[0054] S101: Obtain the HSV data and IR grayscale data of the environmental image;

[0055] It should be noted that currently, 3D camera products have binocular structured light (RGB+IR) solutions and TOF (single IR camera) solutions. The embodiments of the present invention can adopt the structural form of a TOF solution plus an RGB camera.

[0056] Specifically, add a frame synchronization signal to the color RGB and infrared IR, synchronously collect the RGB data and IR grayscale data, then convert the obtained RGB color gamut picture into the HSV color gamut, and determine the color of the indicator light according to the proportion of each color interval statistically determined by the preset color threshold;

[0057] Through experimental verification, compared with the RGB and CMY color spaces, using the HSV color gamut space to train the model and perform recognition results in a more matching of the lamp color and brightness with the environmental information and is also more easily accepted by users.

[0058] The conversion relationship from the RGB color space to the HSV color gamut space:

[0059] R′ = R / 255

[0060] G′ = G / 255

[0061] B′ = B / 255

[0062] Cmax = max(R′, G′, B′)

[0063] Cmin = min(R′, G′, B′)

[0064] Δ = Cmax - Cmin

[0065]

[0066]

[0067] V = Cmax

[0068] Among them, R′, G′, and B′ are intermediate variables.

[0069] S102: Construct a feature sequence based on the HSV data and IR grayscale data of the environmental image;

[0070] Specifically, constructing a feature sequence based on the HSV data and IR grayscale data of the environmental image is as follows:

[0071] Take the average value of the H values of the pixels in the image as the first eigenvalue;

[0072] Take the average value of the S values of the pixels in the image as the second eigenvalue;

[0073] Take the average value of the V values of the pixels in the image as the third eigenvalue;

[0074] Take the average value of the IR values of the pixels in the image as the fourth eigenvalue;

[0075] Construct the first eigenvalue, the second eigenvalue, the third eigenvalue, and the fourth eigenvalue into a feature sequence.

[0076] S103: Input the feature sequence into the trained network model to obtain the corresponding color and brightness of the intelligent lamp;

[0077] The network models in the embodiments of the present invention include, but are not limited to, many-to-many recurrent neural network models and LSTM models.

[0078] The many-to-many recurrent neural network model is adopted in the embodiments of the present invention:

[0079] On the basis of the ordinary multi-layer backpropagation (BP) neural network, the recurrent neural network (RNN) adds the horizontal connection between the units of the hidden layer. Through a weight matrix, the value of the neural unit in the previous time series can be transmitted to the current neural unit, so that the neural network has a memory function and has good applicability for processing natural language processing with context connection or machine learning problems of time series. For a standard RNN structure, the main structure input of the RNN at time t comes from not only the input layer Xt but also a recurrent edge to provide the hidden state transmitted from time t - 1.

[0080] According to the number of output and input sequences, the applicability of the RNN model varies, and the RNN can have multiple different structures. The five structures are: one-to-one, one-to-many, many-to-one, interval many-to-many, and synchronous many-to-many. Different structures naturally have different application scenarios, and these five RNN model structures can respectively correspond to the application scenarios of Vanilla neural network, picture caption generation, sentiment analysis, machine translation, and next context prediction.

[0081] The data input of the present invention is a feature sequence, and the required output is the luminous flux and color temperature of the lamp. Its natural sequentiality conforms to the two structures of the RNN model: many-to-many with gaps and many-to-many synchronously. The biggest difference between the two is that in the many-to-many with gaps mode, the model cannot utilize the correlation between features in the input feature sequence, while in the many-to-many synchronously mode, it can. Therefore, in the embodiment of the present invention, an RNN model with a many-to-many synchronously structure, that is, a synchronous many-to-many recurrent neural network model, is selected as the basic network structure.

[0082] S104: Send instructions corresponding to the color and brightness of the intelligent lamp to control the intelligent lamp.

[0083] Before this step, it also includes training the network model, specifically:

[0084] Obtain the HSV data and IR grayscale data of the environmental image;

[0085] Construct a feature sequence according to the HSV data and IR grayscale data of the environmental image; and determine the color corresponding to the intelligent lamp as the first label according to the HSV data of the environmental image, and determine the brightness corresponding to the intelligent lamp as the second label according to the IR grayscale data of the environmental image;

[0086] Input the feature sequence, the first label, and the second label into the pre-trained network model for training to obtain a trained network model.

[0087] Specifically, determining the color corresponding to the intelligent lamp as the first label according to the HSV data of the environmental image, and determining the brightness corresponding to the intelligent lamp as the second label according to the IR grayscale data of the environmental image, specifically:

[0088] Obtain the color with the largest proportion in the environment according to the HSV data of the environmental image, and combine it with the color types of the intelligent lamp to determine the color corresponding to the intelligent lamp;

[0089] Determine the average IR grayscale value of the environmental image according to the IR grayscale data of the environmental image, obtain the corresponding environmental brightness data, and add the set threshold to the corresponding environmental brightness data to determine the brightness of the intelligent lamp.

[0090] Such as Figure 2 On the other hand, an intelligent lamp control system based on an environmental image provided by an embodiment of the present invention includes:

[0091] An environmental data acquisition unit 201: Obtain the HSV data and IR grayscale data of the environmental image;

[0092] It should be noted that currently, 3D camera products have a binocular structured light (RGB + IR) solution and a TOF (single IR camera) solution. The embodiment of the present invention can adopt the structural form of a TOF solution plus an RGB camera.

[0093] Specifically, a frame synchronization signal is added to the color RGB and infrared IR, and the RGB data and IR grayscale data are collected synchronously. Then, the obtained RGB color gamut image is converted into the HSV color gamut, and the proportion of each color interval is statistically determined according to the preset color threshold to determine the color of the indicator light;

[0094] Through experimental verification, compared with the RGB and CMY color spaces, using the HSV color gamut space to train the model and perform recognition results in a more matching of the light color and brightness with the environmental information, and it is also more easily received by users.

[0095] Conversion relationship from RGB color space to HSV color gamut space:

[0096] R′ = R / 255

[0097] G′ = G / 255

[0098] B′ = B / 255

[0099] Cmax = max(R′, G′, B′)

[0100] Cmin = min(R′, G′, B′)

[0101] Δ = Cmax - Cmin

[0102]

[0103]

[0104] V = Cmax

[0105] Among them, R′, G′, and B′ are intermediate variables.

[0106] Construct the feature sequence unit 202: Construct a feature sequence according to the HSV data and IR grayscale data of the environmental image;

[0107] Specifically, construct a feature sequence according to the HSV data and IR grayscale data of the environmental image, specifically:

[0108] Take the average value of the H values of the pixels in the image as the first feature value;

[0109] Take the average value of the S values of the pixels in the image as the second feature value;

[0110] Take the average value of the V values of the pixels in the image as the third feature value;

[0111] Take the average value of the IR values of the pixels in the image as the fourth feature value;

[0112] Construct the first eigenvalue, the second eigenvalue, the third eigenvalue, and the fourth eigenvalue into a feature sequence

[0113] Obtain the intelligent light data unit 203: Input the feature sequence into the trained network model to obtain the color and brightness corresponding to the intelligent light;

[0114] The network model in the embodiments of the present invention includes, but is not limited to: many-to-many recurrent neural network models, LSTM models.

[0115] The embodiments of the present invention adopt a many-to-many recurrent neural network model:

[0116] The Recurrent Neural Network (RNN) adds lateral connections between the units in the hidden layer on the basis of the ordinary multi-layer BackPropagation (BP) neural network. Through a weight matrix, the values of the neural units in the previous time series can be transmitted to the current neural unit, enabling the neural network to have a memory function, which has good applicability for processing natural language processing with context connections or machine learning problems of time series. For a standard RNN structure, the main structure input of the RNN at time t comes not only from the input layer Xt but also from a recurrent edge to provide the hidden state passed from time t-1.

[0117] The applicability of the RNN model varies according to the number of output and input sequences. RNN can have various different structures, and the five structures are: one-to-one, one-to-many, many-to-one, interval many-to-many, and synchronous many-to-many. Different structures naturally have different application scenarios, and these five RNN model structures can respectively correspond to Vanilla neural networks, image caption generation, sentiment analysis, machine translation, and next context prediction application scenarios.

[0118] The data input of the present invention is a feature sequence, and the required outputs are the luminous flux and color temperature of the lamp. Its natural sequentiality conforms to the two structures of interval many-to-many and synchronous many-to-many of the RNN model. The biggest difference between the two is that in the interval many-to-many mode, the model cannot utilize the correlation relationship between the features in the input feature sequence, while the synchronous many-to-many mode can. Therefore, the embodiments of the present invention select an RNN model with a synchronous many-to-many structure, that is, a synchronous many-to-many recurrent neural network model, as the basic network structure

[0119] Send instruction unit 204: Send instructions corresponding to the color and brightness of the intelligent light to control the intelligent light.

[0120] Specifically, it further includes a model training unit for training the network model, specifically:

[0121] Obtain the HSV data and IR grayscale data of the environmental image;

[0122] Construct a feature sequence based on the HSV data and IR grayscale data of the environmental image; and determine the color corresponding to the intelligent lamp as the first label according to the HSV data of the environmental image, and determine the brightness corresponding to the intelligent lamp as the second label according to the IR grayscale data of the environmental image;

[0123] Input the feature sequence, the first label, and the second label into a pre-trained network model for training to obtain a trained network model.

[0124] Specifically, determining the color corresponding to the intelligent lamp as the first label according to the HSV data of the environmental image and determining the brightness corresponding to the intelligent lamp as the second label according to the IR grayscale data of the environmental image is specifically as follows:

[0125] Obtain the most dominant color in the environment according to the HSV data of the environmental image, and determine the color corresponding to the intelligent lamp in combination with the color types of the intelligent lamp;

[0126] Determine the average IR grayscale value of the environmental image according to the IR grayscale data of the environmental image, obtain the corresponding environmental brightness data, and add a set threshold to the corresponding environmental brightness data to determine the brightness of the intelligent lamp.

[0127] As Figure 3 shown, an embodiment of the present invention provides an electronic device 300, including a memory 310, a processor 320, and a computer program 511 stored in the memory 310 and executable on the processor 320. When the processor 320 executes the computer program 311, it implements a method for controlling an intelligent lamp based on an environmental image provided by an embodiment of the present invention.

[0128] In a specific implementation process, when the processor 320 executes the computer program 311, it can implement Figure 1 any one of the implementation manners in the corresponding embodiment.

[0129] Since the electronic device introduced in this embodiment is the device used to implement a data processing device in an embodiment of the present invention, based on the method introduced in an embodiment of the present invention, those skilled in the art can understand the specific implementation manners and various variations of the electronic device in this embodiment. Therefore, the specific implementation of how this electronic device implements the method in an embodiment of the present invention will not be described in detail here. As long as the device used by those skilled in the art to implement the method in an embodiment of the present invention belongs to the scope of protection of the present invention.

[0130] Please refer to Figure 4 , Figure 4 which is a schematic diagram of an embodiment of a computer-readable storage medium provided by an embodiment of the present invention.

[0131] AsFigure 4 As shown in the figure, this embodiment provides a computer-readable storage medium 400, on which a computer program 411 is stored. When the computer program 411 is executed by a processor, it implements an intelligent lamp control method based on an environmental image provided by an embodiment of the present invention.

[0132] In the specific implementation process, when the computer program 411 is executed by a processor, it can implement Figure 1 any implementation manner in the corresponding embodiment.

[0133] It should be noted that in the above embodiments, the descriptions of each embodiment have their own emphases. For the parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0134] Those skilled in the art should understand that the embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0135] The present invention provides an intelligent lamp control method based on an environmental image. First, obtain the HSV data and IR grayscale data of the environmental image; construct a feature sequence according to the HSV data and IR grayscale data of the environmental image; input the feature sequence into a trained network model to obtain the corresponding color and brightness of the intelligent lamp; send an instruction for the corresponding color and brightness of the intelligent lamp to control the intelligent lamp. Based on image recognition and machine learning, it can quickly adjust the color and brightness of the intelligent lamp according to environmental information. The method provided by the present invention is simple to operate and accurate in recognition, and does not require hardware devices, which is in line with the configuration of existing home intelligent lamps.

[0136] The intelligent lamp control method based on an environmental image provided by the present invention constructs four input feature values based on the HSV data and IR grayscale data of the environmental image, comprehensively characterizing the attributes of the environmental image and making the training model accurate.

[0137] It should be noted that in this document, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the said element. The above is only the specific implementation manner of the present application, enabling those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but rather will conform to the broadest scope consistent with the principles and novel features claimed herein.

[0138] The above is only the specific implementation manner of the present invention, but the design concept of the present invention is not limited thereto. Any non-substantive modification made to the present invention using this concept shall fall within the scope of infringement of the protection scope of the present invention.

Claims

1. An intelligent lamp control method based on environmental images, characterized in that Including: Training the network model; Obtaining the HSV data and IR grayscale data of the environmental image; Constructing a feature sequence according to the HSV data and IR grayscale data of the environmental image; Inputting the feature sequence into the trained network model to obtain the corresponding color and brightness of the intelligent lamp; Sending instructions for the corresponding color and brightness of the intelligent lamp to control the intelligent lamp; The training of the network model specifically includes: Obtaining the HSV data and IR grayscale data of the environmental image; Constructing a feature sequence according to the HSV data and IR grayscale data of the environmental image; and determining the corresponding color of the intelligent lamp as the first label according to the HSV data of the environmental image, and determining the corresponding brightness of the intelligent lamp as the second label according to the IR grayscale data of the environmental image; Inputting the feature sequence, the first label, and the second label into the pre-trained network model for training to obtain the trained network model; The constructing of the feature sequence according to the HSV data and IR grayscale data of the environmental image is specifically: Taking the average value of the H values of the pixels in the image as the first eigenvalue; Taking the average value of the S values of the pixels in the image as the second eigenvalue; Taking the average value of the V values of the pixels in the image as the third eigenvalue; Taking the average value of the IR values of the pixels in the image as the fourth eigenvalue; Constructing the first eigenvalue, the second eigenvalue, the third eigenvalue, and the fourth eigenvalue into a feature sequence.

2. The intelligent lamp control method based on an environmental image according to claim 1, wherein Determining the corresponding color of the intelligent lamp as the first label according to the HSV data of the environmental image, and determining the corresponding brightness of the intelligent lamp as the second label according to the IR grayscale data of the environmental image is specifically: Obtaining the color with the largest proportion in the environment according to the HSV data of the environmental image, and determining the corresponding color of the intelligent lamp in combination with the color types of the intelligent lamp; Determining the average IR grayscale value of the environmental image according to the IR grayscale data of the environmental image, obtaining the corresponding environmental brightness data, and adding the set threshold to the corresponding environmental brightness data to determine the brightness of the intelligent lamp.

3. An intelligent lamp control system based on environmental images, characterized in that, Including: Model training unit: Obtaining the HSV data and IR grayscale data of the environmental image; Constructing a feature sequence according to the HSV data and IR grayscale data of the environmental image; And determining the corresponding color of the intelligent lamp as the first label according to the HSV data of the environmental image, and determining the corresponding brightness of the intelligent lamp as the second label according to the IR grayscale data of the environmental image; inputting the feature sequence, the first label, and the second label into the pre-trained network model for training to obtain the trained network model; Environmental data acquisition unit: Obtaining the HSV data and IR grayscale data of the environmental image; Feature sequence construction unit: Constructing a feature sequence according to the HSV data and IR grayscale data of the environmental image; Intelligent lamp data acquisition unit: Inputting the feature sequence into the trained network model to obtain the corresponding color and brightness of the intelligent lamp; Instruction sending unit: Sending instructions for the corresponding color and brightness of the intelligent lamp to control the intelligent lamp; The constructing of the feature sequence according to the HSV data and IR grayscale data of the environmental image is specifically: Taking the average value of the H values of the pixels in the image as the first eigenvalue; Taking the average value of the S values of the pixels in the image as the second eigenvalue; Taking the average value of the V values of the pixels in the image as the third eigenvalue; Take the average value of the IR values of the pixels in the image as the fourth eigenvalue; Construct the first eigenvalue, the second eigenvalue, the third eigenvalue and the fourth eigenvalue into a feature sequence.

4. The intelligent lamp control system based on an environmental image according to claim 3, characterized in that, Determine the color corresponding to the intelligent lamp according to the HSV data of the environmental image as the first label, and determine the brightness corresponding to the intelligent lamp according to the IR grayscale data of the environmental image. Specifically: According to the HSV data of the environmental image, obtain the color with the largest proportion in the environment, and combine the color types of the intelligent lamp to determine the color corresponding to the intelligent lamp; According to the IR grayscale data of the environmental image, determine the average value of the IR grayscale of the environmental image, obtain the corresponding environmental brightness data, and add the set threshold to the corresponding environmental brightness data to determine the brightness of the intelligent lamp.

5. An electronic device, characterized in that, Include: A memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the computer program, the method steps described in any one of claims 1 to 2 are implemented.

6. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the method steps described in any one of claims 1-2 are implemented.

Citation Information

Patent Citations

  • Brightness-adaptive table lamp based on image analysis

    CN105135263A

  • Method and device for automatically adjusting technical parameters of table lamp and table lamp

    CN108738215A

  • In-vehicle lighting device control method, storage medium, and electronic equipment

    CN113306486A