AI dimming desk lamp and intelligent dimming method thereof
By using visual sensing and cloud-based analysis models, the AI-powered dimming desk lamp adjusts its brightness in real time to adapt to environmental changes, solving the problem of inaccurate brightness adjustment in different environments and providing excellent lighting effects.
Patent Information
- Application Number
- CN202511255513.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-04
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2045-09-04
AI Technical Summary
Existing desk lamps struggle to accurately adjust their brightness to meet users' lighting needs when ambient light changes, taking into account factors such as the light source, direction, size, and color of the desktop in different application environments.
The AI-powered dimming desk lamp uses a visual sensing unit to acquire brightness images of the target lighting area, connects to a cloud-based brightness analysis model via a communication unit, and controls the dimming cycle to generate brightness control parameters, thereby adjusting the lamp's brightness to adapt to environmental changes.
It achieves precise control of the desk lamp's brightness, providing optimal lighting effects, adapting to different ambient light changes, and reducing eye discomfort.
Smart Images

Figure CN120825847B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of lighting control, in particular to an AI dimming table lamp and an intelligent dimming method thereof. BACKGROUND
[0002] A table lamp is used on a desk and is specially designed to provide indoor light quality optimization for reading and writing applications. Although the indoor main light can also provide lighting for the desk, compared with the table lamp, the table lamp can provide higher illuminance and more uniform brightness distribution to the desktop at a lower power consumption, avoiding eye damage caused by insufficient lighting brightness or glare during long eye use.
[0003] The indoor environment using a table lamp such as a study room generally uses a window to collect ambient light. The change of ambient light intensity caused by day and night changes and climate changes has a great impact on the lighting effect of the table lamp. For example, in the case of strong ambient light or even direct sunlight, the brightness is too large and is not suitable for reading and writing, and the table lamp needs to be shaded. At this time, the table lamp is still on, which makes the desktop light more glaring. For example, in the case of very weak ambient light such as night or rainy weather, the entire indoor environment is in a weak light state, and the lighting brightness of the table lamp needs to be adjusted to a bright state to provide enough light for reading and writing. With the change of time or weather, the ambient light will change frequently, and when the light is insufficient at night or during the day, the lighting brightness of different lamps will also be different when the indoor main light is turned on for auxiliary lighting, thereby making it difficult to achieve the expected lighting effect of the table lamp.
[0004] In order to solve the problem that the lighting effect of the fixed brightness table lamp does not meet the user's needs, some table lamps on the market integrate a brightness sensor for detecting the intensity of ambient light to automatically adjust the brightness of the table lamp according to the detected intensity of ambient light, which can alleviate the eye discomfort problem caused by the mismatch between the brightness of the table lamp and the intensity of ambient light due to the change of ambient light. However, in different application environments, the source, direction, size of the light source, wall surface, and color of the table lamp will have a great impact on the lighting effect of the table lamp. Simply adjusting the brightness of the table lamp based on the light intensity detected by the brightness sensor at the location cannot meet the actual needs of the user for desk lighting. SUMMARY
[0005] The present application is based on the above problems, and proposes an AI dimming table lamp and an intelligent dimming method thereof, which can accurately control the lighting light of the table lamp to provide the optimal lighting effect.
[0006] Therefore, the first aspect of the present application provides an AI dimming table lamp, comprising a lighting unit, a visual sensing unit, a communication unit and a control unit, the lighting unit, the visual sensing unit and the communication unit are connected with the control unit, the visual sensing unit is configured to obtain a brightness image of a target lighting area, the communication unit is configured to establish a communication connection with a cloud server providing a cloud brightness analysis model, and the control unit is configured to:
[0007] configure a dimming period of the table lamp;
[0008] obtain a brightness image of the target lighting area in the current dimming period in each dimming period, the brightness image is an image composed of brightness values of reflected light after table lamp light and environmental light irradiate on the target lighting area;
[0009] extract a brightness feature parameter of the target lighting area from the brightness image;
[0010] determine whether the change amplitude of the brightness feature parameter relative to the last dimming period is greater than a preset threshold value;
[0011] when the change amplitude of the brightness feature parameter relative to the last dimming period is greater than the preset threshold value, generate an input data sequence containing the brightness feature parameter;
[0012] input the input data sequence into a pre-trained table lamp control parameter generation model to obtain an output data sequence corresponding to the input data sequence, the output data sequence contains a brightness control parameter of the table lamp;
[0013] adjust the brightness of the table lamp according to the brightness control parameter in the output data sequence.
[0014] The second aspect of the present application provides an intelligent dimming method of an AI dimming table lamp, comprising:
[0015] configure a dimming period of the table lamp;
[0016] obtain a brightness image of the target lighting area in the current dimming period in each dimming period, the brightness image is an image composed of brightness values of reflected light after table lamp light and environmental light irradiate on the target lighting area;
[0017] extract a brightness feature parameter of the target lighting area from the brightness image;
[0018] determine whether the change amplitude of the brightness feature parameter relative to the last dimming period is greater than a preset threshold value;
[0019] When the change in the brightness feature parameter relative to the previous dimming cycle is greater than a preset threshold, an input data sequence containing the brightness feature parameter is generated.
[0020] The input data sequence is input into a pre-trained table lamp control parameter generation model to obtain an output data sequence corresponding to the input data sequence, wherein the output data sequence contains the brightness control parameters of the table lamp;
[0021] The brightness of the desk lamp is adjusted according to the brightness control parameters in the output data sequence.
[0022] Furthermore, the step of acquiring the brightness image of the target illumination area in each dimming cycle specifically includes:
[0023] Real-time images of the target illumination area are captured using a visual sensing unit;
[0024] Edge recognition is performed on the real-time image to obtain several color block regions, which are regions surrounded by the same edge line and have one or more main colors;
[0025] Calculate the pixel area s of each color patch region i And the pixel distance d between the center coordinates of each color block area and the center coordinates of the target illumination area. i where i is from 1 to n block Positive integers between n and n block The number of color block regions in the real-time image;
[0026] Calculate the lighting effect of each color patch area:
[0027] I i =σ(d i )·s i ,
[0028] Where σ(d) i ) is the distance d from the pixel i The distance coefficient associated with the size;
[0029] Generate brightness images of color block regions where the illumination influence exceeds a preset influence threshold.
[0030] Furthermore, the step of generating a brightness image of a color patch region whose illumination influence is greater than a preset influence threshold specifically includes:
[0031] Convert the real-time image into a target color mode with a brightness or luminance dimension;
[0032] extracting luminance values of each pixel point of the color block region from a real-time image of the target color pattern to generate a luminance matrix with the same size as the real-time image;
[0033] performing normalization processing on the luminance values in the luminance matrix to generate the luminance image.
[0034] Further, the step of extracting the luminance feature parameter of the target illumination region from the luminance image specifically comprises:
[0035] counting the number of pixels corresponding to each luminance value in the luminance image;
[0036] generating a luminance-pixel number curve of the luminance image;
[0037] extracting the curve feature parameter of the luminance-pixel number curve of the luminance image to calculate the luminance feature parameter of the target illumination region.
[0038] Further, the step of extracting the curve feature parameter of the luminance-pixel number curve of the luminance image to calculate the luminance feature parameter of the target illumination region specifically comprises:
[0039] obtaining the peak coordinate [L peek , C peek ] of the luminance-pixel number curve, wherein the peak luminance L peek is the luminance value with the largest number of pixels in the luminance image, and the peak pixel number C peek is the number of pixels with the luminance value L peek in the luminance image;
[0040] calculating the peak pixel number ratio of the peak pixel number in the luminance image:
[0041]
[0042] wherein Hor is the pixel width of the luminance image, and Ver is the pixel height of the luminance image;
[0043] calculating the median width W mid of the luminance-pixel number curve.
[0044] Further, the step of calculating the median width W mid of the luminance-pixel number curve specifically comprises:
[0045] drawing the median line of the luminance-pixel number curve;
[0046] counting the number of intersection points n inter between the median line and the luminance-pixel number curve;
[0047] When n inter When = 1, obtain the brightness value L at the intersection point. inter ;
[0048] Calculate the slope k of the brightness-pixel count curve at the intersection point. inter ;
[0049] When k inter When the value is greater than 0, the median width of the brightness-pixel count curve is configured as follows:
[0050] W mid =1-L inter ;
[0051] When k inter When the value is less than 0, the median width of the brightness-pixel count curve is configured as follows:
[0052] W mid =L inter .
[0053] Furthermore, in calculating the median width W of the brightness-pixel count curve... mid Following these steps, the following are also included:
[0054] Calculate the first luminance characteristic parameter of the target illumination area:
[0055]
[0056] Where L peek,i The peak brightness extracted from the brightness image of the i-th color patch region;
[0057] Calculate the second luminance characteristic parameter of the target illumination area;
[0058]
[0059] Where R peek,i The percentage of peak pixels extracted from the brightness image of the i-th color patch region;
[0060] Calculate the third luminance characteristic parameter of the target illumination area:
[0061]
[0062] Among them W mid,i The median width is extracted from the brightness image of the i-th color patch region;
[0063] The first brightness feature parameter P1, the second brightness feature parameter P2, and the third brightness feature parameter P3 are configured as the brightness feature parameters of the target illumination area.
[0064] Further, the input data sequence further comprises a color feature parameter of the target illumination area, and after the step of converting the real-time image into the target color mode with the brightness or luminance dimension, further comprising:
[0065] extracting a subject color of the color block area from the real-time image of the target color mode, the subject color being a color with the most pixel quantity in the color block area within a set color tolerance range;
[0066] configuring the subject color of one or more color block areas with the largest illumination influence degree as the color feature parameter of the target illumination area.
[0067] Further, the step of extracting the subject color of the color block area from the real-time image of the target color mode specifically comprises:
[0068] acquiring a pre-configured color tolerance distance in the target color mode;
[0069] accumulating each color dimension of the target color mode according to a preset step length to traverse each color in the target color mode;
[0070] determining a target color as a target color to perform the following steps:
[0071] determining a target color set in the color space of the target color mode with a distance from the target color being less than or equal to the color tolerance distance;
[0072] counting a pixel quantity of the color block area falling into the color set;
[0073] establishing an association between the pixel quantity and the target color;
[0074] after the traversal ends, determining a color with the largest associated pixel quantity value as the subject color of the color block area.
[0075] The application provides an AI dimming table lamp and an intelligent dimming method thereof, the AI dimming table lamp comprises a target illumination area, a brightness image acquisition module, a brightness feature parameter extraction module, a change amplitude judgment module, an input data sequence generation module, a table lamp control parameter generation model and a brightness adjustment module, the brightness image acquisition module is configured to acquire a brightness image of the target illumination area in a current dimming period, the brightness feature parameter extraction module is configured to extract a brightness feature parameter of the target illumination area from the brightness image, the change amplitude judgment module is configured to judge whether the change amplitude of the brightness feature parameter relative to a previous dimming period is greater than a preset threshold, the input data sequence generation module is configured to generate an input data sequence containing the brightness feature parameter when the change amplitude of the brightness feature parameter relative to the previous dimming period is greater than the preset threshold, the table lamp control parameter generation model is configured to be pre-trained, and the table lamp control parameter generation model is configured to obtain an output data sequence corresponding to the input data sequence, the output data sequence contains a brightness control parameter of the table lamp, and the brightness adjustment module is configured to adjust the brightness of the table lamp according to the brightness control parameter in the output data sequence, so that the illumination light of the table lamp can be accurately controlled to provide an optimal illumination effect. BRIEF DESCRIPTION OF DRAWINGS
[0076] Figure 1 is a schematic diagram of an AI dimming table lamp provided by an embodiment of the application;
[0077] Figure 2 is a flowchart of an intelligent dimming method of an AI dimming table lamp provided by an embodiment of the application. DETAILED DESCRIPTION
[0078] In order to more clearly understand the above-mentioned purposes, features and advantages of the application, the application will be further described in detail below in combination with the drawings and specific embodiments. It should be noted that the embodiments of the application and the features in the embodiments can be combined with each other without conflict.
[0079] In the following description, many specific details are set forth in order to provide a thorough understanding of the application, but the application can also be implemented in other ways different from those described herein, therefore, the protection scope of the application is not limited by the specific embodiments disclosed below.
[0080] In the description of the present application, the term "a plurality of" refers to two or more, unless otherwise explicitly specified. The terms "upper", "lower", and the like indicate the orientation or positional relationship shown in the drawings based on the orientation or positional relationship shown in the drawings, and are merely for the purpose of facilitating the description of the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. The terms "connected", "mounted", "fixed", and the like should be interpreted broadly, for example, "connected" can be fixed connection, or detachable connection, or integral connection; can be directly connected, or indirectly connected through an intermediate medium. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances. In addition, the terms "first", "second", and the like are only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features limited by "first", "second", etc. can be explicitly or implicitly included one or more features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specified.
[0081] In the description of the present application, the terms "one embodiment", "some embodiments", "a specific embodiment", and the like, mean that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0082] An AI dimming table lamp and an intelligent dimming method thereof according to some embodiments of the present application are described below with reference to the accompanying drawings.
[0083] As Figure 1 shown, the first aspect of the present application proposes an AI dimming table lamp, comprising a lighting unit, a visual sensing unit, a communication unit, and a control unit, the lighting unit, the visual sensing unit, and the communication unit being connected with the control unit, the visual sensing unit being configured to acquire a brightness image of a target lighting area, the communication unit being configured to establish a communication connection with a cloud server providing a cloud brightness analysis model.
[0084] In the technical solution of some embodiments of the present application, the lighting unit comprises an LED and an LED driving unit connected with the LED, the LED driving unit driving the LED to light up, turn off, or adjust the brightness according to the control instruction of the control unit.
[0085] The visual sensing unit is a visual sensor such as a camera, which, under the control of the control unit, takes a real-time image of the target lighting area in each dimming period to extract a brightness image of the target lighting area from the real-time image.
[0086] The communication unit can be a wired communication unit such as a communication unit connected to a network through an RS232 interface to establish a network communication connection with the outside, or a wireless communication unit such as a WIFI, Bluetooth, or other communication protocol. The desk lamp is connected to the Internet through the communication unit to establish a communication connection with the cloud server.
[0087] As shown in Figure 2 The control unit is configured to:
[0088] configure the dimming period of the desk lamp;
[0089] obtain a brightness image of the target lighting area in the current dimming period in each dimming period, the brightness image being an image composed of brightness values of reflected light after the desk lamp light and ambient light irradiate the target lighting area;
[0090] extract a brightness feature parameter of the target lighting area from the brightness image;
[0091] determine whether the change amplitude of the brightness feature parameter relative to the previous dimming period is greater than a preset threshold;
[0092] When the change amplitude of the brightness feature parameter relative to the previous dimming period is greater than the preset threshold, an input data sequence containing the brightness feature parameter is generated;
[0093] The input data sequence is input into a pre-trained desk lamp control parameter generation model to obtain an output data sequence corresponding to the input data sequence, the output data sequence containing a brightness control parameter of the desk lamp;
[0094] adjust the brightness of the desk lamp according to the brightness control parameter in the output data sequence.
[0095] The dimming period is configured as a short time period to adapt to the dynamic changes of indoor ambient light, for example, the dimming period can be configured as 5 seconds, 10 seconds, or other time lengths, and the dimming period can be adaptively adjusted according to the changes of indoor light and the load state and response speed of the cloud server.
[0096] The target lighting area refers to the area covered by the illumination range of the light of the desk lamp after the desk lamp is placed on the desktop or other positions. For a desk lamp with an unadjustable posture, the target lighting area is a fixed area, such as the desktop of a desk, when the position of the desk lamp is unchanged. For a desk lamp with an adjustable posture, such as a desk lamp with a foldable support rod, the illumination direction can be adjusted at will, and the target lighting area will also change accordingly.
[0097] The brightness image is an image reflecting the real-time brightness of the target lighting area. The brightness image only contains the brightness information of the target lighting area, and does not contain the color information. The brightness feature parameter is a feature parameter reflecting the brightness distribution of the target lighting area under the illumination of the light of the desk lamp and the ambient light.
[0098] The desk lamp control parameter generation model is an artificial intelligence model obtained by deep training using a large amount of sample data. Specifically, it can be any one of a convolutional neural network model, a recurrent neural network model, a generative adversarial network model, and a long short-term memory network model. Preferably, the desk lamp control parameter generation model is a long short-term memory network model. By using the long-term memory capability of the long short-term memory network model, the change rule of indoor ambient light in a longer period can be memorized, so that the required desk lamp control parameter can be generated more accurately.
[0099] In the technical scheme of the present application, a large number of brightness feature parameters of the target lighting area of the desk lamp are collected and sorted in various indoor environments at different times (including daytime and nighttime) and weather, and the corresponding brightness control parameters are configured to supervise the training of the desk lamp control parameter generation model. The desk lamp control parameter generation model can generate the desk lamp control parameter suitable for adjusting the light of the desk lamp in any indoor scene to make the lighting condition of the target lighting area more meet the needs of reading and writing when receiving the brightness feature parameter in the indoor scene.
[0100] Further, in the step of obtaining the brightness image of the target lighting area in the current dimming period in each dimming period, the control unit is configured to:
[0101] capture a real-time image of the target lighting area by a visual sensing unit;
[0102] perform edge recognition on the real-time image to obtain a plurality of color block regions, the color block region being surrounded by the same edge line and having one or more main colors;
[0103] calculate the pixel area s of each color block region i , and the pixel distance d between the center coordinates of each color block region and the center coordinates of the target lighting area iwherein i is a positive integer between 1 and n block wherein n is the number of color block regions in the real-time image block wherein n is the number of color block regions in the real-time image
[0104] calculating the lighting influence degree of each color block region:
[0105] I i = σ(d i ) · s i ,
[0106] wherein σ(d i ) is a distance coefficient associated with the size of the pixel distance d i .
[0107] generating a brightness image of color block regions whose lighting influence degree is greater than a preset influence degree threshold.
[0108] In a specific application scenario, the desktop of a desk is usually placed with various items such as books, mouse pads, water cups, etc. with different colors, and each item usually has one or more main colors, for example, an open book usually has a white background color as the main color, and for some color-rich items such as color photos or posters, etc. may have multiple main colors. The above embodiment separates different items with edge lines by edge recognition to form individual color block regions.
[0109] In the technical solution of some embodiments of the present application, when the proportion of the number of pixels of a color in a color block region to the total number of pixels in the color block region is greater than a preset proportion threshold, the color is referred to as the main color of the color block region. In the technical solution of some other embodiments of the present application, the color with the largest number of pixels in a color block region can also be regarded as the main color of the color block region.
[0110] Further, before the step of performing edge recognition on the real-time image to obtain a plurality of color block regions, the minimum pixel area of the color block region is configured.
[0111] The step of performing edge recognition on the real-time image to obtain a plurality of color block regions specifically includes configuring a region with a pixel area greater than the minimum pixel area as a color block region. It should be understood that the color block region can have a containing and contained relationship on the real-time image.
[0112] The distance coefficient σ(d i ) is a predefined weight coefficient for calculating the lighting influence degree under different pixel distances. The distance coefficient σ(d i ) is an inverse correlation function with the pixel distance d i , that is, the pixel distance d iThe greater, the corresponding distance coefficient σ(d i ) is smaller. Conversely, the smaller the pixel distance d i , the greater the corresponding distance coefficient σ(d i ). For example, the distance coefficient σ(d i ) can be the product of the inverse of the pixel distance d i and a certain constant, that is:
[0113]
[0114] where σ0 is an empirical constant.
[0115] In the technical solution of the above embodiment, for each color block region in the target illumination area whose illumination influence degree is greater than the preset influence degree threshold, a luminance image is generated, that is, when there are n m_block color block regions in the target illumination area whose illumination influence degree is greater than the preset influence degree threshold, the target illumination area has n m_block luminance images, and the step of extracting the luminance feature parameters is performed for each luminance image.
[0116] Further, in the step of generating the luminance image of the color block region whose illumination influence degree is greater than the preset influence degree threshold, the control unit is configured to:
[0117] convert the real-time image into a target color mode with luminance or brightness dimension;
[0118] extract the luminance value of each pixel point of the color block region from the real-time image of the target color mode to generate a luminance matrix with the same size as the real-time image;
[0119] perform normalization processing on the luminance value in the luminance matrix to generate the luminance image.
[0120] Specifically, the target color mode can be any one of YUV mode, LAB mode, HSB mode or HSL mode, wherein the Y value in YUV mode, the L value in LAB mode, the B value in HSB mode and the L value in HSL mode are the luminance or brightness dimension thereof. When the target color mode is HSL mode, in the step of extracting the luminance value of each pixel point from the real-time image of the target color mode, the brightness value L of each pixel is determined as the luminance value.
[0121] Further, in the step of generating a luminance matrix with the same size as the real-time image from the luminance values of each pixel point in the color block region in the real-time image of the target color mode, the control unit is configured to fill other pixel points outside the color block region with a fill number to expand the luminance matrix to the same pixel size as the real-time image, wherein the fill number can be the maximum boundary value or the minimum boundary value of the luminance or brightness dimension in the corresponding color mode, so that it is normalized to 0 or 1 in the subsequent normalization process.
[0122] Further, in the step of extracting the luminance feature parameters of the target illumination region from the luminance image, the control unit is configured to:
[0123] count the number of pixels corresponding to each luminance value in the luminance image;
[0124] generate a luminance-pixel number curve of the luminance image;
[0125] extract the curve feature parameters of the luminance-pixel number curve of the luminance image to calculate the luminance feature parameters of the target illumination region.
[0126] In the step of counting the number of pixels corresponding to each luminance value in the luminance image, the luminance image is a normalized luminance image, so the luminance value in this step is a value mapped to the [0, 1] interval with a specific precision. It should be understood that the luminance value corresponding to the fill number is not within the statistical range.
[0127] Generating a luminance-pixel number curve of the luminance image specifically refers to fitting the discrete corresponding relationship between the luminance value and the pixel number in the luminance image as a relationship curve between them with the luminance value in the range of [0, 1] as the x-axis and the pixel number as the Y-axis.
[0128] Further, in the step of extracting the curve feature parameters of the luminance-pixel number curve of the luminance image to calculate the luminance feature parameters of the target illumination region, the control unit is configured to:
[0129] obtain the peak coordinates [L peek , C peek ] of the luminance-pixel number curve, wherein the peak luminance L peek is the luminance value with the largest number of pixels in the luminance image, and the peak pixel number C peek is the number of pixels with the luminance value L peek in the luminance image;
[0130] calculate the peak pixel number ratio of the peak pixel number in the luminance image:
[0131]
[0132] wherein Hor is a pixel width of the luminance image, and Ver is a pixel height of the luminance image;
[0133] calculating a median width W of the luminance-pixel number curve mid .
[0134] It should be understood that the peak luminance L peek refers to the luminance value with the largest number of corresponding pixels in the luminance image, rather than the maximum luminance on the luminance image.
[0135] In the calculation formula of the peak pixel number ratio, HorxVer represents the total number of pixels in the luminance image.
[0136] Further, in the step of calculating the median width W mid of the luminance-pixel number curve, the control unit is configured to:
[0137] draw a median line of the luminance-pixel number curve;
[0138] count the number n inter of intersection points of the median line and the luminance-pixel number curve;
[0139] when n inter = 1, obtain the luminance value L inter at the intersection point;
[0140] calculate the slope k inter of the luminance-pixel number curve at the intersection point;
[0141] when k inter > 0, the median width of the luminance-pixel number curve is configured as:
[0142] W mid = 1 - L inter ;
[0143] when k inter < 0, the median width of the luminance-pixel number curve is configured as:
[0144] W mid = L inter .
[0145] The median line is a straight line corresponding to the pixel number of in the luminance-pixel number two-dimensional orthogonal coordinate system, and the median line is parallel to the luminance axis in the luminance-pixel number two-dimensional orthogonal coordinate system.
[0146] In the technical solution of the above embodiment, when n inter = 1, it means that the median line has only one intersection point with the luminance-pixel number curve.
[0147] Further, after the step of counting the number n inter of intersection points of the median line and the luminance-pixel number curve, the control unit is configured to:
[0148] When n inter ≥ 2, the first luminance value L1 of the luminance value minimum intersection point and the second luminance value L2 of the luminance value maximum intersection point are obtained.
[0149] The median width W mid of the luminance-pixel number curve is calculated as L2-L1.
[0150] Further, in the extreme case that the median line has no intersection point with the luminance-pixel number curve, the median width of the luminance-pixel number curve is configured as 0.
[0151] Further, after the step of calculating the median width W mid of the luminance-pixel number curve, the control unit is configured to:
[0152] The first luminance feature parameter of the target illumination area is calculated as:
[0153]
[0154] Where L peek,i is the peak luminance extracted from the luminance image of the i-th color block area.
[0155] The second luminance feature parameter of the target illumination area is calculated as:
[0156]
[0157] Where R peek,i is the proportion of the peak pixel number extracted from the luminance image of the i-th color block area.
[0158] The third luminance feature parameter of the target illumination area is calculated as:
[0159]
[0160] Where W mid,i is the median width extracted from the luminance image of the i-th color block area.
[0161] The first luminance characteristic parameter P1, the second luminance characteristic parameter P2, and the third luminance characteristic parameter P3 are configured as the luminance characteristic parameters of the target lighting area.
[0162] Further, in the step of judging whether the variation amplitude of the luminance characteristic parameters relative to the last dimming period is greater than a preset threshold, the control unit is configured to:
[0163] obtain a variation amplitude threshold of each luminance characteristic parameter of the target lighting area;
[0164] calculate the difference between the value of each luminance characteristic parameter of the target lighting area in the current dimming period and the value in the last dimming period;
[0165] compare the difference with the variation amplitude threshold;
[0166] When the difference between any luminance characteristic parameter in adjacent two dimming periods is greater than the corresponding variation amplitude threshold, it is determined that the variation amplitude of the luminance characteristic parameters of the target lighting area relative to the last dimming period is greater than the preset threshold.
[0167] Further, in the step of generating the input data sequence containing the luminance characteristic parameters, the control unit is configured to:
[0168] obtain the working state parameters of the desk lamp, the working state parameters including the on-off state parameter S1 of the desk lamp, and the luminance parameter S2 and / or the power parameter S3 of the desk lamp;
[0169] combine the working state parameters of the desk lamp and the luminance characteristic parameters of the target lighting area to form the input data sequence.
[0170] The on-off state parameter S1 of the desk lamp can be configured as 0 and 1 to represent the on and off states of the desk lamp respectively, and the luminance parameter S2 and the power parameter S3 of the desk lamp are related to the working current size of the desk lamp, and the numerical size will change when the user adjusts the gear of the desk lamp.
[0171] In the technical solutions of some embodiments of the present application, the input data sequence can be represented as:
[0172] {S1, S2, S3, P1, P2, P3}, wherein the luminance parameter S2 and the power parameter S3 of the desk lamp are both normalized values after normalization processing.
[0173] Further, the input data sequence further includes the color characteristic parameters of the target lighting area, and after the step of converting the real-time image into the target color mode with luminance or brightness dimension, the control unit is configured to:
[0174] extracting a subject color of the color block region from a real-time image of the target color mode, the subject color being a color having the largest number of pixels within a set color tolerance range in the color block region;
[0175] configuring the subject color of one or more color block regions having the largest lighting influence degree as a color feature parameter of the target lighting region.
[0176] Each color space of a color mode has its unique spatial structure, for example, the color space of RGB is a cubic structure composed of three color channels of red, green and blue in orthogonal relationship, the color space of HSB is a cylindrical structure represented by hue in circumferential dimension, saturation in radial dimension and lightness in height dimension, and the color space of HSL is a double-cone structure represented by hue in circumferential dimension, saturation in radial dimension and lightness in height dimension. The color tolerance refers to the spatial distance in the color space of the corresponding color mode, i.e. the three-dimensional coordinate distance. In a relatively simple calculation method, for any color mode, its color space can also be mapped to an orthogonal three-dimensional coordinate system, and the Euclidean distance of each color in the three-dimensional coordinate system is used as its color distance, so as to determine the colors contained in its color tolerance range. The Euclidean distance of two colors is the square root of the sum of squares of the difference values of each color component of the two colors.
[0177] Taking the color feature parameter of the target lighting region as the subject color of the three color block regions having the largest lighting influence degree, the input data sequence can be represented as:
[0178] {S1, S2, S3, C1, C2, C3, P1, P2, P3}, wherein C1, C2, C3 are the norms of the normalized vectors of the subject colors of the three color block regions, respectively.
[0179] In the technical solutions of some embodiments of the present application, the output data sequence of the desk lamp control parameter generation model further includes a color temperature control parameter of the desk lamp, and after the input data sequence is input into the pre-trained desk lamp control parameter generation model to obtain the output data sequence corresponding to the input data sequence, the color temperature of the desk lamp is adjusted according to the color temperature control parameter in the output data sequence.
[0180] Further, in the step of extracting the subject color of the color block region from the real-time image of the target color mode, the control unit is configured to:
[0181] obtain a pre-configured color tolerance distance in the target color mode;
[0182] accumulating each color dimension of the target color mode according to a preset step size to traverse each color in the target color mode;
[0183] determining the traversed color as a target color to perform the following steps:
[0184] determining a target color set in a color space of the target color mode with a distance to the target color less than or equal to the color tolerance distance;
[0185] counting a number of pixels in the color block region falling into the color set;
[0186] establishing an association between the number of pixels and the target color;
[0187] after the traversal ends, determining a color with the largest number of associated pixels as a main color of the color block region.
[0188] The color tolerance distance is a distance between colors in a color space corresponding to the target color mode, in which the color tolerance of the main color is reflected when counting the number of pixels of the main color in the color block region. The size of the color tolerance distance can be adaptively configured according to the color distribution of each color block region in the real-time image and the selected target color mode.
[0189] The color dimension refers to a parameter of each dimension constituting the target color mode, such as Y, U, and V in the YUV mode, and H, S, and L in the HSL mode. In the step of accumulating each color dimension of the target color mode according to a preset step size to traverse each color in the target color mode, each dimension is usually sequentially accumulated by a minimum integer unit such as 1 or 1 degree as a step size until it is accumulated to the upper limit of the dimension.
[0190] As shown in Figure 2 The second aspect of the present application proposes a smart dimming method of an AI dimming table lamp, which comprises:
[0191] configuring a dimming period of the table lamp;
[0192] obtaining a brightness image of a target illumination region in a current dimming period in each dimming period, the brightness image being an image composed of brightness values of reflected light of the table lamp light and ambient light irradiated to the target illumination region;
[0193] extracting a brightness feature parameter of the target illumination region from the brightness image;
[0194] judging whether a change amplitude of the brightness feature parameter relative to a last dimming period is greater than a preset threshold value;
[0195] generate an input data sequence containing the luminance feature parameter when a variation amplitude of the luminance feature parameter relative to a previous dimming period is greater than a preset threshold value;
[0196] input the input data sequence into a pre-trained desk lamp control parameter generation model to obtain an output data sequence corresponding to the input data sequence, the output data sequence containing a luminance control parameter of the desk lamp;
[0197] adjust the luminance of the desk lamp according to the luminance control parameter in the output data sequence.
[0198] The dimming period is configured as a short time period to adapt to dynamic changes of indoor ambient light, for example, the dimming period can be configured as 5 seconds, 10 seconds or other time lengths, and the dimming period can be adaptively adjusted according to the change of indoor light and the load state and response speed of the cloud server.
[0199] The target illumination area refers to an area covered by the illumination range of the light of the desk lamp after the desk lamp is placed on the desktop or other positions. For a desk lamp with an unadjustable posture, the target illumination area is a fixed area, for example, the desktop of a desk, when the position of the desk lamp is unchanged. For a desk lamp with an adjustable posture, for example, a desk lamp with a foldable support rod, the illumination direction of the desk lamp can be adjusted at will, and the target illumination area will also change accordingly.
[0200] The luminance image is an image reflecting the real-time luminance of the target illumination area. The luminance image only contains the luminance information of the target illumination area, and does not contain the color information. The luminance feature parameter is a feature parameter reflecting the luminance distribution of the target illumination area under the illumination of the light of the desk lamp and the ambient light.
[0201] The desk lamp control parameter generation model is an artificial intelligence model obtained by deep training using a large amount of sample data, which can be any one of a convolutional neural network model, a recurrent neural network model, a generative adversarial network model and a long short-term memory network model. Preferably, the desk lamp control parameter generation model is a long short-term memory network model, which has a long-term memory capability and can remember the change rule of indoor ambient light in a long period, so as to more accurately generate the required desk lamp control parameter.
[0202] In the technical solution of the present application, a large number of luminance feature parameters of the target lighting area of the desk lamp are collected and sorted in various indoor environments at different times (including daytime and nighttime) and weather, and corresponding luminance control parameters are configured to supervise the training of the desk lamp control parameter generation model, so that the desk lamp control parameter generation model can generate desk lamp control parameters suitable for adjusting the light of the desk lamp in any indoor scene to make the lighting of the target lighting area more in line with the needs of reading and writing when receiving the luminance feature parameters in the indoor scene.
[0203] Further, the step of acquiring the luminance image of the target lighting area in the current dimming period in each dimming period specifically includes:
[0204] capturing a real-time image of the target lighting area by a visual sensing unit;
[0205] performing edge recognition on the real-time image to obtain a plurality of color block regions, the color block regions being surrounded by the same edge line and having one or more main colors;
[0206] calculating the pixel area s of each color block region i and the pixel distance d between the center coordinates of each color block region and the center coordinates of the target lighting area i , wherein i is a positive integer between 1 and n block , and n block is the number of color block regions in the real-time image;
[0207] calculating the lighting influence degree of each color block region:
[0208] I i = σ(d i )·s i ,
[0209] wherein σ(d i ) is a distance coefficient associated with the size of the pixel distance d i ;
[0210] generating a luminance image of the color block region with a lighting influence degree greater than a preset influence degree threshold.
[0211] In a specific application scenario, various items such as books, mouse pads, water cups, etc. with different colors are usually placed on the desktop of the desk, and each item usually has one or more main colors. For example, an open book usually has a white background color as the main color, and some items with rich colors such as color photos or posters may have multiple main colors. The above embodiment separates different items by edge lines through edge recognition to form a plurality of color block regions.
[0212] In some embodiments of the present application, when the number of pixels of a color in a color block region accounts for more than a preset proportion threshold in the color block region, the color is referred to as the main color of the color block region. In some other embodiments of the present application, the colors with the top several pixel numbers in a color block region can also be regarded as the main color of the color block region.
[0213] Further, before the step of performing edge recognition on the real-time image to obtain a plurality of color block regions, the method further comprises configuring a minimum pixel area of the color block region.
[0214] The step of performing edge recognition on the real-time image to obtain a plurality of color block regions specifically comprises configuring a region with a pixel area greater than the minimum pixel area as a color block region. It should be understood that the color block region can have a containing and contained relationship on the real-time image.
[0215] The distance coefficient σ(d i ) is a weight coefficient for calculating the lighting influence degree under different pixel distances, and the distance coefficient σ(d i ) is a function inversely related to the pixel distance d i , that is, the greater the pixel distance d i , the smaller the corresponding distance coefficient σ(d i ). Conversely, the smaller the pixel distance d i , the greater the corresponding distance coefficient σ(d i ). For example, the distance coefficient σ(d i ) can be the product of the reciprocal of the pixel distance d i and a specific constant, that is:
[0216]
[0217] where σ0 is an empirical constant.
[0218] In the technical solution of the above embodiment, a brightness image is generated for each color block region with a lighting influence degree greater than a preset influence degree threshold in the target lighting region, that is, when there are n m_block color block regions with a lighting influence degree greater than a preset influence degree threshold in the target lighting region, the target lighting region has n m_block brightness images, and the step of extracting a brightness feature parameter is performed on each brightness image.
[0219] Further, the step of generating a brightness image of a color block region with a lighting influence degree greater than a preset influence degree threshold specifically comprises:
[0220] convert the real-time image into a target color mode with a luminance or brightness dimension;
[0221] extract luminance values of each pixel in the color block region from the real-time image in the target color mode to generate a luminance matrix with the same size as the real-time image;
[0222] perform normalization processing on the luminance values in the luminance matrix to generate the luminance image.
[0223] Specifically, the target color mode can be any one of YUV mode, LAB mode, HSB mode or HSL mode, wherein Y value in YUV mode, L value in LAB mode, B value in HSB mode and L value in HSL mode are the luminance or brightness dimension thereof. When the target color mode is HSL mode, the brightness value of each pixel is determined as the luminance value in the step of extracting the luminance value of each pixel from the real-time image in the target color mode.
[0224] Further, in the step of extracting the luminance value of each pixel in the color block region from the real-time image in the target color mode to generate a luminance matrix with the same size as the real-time image, other pixel points outside the color block region to which the luminance image belongs are filled with a fill number to expand the luminance matrix to the same pixel size as the real-time image, wherein the fill number can be the maximum boundary value or the minimum boundary value of the luminance or brightness dimension in the corresponding color mode, so that it is normalized to 0 or 1 in the subsequent normalization processing.
[0225] Further, the step of extracting the luminance feature parameter of the target illumination region from the luminance image specifically includes:
[0226] counting the number of pixels corresponding to each luminance value in the luminance image;
[0227] generating a luminance-pixel number curve of the luminance image;
[0228] extracting the curve feature parameter of the luminance-pixel number curve of the luminance image to calculate the luminance feature parameter of the target illumination region.
[0229] In the step of counting the number of pixels corresponding to each luminance value in the luminance image, the luminance image is the luminance image after normalization processing, so the luminance value in this step is a value mapped to the range of [0, 1] with a specific precision. It should be understood that the luminance value corresponding to the fill number is not within the counting range.
[0230] The luminance-pixel number curve of the luminance image is specifically a curve fitted from discrete corresponding relations between luminance values and pixel numbers in the luminance image, with the luminance values in the range of [0, 1] as an x-axis and the pixel numbers as a Y-axis.
[0231] Further, the step of calculating the luminance feature parameter of the target illumination region by extracting the curve feature parameter of the luminance-pixel number curve specifically includes:
[0232] obtaining a peak coordinate [L peek , C peek ] of the luminance-pixel number curve, wherein the peak luminance L peek is a luminance value with the largest number of pixels in the luminance image, and the peak pixel number C peek is a number of pixels with the luminance value L peek in the luminance image;
[0233] calculating a peak pixel number ratio of the peak pixel number in the luminance image:
[0234]
[0235] wherein Hor is a pixel width of the luminance image, and Ver is a pixel height of the luminance image;
[0236] calculating a median width W mid of the luminance-pixel number curve.
[0237] It should be understood that the peak luminance L peek is a luminance value with the largest number of corresponding pixels in the luminance image, rather than a maximum luminance on the luminance image.
[0238] In the calculation formula of the peak pixel number ratio, HorxVer represents a total number of pixels in the luminance image.
[0239] Further, the step of calculating the median width W mid of the luminance-pixel number curve specifically includes:
[0240] drawing a median line of the luminance-pixel number curve;
[0241] counting a number n inter of intersection points of the median line and the luminance-pixel number curve;
[0242] when n inter = 1, obtaining a luminance value L inter at the intersection point;
[0243] calculating a slope k of the luminance-pixel number curve at the intersection point inter ;
[0244] when k inter > 0, configuring a median width W of the luminance-pixel number curve as:
[0245] W mid = 1 - L inter ;
[0246] when k inter < 0, configuring a median width W of the luminance-pixel number curve as:
[0247] W mid = L inter .
[0248] The median line is a straight line corresponding to the pixel number in a luminance-pixel number two-dimensional orthogonal coordinate system, and the median line is parallel to the luminance axis in the luminance-pixel number two-dimensional orthogonal coordinate system.
[0249] In the technical solution of the above embodiment, when n inter = 0, it means that the median line has and only has one intersection point with the luminance-pixel number curve.
[0250] Further, after the step of counting the number n inter of intersection points of the median line and the luminance-pixel number curve, further comprising:
[0251] when n inter ≥ 2, obtaining a first luminance value L1 of the luminance value minimum intersection point and a second luminance value L2 of the luminance value maximum intersection point;
[0252] calculating a median width W mid of the luminance-pixel number curve as L2 - L1.
[0253] Further, in the extreme case that the median line has no intersection point with the luminance-pixel number curve, the median width of the luminance-pixel number curve is configured as 0.
[0254] Further, after the step of calculating the median width W mid of the luminance-pixel number curve, further comprising:
[0255] calculating a first luminance feature parameter of the target illumination area:
[0256]
[0257] wherein L peek,ia peak value brightness extracted from the brightness image of the i th color block region;
[0258] calculating a second brightness feature parameter of the target lighting region;
[0259]
[0260] wherein R peek,i a proportion of the number of peak pixels extracted from the brightness image of the i th color block region;
[0261] calculating a third brightness feature parameter of the target lighting region:
[0262]
[0263] wherein W mid,i a median width extracted from the brightness image of the i th color block region;
[0264] configuring the first brightness feature parameter P1, the second brightness feature parameter P2, and the third brightness feature parameter P3 as the brightness feature parameters of the target lighting region.
[0265] Further, the step of determining whether the change amplitude of the brightness feature parameters relative to the previous dimming period is greater than a preset threshold value specifically comprises:
[0266] obtaining a change amplitude threshold value of each brightness feature parameter of the target lighting region pre-configured;
[0267] calculating the difference between the value of each brightness feature parameter of the target lighting region in the current dimming period and the value in the previous dimming period;
[0268] comparing the difference with the change amplitude threshold value;
[0269] When the difference between any brightness feature parameter in the adjacent two dimming periods is greater than the corresponding change amplitude threshold value, it is determined that the change amplitude of the brightness feature parameters of the target lighting region relative to the previous dimming period is greater than the preset threshold value.
[0270] Further, the step of generating an input data sequence containing the brightness feature parameters specifically comprises:
[0271] obtaining the working state parameters of the desk lamp, wherein the working state parameters include the on-off state parameter S1 of the desk lamp, and further include the brightness parameter S2 and / or the power parameter S3 of the desk lamp;
[0272] combining the working state parameters of the desk lamp and the brightness feature parameters of the target lighting region to form the input data sequence.
[0273] The switch state parameter S1 of the desk lamp can be configured as 0 and 1 to represent the on and off states of the desk lamp respectively, and the brightness parameter S2 and the power parameter S3 of the desk lamp are related to the working current size of the desk lamp, and the numerical size will change when the user adjusts the gear of the desk lamp.
[0274] In the technical solutions of some embodiments of the present application, the input data sequence can be represented as:
[0275] {S1, S2, S3, P1, P2, P3}, wherein the brightness parameter S2 and the power parameter S3 of the desk lamp are both normalized values after normalization processing.
[0276] Further, the input data sequence also includes the color feature parameter of the target lighting area, and after the step of converting the real-time image into a target color mode with a brightness or brightness dimension, it also includes:
[0277] extracting the subject color of the color block area from the real-time image of the target color mode, the subject color being the color with the most number of pixels within a set color tolerance range in the color block area;
[0278] configuring the subject color of one or more color block areas with the largest lighting influence as the color feature parameter of the target lighting area.
[0279] Each color mode has its unique spatial structure, for example, the color space of RGB is a cubic structure composed of red, green and blue color channels in an orthogonal relationship, the color space of HSB is a cylindrical structure represented by hue as the circumferential dimension, saturation as the radial dimension, and brightness as the height dimension, and the color space of HSL is a double-cone structure represented by hue as the circumferential dimension, saturation as the radial dimension, and brightness as the height dimension. The color tolerance refers to the spatial distance in the color space of the corresponding color mode, i.e., the three-dimensional coordinate distance. In a relatively simple calculation method, for any color mode, its color space can also be mapped to an orthogonal three-dimensional coordinate system, and the Euclidean distance of each color in the three-dimensional coordinate system is used as its color distance, so as to determine the colors contained in its color tolerance range. The Euclidean distance of two colors is the square root of the sum of the squares of the differences of each color component.
[0280] Taking the color feature parameter of the target lighting area as the subject color of the three color block areas with the largest lighting influence, the input data sequence can be represented as:
[0281] {S1, S2, S3, C1, C2, C3, P1, P2, P3}, wherein C1, C2, C3 are respectively the modulus of the normalized vectors of the main colors of the three color block regions.
[0282] In the technical scheme of some embodiments of the present application, the output data sequence of the desk lamp control parameter generation model further includes a color temperature control parameter of the desk lamp, and after the input data sequence is input into the pre-trained desk lamp control parameter generation model to obtain an output data sequence corresponding to the input data sequence, the color temperature of the desk lamp is adjusted according to the color temperature control parameter in the output data sequence.
[0283] Further, the step of extracting the main color of the color block region from the real-time image of the target color mode specifically includes:
[0284] Obtaining a pre-configured color tolerance distance in the target color mode;
[0285] Accumulating each color dimension of the target color mode according to a preset step size to traverse each color in the target color mode;
[0286] Determining the traversed color as a target color to perform the following steps:
[0287] Determining a target color set in the color space of the target color mode, which has a distance from the target color less than or equal to the color tolerance distance;
[0288] Counting the number of pixels in the color block region falling into the color set;
[0289] Establishing an association between the number of pixels and the target color;
[0290] After the traversal is completed, the color with the maximum associated pixel number value is determined as the main color of the color block region.
[0291] The color tolerance distance is the distance between colors in the color space corresponding to the target color mode, which reflects the tolerance of the main color when counting the number of pixels of the main color in the color block region. The size of the color tolerance distance can be adaptively configured according to the color distribution of each color block region in the real-time image and the selected target color mode.
[0292] The color dimensions refer to the parameters of each dimension that constitute the target color mode, such as the three dimensions Y, U, and V in the YUV mode, and the three dimensions H, S, and L in the HSL mode. In the step of traversing each color in the target color mode by accumulating each color dimension according to a preset step size, the smallest integer unit, such as 1 or 1 degree, is typically used as the step size to sequentially accumulate each dimension until it reaches the upper limit of that dimension.
[0293] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0294] As described above, these embodiments of the present invention do not exhaustively cover all details, nor do they limit the invention to the specific embodiments described. Clearly, many modifications and variations can be made based on the above description. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to effectively utilize the invention and its modifications. The invention is limited only by the claims and their full scope and equivalents.
Claims
1. An AI dimming table lamp, characterized in that, The lighting unit, the visual sensing unit, and the communication unit are connected with the control unit, the visual sensing unit is configured to obtain a brightness image of a target lighting area, the communication unit is configured to establish a communication connection with a cloud server providing a cloud brightness analysis model, and the control unit is configured to: configure a dimming period of the desk lamp; obtain a brightness image of the target lighting area in the current dimming period in each dimming period, the brightness image being an image composed of brightness values of reflected light after desk lamp light and environmental light irradiate on the target lighting area; extract a brightness feature parameter of the target lighting area from the brightness image; determine whether a change amplitude of the brightness feature parameter relative to a previous dimming period is greater than a preset threshold value; when the change amplitude of the brightness feature parameter relative to the previous dimming period is greater than the preset threshold value, generate an input data sequence containing the brightness feature parameter; input the input data sequence into a pre-trained desk lamp control parameter generation model to obtain an output data sequence corresponding to the input data sequence, the output data sequence containing a brightness control parameter of the desk lamp; adjust the brightness of the desk lamp according to the brightness control parameter in the output data sequence; in the step of obtaining a brightness image of the target lighting area in the current dimming period in each dimming period, the control unit is configured to: take a real-time image of the target lighting area through the visual sensing unit; perform edge recognition on the real-time image to obtain a plurality of color block regions, the color block regions being surrounded by the same edge line and having one or more main colors; calculating a pixel area of each color block region and a pixel distance between a center coordinate of each color block region and a center coordinate of the target illumination region wherein is a positive integer between 1 and , is a number of color block regions in the real-time image; calculate an illumination influence degree of each color block region: , wherein a distance coefficient associated with a size of the pixel distance to the pixel distance generate a brightness image of a color block region with an illumination influence degree greater than a preset influence degree threshold.
2. A smart dimming method of an AI dimming table lamp, characterized in that, including: configure a dimming period of the desk lamp; obtain a brightness image of the target lighting area in the current dimming period in each dimming period, the brightness image being an image composed of brightness values of reflected light after desk lamp light and environmental light irradiate on the target lighting area; extract a brightness feature parameter of the target lighting area from the brightness image; determine whether a change amplitude of the brightness feature parameter relative to a previous dimming period is greater than a preset threshold value; when the change amplitude of the brightness feature parameter relative to the previous dimming period is greater than the preset threshold value, generate an input data sequence containing the brightness feature parameter; input the input data sequence into a pre-trained desk lamp control parameter generation model to obtain an output data sequence corresponding to the input data sequence, the output data sequence containing a brightness control parameter of the desk lamp; adjust the brightness of the desk lamp according to the brightness control parameter in the output data sequence; the step of obtaining a brightness image of the target lighting area in the current dimming period in each dimming period specifically includes: take a real-time image of the target lighting area through the visual sensing unit; perform edge recognition on the real-time image to obtain a plurality of color block regions, the color block regions being surrounded by the same edge line and having one or more main colors; calculating a pixel area of each color block region and a pixel distance between a center coordinate of each color block region and a center coordinate of the target illumination region wherein is a positive integer between 1 and , is a number of color block regions in the real-time image; Calculate the illumination influence degree of each color block region: , wherein is a distance coefficient associated with the size of the distance of the pixel; Generate a brightness image of the color block region with an illumination influence degree greater than the preset influence degree threshold. 3.The smart dimming method of the AI dimming table lamp according to claim 2, wherein, The step of generating a brightness image of the color block region with an illumination influence degree greater than the preset influence degree threshold specifically includes: Convert the real-time image into a target color mode with brightness or brightness dimension; Extract the brightness value of each pixel point of the color block region from the real-time image of the target color mode to generate a brightness matrix with the same size as the real-time image; Perform normalization processing on the brightness value in the brightness matrix to generate the brightness image. 4.The smart dimming method of the AI dimming table lamp according to claim 3, wherein, The step of extracting the brightness feature parameter of the target illumination region from the brightness image specifically includes: Statistical number of pixels corresponding to each brightness value in the brightness image; Generate a brightness-pixel number curve of the brightness image; Extract the curve feature parameter of the brightness-pixel number curve of the brightness image to calculate the brightness feature parameter of the target illumination region. 5.The smart dimming method of the AI dimming table lamp according to claim 4, wherein, The step of extracting the curve feature parameter of the brightness-pixel number curve of the brightness image to calculate the brightness feature parameter of the target illumination region specifically includes: obtaining a peak value coordinate of the luminance-pixel number curve wherein the peak luminance is a luminance value with the most pixels in the luminance image, the peak pixel number is a pixel number with the luminance value in the luminance image; Calculate the peak pixel number ratio of the peak pixel number in the brightness image: , wherein is a pixel width of the luminance image, is a pixel height of the luminance image; calculating a median width of the luminance-pixel number curve . 6.The smart dimming method of the AI dimming table lamp according to claim 5, wherein, calculating a median width of the luminance-pixel number curve comprises specifically: Draw the median line of the brightness-pixel number curve; counting the number of intersections of the median line with the luminance-pixel number curve ; When the intersection is obtained ; calculating a slope of the luminance-pixel number curve at the intersection point ; When the median width of the luminance-pixel number curve is configured as: ; When the median width of the luminance-pixel number curve is configured as: 。 7. The smart dimming method of the AI dimming table lamp according to claim 5, wherein, after the step of calculating a median width of the luminance-pixel number curve further comprising: Calculate the first brightness feature parameter of the target illumination region: , wherein is the peak luminance extracted from the luminance image of the jth color patch region; is the peak luminance extracted from the luminance image of the jth color patch region; Calculate the second brightness feature parameter of the target illumination region: , wherein is the ratio of the number of peak pixels extracted from the luminance image of the first color block region to the total number of pixels in the luminance image of the first color block region. Calculate the third brightness feature parameter of the target illumination region: , wherein is a median width extracted from a luminance image of the jth color block region; is a median width extracted from a luminance image of the jth color block region; the first luminance characteristic parameter the second luminance characteristic parameter the third luminance characteristic parameter is configured as a luminance characteristic parameter of the target illumination area. 8.The smart dimming method of the AI-dimming table lamp according to claim 3, wherein, The input data sequence also includes the color feature parameter of the target illumination region, after the step of converting the real-time image into a target color mode with brightness or brightness dimension, it also includes: Extract the main color of the color block region from the real-time image of the target color mode, the main color is the color with the most number of pixels within the set color tolerance range in the color block region; Configure the main color of one or more color block regions with the largest illumination influence degree as the color feature parameter of the target illumination region. 9.The smart dimming method of the AI dimming table lamp according to claim 8, wherein, The step of extracting the main color of the color block region from the real-time image of the target color mode specifically includes: Obtain the pre-configured color tolerance distance in the target color mode; Accumulate each color dimension of the target color mode according to the preset step length to traverse each color in the target color mode; Determine the target color as the target color to perform the following steps: Determine the target color set in the color space of the target color mode with a distance less than or equal to the color tolerance distance from the target color; Statistical number of pixels in the color block region falling into the color set; Establish the association between the pixel number and the target color; After the traversal is completed, determine the color with the maximum associated pixel number value as the main color of the color block region.
Citation Information
Patent Citations
Electrooptic device, driving circuit, and electronic device
CN101025492A
Intelligent lamp control method and control system based on environment image
CN114549864A