Light effect control method, electronic device and storage medium

By calculating the grid division and color ratio of user interaction interface images, determine the color of the target color and control the lighting unit of the lighting unit of the lighting equipment, solve the problem of the color difference between the color and screen display color of the atmosphere light in the existing technology, and improve the effect of the lighting effect. Reality and user experience.

WO2025015572A1PCT designated stage expired Publication Date: 2025-01-23SHENZHEN MANGO SCI & TECH INNOVATION CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/108232
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-07-19
Publication Date
2025-01-23

AI Technical Summary

Technical Problem

When existing ambient lights display the light color, the color of the display is often calculated due to large differences between the color display color and the color of the screen, which affects the lighting effect and may have abnormal colors, resulting in poor user experience.

Method used

By obtaining the image displayed on the user interaction interface, it is divided into multiple grids, the proportion of the color in each grid is calculated, the target color is determined, and the light-emitting unit of the lighting device is controlled to update the color to match the target color.

Benefits of technology

Ensure that the light color displayed by the lighting equipment is consistent with the screen color of the user interaction interface, improving the authenticity of the lighting effect and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023108232_23012025_PF_FP_ABST
    Figure CN2023108232_23012025_PF_FP_ABST
Patent Text Reader

Abstract

A light effect control method, an electronic device (10) and a storage medium. The method is applied to the electronic device (10). The method comprises: acquiring an image displayed by a user interaction interface of an electronic device (10) (S201); dividing the image to obtain a corresponding target image, wherein the target image includes a plurality of grids, and determining at least one target grid from among the plurality of grids (S202); calculating a color proportion of each type of color in each target grid, and determining a color corresponding to the maximum color proportion to be a target color corresponding to the target grid (S203); and on the basis of the target color corresponding to each target grid, controlling a plurality of light-emitting units (21) in a lighting device (20) to update the currently displayed color to the corresponding target color (S204). Thus, the display effect of light-emitting units (21) of a lighting device (20) can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Lighting effect control method, electronic device and storage medium Technical Field

[0001] The present application relates to the field of lighting technology, and in particular to a lighting effect control method, electronic device, and storage medium. Background Art

[0002] Ambient lighting is a decorative lighting device that can be installed in cars, indoors, or anywhere else to create a sense of ambiance. Ambient lighting contains many lamp beads, each of which can display a different color. Currently, this method typically collects the screen color displayed by the control device and calculates the average color value using the red, green, and blue (RGB) values ​​of all pixels in each frame of the screen color. This is then used to control the lamp beads in the ambient light to display that average color value. However, this calculation method can cause a significant difference between the color displayed by the ambient light and the color displayed on the screen, affecting the lighting effect displayed by the ambient light. Because the displayed color value is the average value, abnormal colors other than those displayed on the screen may appear, which do not correspond to any of the colors the user sees on the screen. This results in severe distortion and a poor user experience.

[0003] Summary of the Invention

[0004] The embodiments of the present application disclose a lighting effect control method, an electronic device, and a storage medium, which solve the technical problem that the light color displayed by the lighting device is inconsistent with the screen color of the user interaction interface.

[0005] The present application provides a lighting effect control method, which is applied to an electronic device. The method includes: obtaining an image displayed on a user interaction interface of the electronic device; dividing the image to obtain a corresponding target image, where the target image includes multiple grids, and determining at least one target grid from the multiple grids; calculating the color proportion of each color type within each target grid, and determining the color corresponding to the largest color proportion as the target color of the corresponding target grid; and based on the target color corresponding to each target grid, controlling multiple light-emitting units in a lighting device to update the currently displayed color to the corresponding target color.

[0006] In some optional embodiments, after calculating the color proportion of each color category in each target grid, the method further includes: if there are at least two color categories whose color proportions are the largest and the same, arbitrarily selecting one color from the at least two color categories to be determined as the target color.

[0007] In some optional implementations, the image is a red, green, and blue (RGB) image, and the method further includes: converting the RGB image into a preset image.

[0008] In some optional embodiments, a pixel coordinate system corresponding to the preset image is established; a pixel coordinate set of a target color corresponding to each target grid of the preset image is obtained; based on the pixel coordinate set, an RGB value of the target color is determined; and multiple light-emitting units in the lighting device are controlled to update the RGB value of the current color to the RGB value of the target color.

[0009] In some optional embodiments, determining the RGB value of the target color based on the pixel coordinate set includes: calculating the RGB three-channel average of the pixel corresponding to the target color based on the pixel coordinate set; and determining the RGB three-channel average as the RGB value.

[0010] In some optional embodiments, based on the target color corresponding to each target grid, controlling multiple light-emitting units in the lighting device to update the currently displayed color to the corresponding target color includes: if it is determined from the multiple grids that the number of at least one target grid is equal to the number of the multiple light-emitting units, controlling the multiple light-emitting units to dynamically display the target color of the corresponding target grid in the target image corresponding to multiple frames of images.

[0011] In some optional embodiments, based on the target color corresponding to each target grid, controlling multiple light-emitting units in the lighting device to update the currently displayed color to the corresponding target color includes: if it is determined from the multiple grids that the number of at least one target grid is greater than the number of the light-emitting units, controlling each light-emitting unit to dynamically display the target color of the specified target grid in the target image corresponding to multiple frames of images according to a preset display order.

[0012] In some optional embodiments, based on the target color corresponding to each target grid, controlling multiple light-emitting units in the lighting device to update the currently displayed color to the corresponding target color includes: if it is determined from the multiple grids that the number of at least one target grid is less than the number of the light-emitting units, controlling the multiple light-emitting units to display the target color of the corresponding target grid in the target image corresponding to the multiple frames of images according to a preset display rule.

[0013] The present application also provides an electronic device, which includes a processor and a memory, and the processor is used to implement the lighting effect control method when executing a computer program stored in the memory.

[0014] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the lighting effect control method is implemented.

[0015] Since the lighting device can include multiple different colors, each light-emitting unit in the lighting device can display a different color. In the lighting effect control method provided in the present application, the image displayed on the user interaction interface is first preprocessed. The preprocessing includes dividing the image into a target image containing multiple grids, determining at least one target grid from the multiple grids, and calculating the target color in each target grid to control each light-emitting unit of the lighting device to display the target color of each target grid. Since there are multiple different colors in each target grid, in the process of extracting the color, the target color is obtained by calculating the color ratio. This not only ensures that the extracted color is the color actually displayed on the user interaction interface, but also controls the lighting device to display the target color, thereby ensuring the display effect of the lighting device to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] FIG1 is a diagram illustrating an application environment architecture of a lighting effect control method according to an embodiment of the present application.

[0017] FIG2 is a flow chart of a lighting effect control method provided in an embodiment of the present application.

[0018] FIG3 is a flow chart of a lighting effect control method provided by another embodiment of the present application.

[0019] FIG4 is a schematic diagram of lighting effect control provided in an embodiment of the present application.

[0020] FIG5 is a schematic diagram of lighting effect control provided by another embodiment of the present application.

[0021] FIG6 is a schematic structural diagram of a lighting effect control device provided in an embodiment of the present application.

[0022] FIG7 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] To facilitate understanding, some illustrations of concepts related to the embodiments of the present application are given for reference.

[0024] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and drawings of this application are used to distinguish similar objects, rather than to describe a specific order or sequence.

[0025] Ambient lighting is a decorative lighting device that can be installed in cars, indoors, or anywhere else to create a sense of ambiance. Ambient lighting contains many lamp beads, each of which can display a different color. Currently, this method typically collects the screen color displayed by the control device and calculates the average color value using the red, green, and blue (RGB) values ​​of all pixels in each frame of the screen color. This is then used to control the lamp beads in the ambient light to display that average color value. However, this calculation method can cause a significant difference between the color displayed by the ambient light and the color displayed on the screen, affecting the lighting effect displayed by the ambient light. Because the displayed color value is the average value, abnormal colors other than those displayed on the screen may appear, which do not correspond to any of the colors the user sees on the screen. This results in severe distortion and a poor user experience.

[0026] In order to better understand the lighting effect control method, electronic device and storage medium provided in the embodiments of the present application, the application scenario of the lighting effect control method of the present application is first described below.

[0027] FIG1 is an application environment architecture diagram of the lighting effect control method provided in an embodiment of the present application. The lighting effect control method provided in an embodiment of the present application is applied to an electronic device 10, which can establish a communication connection with multiple lighting devices 20. The communication connection mode can be a wired network or a wireless network, wherein the wired network can be any one of a local area network, a metropolitan area network, and a wide area network, and the wireless network can be any one of Bluetooth Technology, Wireless LAN (Wireless Fidelity, Wi-Fi), Near Field Communication (Near Field Communication, NFC), ZigBee Wireless Networks (ZigBee) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, wireless Universal Serial Bus (USB), etc.

[0028] The electronic device 10 may be any device having a user interface, such as a computer, a mobile phone, a tablet computer, a personal digital assistant (PDA), etc. The electronic device 10 may include, but is not limited to, a display screen 11 for displaying the user interface, which may be used to display various images.

[0029] The lighting device 20 may be a lamp with multiple display colors. The lighting device 20 may include, but is not limited to, multiple light-emitting units 21 , which may be lamp beads. The electronic device 10 controls the colors displayed by the multiple light-emitting units 21 .

[0030] The schematic diagram 1 is merely an example of the electronic device 10 and does not constitute a limitation on the electronic device 10. The electronic device 10 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 10 may also include input and output devices, network access devices, etc.

[0031] Please refer to Figure 2, which is a flowchart of a lighting effect control method provided by an embodiment of the present application, which is applied to an electronic device (such as the electronic device 10 of Figure 1). According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.

[0032] Step S201: Acquire an image displayed on a user interaction interface of an electronic device.

[0033] In some embodiments of the present application, a user interface (UI) may be an interface provided by an application (e.g., a lighting device control program (APP)), the main interface of an electronic device (e.g., a computer, mobile phone, tablet, remote control device, etc.), or an interface accessed by clicking a desktop icon of the electronic device, but is not limited to this in actual applications. Information displayed on the user interface may be displayed in the form of images, text, colors, etc., and this application does not limit this.

[0034] For example, in one example, the electronic device is a mobile phone. An app that can control the lighting color of a lighting device (e.g., a lamp) is installed on the mobile phone. The user interface is the interface provided by the lighting device control app. The user turns on the mobile phone display and clicks on the lighting device control app to enter the user interface. The user interface can display a static image or a video, and this application does not limit this.

[0035] For example, in another example, taking the electronic device as a computer as an example, a desktop icon with the function of controlling the lighting device is installed on the computer. The interface entered by clicking the desktop icon for controlling the lighting device is the user interaction interface. Similarly, the user interaction interface can display a static picture or a video, and this application does not limit this.

[0036] In other embodiments of the present application, the user interaction interface may also be any interface displayed by the electronic device during operation. For example, after the electronic device establishes a communication connection with the lighting device, the main interface of the electronic device is used as the user interaction interface for controlling the color of the lighting device, or the interface displayed in real time during operation of the electronic device is used as the user interaction interface. This application does not limit this.

[0037] In some embodiments of the present application, the electronic device can capture an image displayed on the user interaction interface, which can be an image frame displayed on the user interaction interface at any time, and is used to extract the color of the lighting device for controlling the lighting device. The image displayed on the user interaction interface can be a red, green, and blue RGB image. The RGB image is a color image composed of three color channels: red, green, and blue. The changes in these color channels and their superposition with each other can obtain different colors.

[0038] Step S202 : dividing the image to obtain a corresponding target image, where the target image includes a plurality of grids, and determining at least one target grid from the plurality of grids.

[0039] In some embodiments of the present application, the electronic device may divide the RGB image into a target image comprising a plurality of grids, and the number of divided grids is not limited and may be two or more.

[0040] In some embodiments of the present application, in order to obtain the color attributes of an RGB image, the RGB image can be converted into a preset image, wherein the preset image can be any color model among the hue-saturation-brightness HSV image, the digital image HSI, the chroma image HSB, and the color image CMY / CMYK.

[0041] In one example, a preset image is taken as a hue-saturation-brightness HSV image. The HSV image is a color model based on three channels: hue (Hue), saturation (Saturation) and brightness (Value), and can also be called a hexagonal pyramid model. In the HSV color model, the hue channel represents the type or kind of color, the saturation channel represents the purity or shade of the color, and the brightness channel represents the brightness of the color. The electronic device can divide the HSV image into a target image containing multiple grids. The multiple grids can be at least two or more grids. At least one target grid can be determined from the multiple grids to control the lighting device.

[0042] Step S203 , calculating the color proportion of each color type in each target grid, and determining the color corresponding to the largest color proportion as the target color of the corresponding target grid.

[0043] In some embodiments of the present application, the electronic device can calculate the hue, saturation, and brightness of each pixel in each target grid in a preset image, and divide the colors in the target grid into corresponding color categories. The color categories may include black, gray, white, red, orange, yellow, green, and cyan, etc., but actual applications are not limited to this.

[0044] In some embodiments of the present application, the preset image is an HSV image. Each color has a corresponding HSV range. The HSV range setting of each color is different to distinguish different color categories. The setting of the HSV range of each color can be expressed by a general formal formula as follows: low ≤H≤H high ; S low ≤S≤S high ; V low ≤V≤V high ;

[0045] Among them, H represents hue, H low Indicates the minimum value of hue, H high Indicates the maximum value of hue, S indicates saturation, S low Indicates the minimum value of saturation, S high , represents the maximum value of saturation, V represents brightness, V low Indicates the minimum brightness, V high Indicates the maximum brightness.

[0046] In another example, the HSV ranges of different color categories can be shown in Table 1. Table 1 shows the HSV range of each color. If a pixel is detected to meet the HSV range of a corresponding color, it can be determined that the pixel is the corresponding color.

[0047] Table 1

[0048] In some embodiments of the present application, the electronic device can use the HSV model to determine the HSV value corresponding to each pixel in each target grid, and determine the color category of the pixels in the target grid based on the determined HSV value and the HSV range shown in Table 1. For example, in one example, if the HSV value is detected to be within the HSV range of blue, the pixel with the HSV value is determined to be blue. In other examples, if the HSV value is detected to be not within any HSV range, the pixel can be set to invalid data or other customized mixed colors, which is not limited by the present application.

[0049] In some embodiments of the present application, after determining the color category within the target grid, the color proportion of each type of color in each target grid can be calculated. The color proportion represents the ratio of the number of pixels occupied by any type of color in any target grid to the total number of pixels occupied by all colors in the target grid. For example, in one example, the grid contains red, blue and orange. Traversing the entire target grid, it is found that 30 pixels belong to red, 20 pixels belong to blue, and 50 pixels belong to orange. From this, it can be calculated that red accounts for 30%, blue accounts for 20%, and orange accounts for 50%.

[0050] In other embodiments, the preset image may be converted into any color model of a digital image HSI, a chromaticity image HSB, or a color image CMY / CMYK to calculate the color proportion, which will not be described here.

[0051] In some embodiments of the present application, to determine the actual color displayed in each target grid, the color with the largest color proportion can be determined as the target color of the corresponding target grid. For example, in one example, if red accounts for 30%, blue accounts for 20%, and orange accounts for 50% of the target grid, orange is used as the target color of the target grid. In some embodiments of the present application, if there are at least two color categories with the same color proportion, and the color with the largest color proportion is selected from the at least two color categories to determine the target color.

[0052] For example, in one example, the target grid contains 40% red, 40% blue, 10% orange, and 10% yellow. Although the color proportions of orange and yellow are the same, and the color proportions of red and blue are the same, the color proportions of orange and yellow are smaller than the color proportions of red and blue. Therefore, the color proportions of red and blue are the colors with the largest proportion in the grid. Any color from red and blue can be selected as the target color, and the target color can be red or blue.

[0053] In another example, the target color can be determined based on the highest color intensity corresponding to the RGB values. For example, if the RGB value of red is (200, 0, 0) with a maximum color intensity of 200, and the RGB value of blue is (0, 0, 210) with a maximum color intensity of 210, then the target color determined based on the highest color of the RGB values ​​is blue. In other embodiments, the target color can also be determined based on the lowest color intensity, which is not limited in this application.

[0054] Step S204 : Based on the target color corresponding to each target grid, control the plurality of light-emitting units in the lighting device to update the currently displayed color to the corresponding target color.

[0055] In some embodiments of the present application, based on the target color corresponding to each target grid, the RGB value of the target color corresponding to each target grid can be calculated. The RGB value represents the brightness value of the color in the red, green, and blue channels. Specifically, based on the HSV image, a pixel coordinate system is established to obtain the pixel coordinate set of the target color corresponding to each target grid in the HSV image. The pixel coordinate set represents the coordinate set of the pixels of the target color in the target grid in the pixel coordinate system. The RGB value of the target color can be calculated according to the pixel coordinate set (such as the HSV value in Table 1). Specifically, the RGB three-channel average value of the pixel corresponding to the target color is calculated according to the pixel coordinate set, including initializing the total value of the three channels to 0, traversing each pixel coordinate in the pixel coordinate set, obtaining the RGB three-channel value of each pixel coordinate, accumulating the pixel value of each channel, and obtaining the channel total value of each channel, such as the R channel total value, the G channel total value, and the B channel total value. The number of pixels combined into the pixel coordinate set is obtained. Based on the channel total value of each channel and the number of pixels, the channel total value of each channel and the number of pixels can be calculated. The average value of the RGB three channels is calculated, for example, R_avg = Sum(Ri) / N, where R_avg represents the average value of the R channel, Sum(Ri) represents the total value of the R channel, and N represents the number of pixels. G_avg = Sum(Gi) / N, where G_avg represents the average value of the G channel and Sum(Gi) represents the total value of the G channel. B_avg = Sum(Bi) / N, where B_avg represents the average value of the B channel and Sum(Bi) represents the total value of the B channel. Then the RGB value of the target color can be expressed as (R_avg, G_avg, B_avg). In some embodiments of the present application, the electronic device is communicatively connected to the lighting device. After the electronic device calculates the target color of each target grid, each light-emitting unit in the lighting device can have a corresponding target grid. Based on the target color of the target grid, the multiple light-emitting units of the lighting device are controlled to update the currently displayed color to the corresponding target color. In another example, based on the RGB value of the target color of the target grid, the RGB value of the current color of the multiple light-emitting units of the lighting device can be controlled to update to the RGB value of the target color.

[0056] For example, in one example, four target grids are identified from multiple grids in a target image. Target grid 1 has a target color of red, target grid 2 has a target color of blue, target grid 3 has a target color of green, and target grid 4 has a target color of yellow. Lighting unit 1 of the lighting device is controlled to display red, light-emitting unit 2 displays blue, light-emitting unit 3 displays green, and light-emitting unit 4 displays yellow. The above is merely an example, and the display conditions of the lighting device can be specifically set to suit different environments.

[0057] In other embodiments of the present application, the image for which the electronic device calculates the target color may be a video frame of a video, and the electronic device may calculate the target color corresponding to each grid of each video frame, so that the light color of the lighting device may change dynamically as the video changes.

[0058] In the related art, the weighted average of all pixels in the target grid is usually calculated as the target color of the target grid. For example, the target grid includes green with RGB (57, 255, 20) and orange with RGB (245, 157, 57). The RGB values ​​of green and orange are calculated to obtain a yellow-green color with RGB (141, 211, 35). Obviously, the color actually displayed in the target grid does not include yellow-green. In an embodiment of the present application, if the target grid includes green with RGB (57, 255, 20) and orange with RGB (245, 157, 57), and the proportion of green is greater than that of orange, green is used as the target color of the target grid, and the RGB average value of green is calculated (59, 255, 21). Compared with the related art, the target color calculated by the embodiment of the present application is closer to the color displayed on the user interaction interface.

[0059] In an embodiment of the present application, by determining the color of each pixel in the target image and obtaining the color proportion of each color category, the target color can be extracted from the colors actually displayed by the electronic device. The target color of the target grid is the color with the largest color proportion in the grid. After obtaining the target color, the electronic device can control the lighting device to display multiple target colors for multiple target grids, ensuring that the colors displayed by the lighting device are the colors actually displayed in the image, making the lighting effects displayed by the lighting device sufficiently realistic.

[0060] Please refer to FIG3 , which is a flowchart of a lighting effect control method provided by another embodiment of the present application. Because different lighting devices may have different numbers of light-emitting units, using the same electronic device to control different lighting devices may result in different display modes depending on the number of light-emitting units and the number of grids divided. Based on this, the embodiment shown in FIG3 is provided. The embodiment shown in FIG3 is an example of a specific implementation of step S205 shown in FIG2 , and includes the following steps:

[0061] Step S301: Obtain the number of at least one target grid determined from a plurality of grids and the number of light-emitting units of the lighting device.

[0062] In some embodiments of the present application, the image can be divided into grids of different sizes according to different image sizes, or the size of the divided grids can be pre-set to divide the image, and the present application does not limit this. After the image is divided into grids, at least one grid can be selected from the multiple divided grids as the target grid. A plurality of light-emitting units can be provided in the lighting device, such as an atmosphere light. The number of light-emitting units of different models of lighting devices can be different, and each light-emitting unit can display a different color. When the electronic device establishes a connection with the lighting device, it can receive the number of light-emitting units sent by the lighting device, and the electronic device can also receive the number of light-emitting units input by the user. The present application does not limit this.

[0063] Please refer to FIG4 , which is a schematic diagram of lighting effect control provided in an embodiment of the present application.

[0064] For example, in one example, as shown in FIG4 , the target image can be divided into four grids A, B, C, and D. At the same time, the four grids A, B, C, and D are determined as target grids. The lighting device can be a lamp, such as lamp 1, lamp 2, and lamp 3 in FIG4 , wherein lamp 1 includes 4 light-emitting units, lamp 2 includes 6 light-emitting units, and lamp 3 includes 2 light-emitting units.

[0065] Step S302: determine whether the number of target grids is equal to the number of light-emitting units.

[0066] In some embodiments of the present application, if the number of target grids is equal to the number of light-emitting units, step S303 is executed. For example, as shown in Figure 4, the number of target grids is equal to 4, and the number of light-emitting units of lamp 1 is equal to 4, then the number of target grids is equal to the number of light-emitting units of lamp 1.

[0067] If the number of target grids is not equal to the number of light-emitting units, step S304 is executed. For example, as shown in Figure 4, the number of target grids is equal to 4, the number of light-emitting units of lamp 2 is equal to 6, and the number of light-emitting units of lamp 3 is equal to 2. Then the number of grids is not equal to the number of light-emitting units of lamp 2 and lamp 3.

[0068] Step S303 : if the number of target grids is equal to the number of light-emitting units, control the plurality of light-emitting units to dynamically display the target colors corresponding to the target grids in the target images corresponding to the plurality of frames of images.

[0069] In some embodiments of the present application, if the number of target grids is equal to the number of light-emitting units, a one-to-one correspondence can be established between the target grids and the light-emitting units. As shown in FIG4 , the number of light-emitting units in luminaire 1 is the same as the number of grids. Therefore, the target color corresponding to target grid A can be used to control the color of the first light-emitting unit in luminaire 1, the target color corresponding to target grid B can be used to control the color of the second light-emitting unit in luminaire 1, the target color corresponding to target grid C can be used to control the color of the third light-emitting unit in luminaire 1, and the target color corresponding to target grid D can be used to control the color of the fourth light-emitting unit in luminaire 1. In other embodiments, target grids and light-emitting units can also have other correspondences, which are not limited by the present application.

[0070] Step S304: determine whether the number of target grids is greater than the number of light-emitting units.

[0071] In some embodiments of the present application, if the number of target grids is greater than the number of light-emitting units, step S305 is executed. For example, as shown in Figure 4, the number of target grids is equal to 4, and the number of light-emitting units of lamp 3 is equal to 2, then the number of target grids is greater than the number of light-emitting units of lamp 3.

[0072] If the number of target grids is less than the number of light-emitting units, step S306 is executed. For example, as shown in FIG4 , the number of target grids is 4 and the number of light-emitting units of lamp 2 is 6, then the number of target grids is less than the number of light-emitting units of lamp 2.

[0073] Step S305 : if the number of target grids is greater than the number of light-emitting units, each light-emitting unit is controlled to dynamically display the target color of the designated target grid in the target image corresponding to the multiple frames of images according to a preset display order.

[0074] In some embodiments of the present application, a display order may be pre-set in the electronic device, and the display order may be the order in which the target grid is divided.

[0075] For example, in some examples, when the number of target grids is greater than the number of light-emitting units, the target color of the designated target grid can be used to control the color of the lighting device. For example, in some examples, as shown in FIG4 , where a luminaire 3 includes two light-emitting units and has four target grids, target grids A and C can be used as designated target grids for controlling the color of the first light-emitting unit of luminaire 3, while target grids B and D can be used as designated target grids for controlling the color of the second light-emitting unit of luminaire 3. The above is merely an example; the designated target grids for controlling the color of the first light-emitting unit of luminaire 3 may also be target grids A and B, and this application is not limited thereto.

[0076] In other embodiments of the present application, the display order may also be based on a preset priority setting, for example, a target grid located at the edge of the target image has a higher priority than a target grid located in the middle of the target image.

[0077] For example, in some examples, see Figure 5, which is a schematic diagram of lighting effect control provided by another embodiment of the present application. As shown in Figure 5, when the number of target grids is greater than the number of light-emitting units, the target colors of the target grids at the edge of the target image are preferentially extracted, such as target grids D1 to D10 in Figure 5. The electronic device can use the target colors of the target grids at the edge of the target image to control the color of the lighting device, thereby improving the control efficiency of the electronic device.

[0078] In some embodiments of the present application, the designated target grid may be two target grids or a target grid composed of two or more. Therefore, the designated target grid may include at least two different target colors, and the color to be displayed first may be determined based on the highest color intensity corresponding to the RGB value. For example, the target colors contained in the designated target grid are red and blue, the RGB value of red is (200, 0, 0), and the highest color intensity is 200, and the RGB value of blue is (0, 0, 210), and the highest color intensity is 210. Then, based on the highest color of the RGB value, the corresponding light-emitting unit is determined to display blue first and then red.

[0079] Step S306 : if the number of target grids is less than the number of light-emitting units, control the plurality of light-emitting units to display the target colors corresponding to the target grids in the target images corresponding to the plurality of frames of images according to a preset display rule.

[0080] In some embodiments of the present application, as shown in FIG4 , the number of target grids is 4, and the number of light-emitting units of the lamp 2 is 6. The number of target grids is less than the number of light-emitting units. A display rule can be set in advance in the electronic device. The display rule can be that the electronic device randomly selects light-emitting units for display according to the number of target grids. In some examples, as shown in FIG4 , the four target grids can select any four light-emitting units in the lamp 2 for display, and the present application does not limit this.

[0081] In another example, assuming that there is one target grid and two light-emitting units, the target grid can control any one of the two light-emitting units to display it, or control the two light-emitting units to display the target grid in turn. This application is not limited to this.

[0082] In other embodiments of the present application, the electronic device can control the lighting device to dynamically display the target color corresponding to each target grid in the form of a marquee. For example, in one example, as shown in FIG4 , the electronic device can use the color of target grid A to control the lamp 1 to display the target color in each light-emitting unit in turn every 10 ms. Similarly, it can use the color of target grid B for control, and so on. In another example, as shown in FIG5 , in the target image displayed at the first moment, the electronic device can control the 8 light-emitting units in the lamp 4 to simultaneously display the target colors of target grids D1 to D8. Then, in the target image displayed at the second moment, the electronic device controls the 8 light-emitting units in the lamp 4 to simultaneously display the target colors of target grids D2 to D9, where the first moment is earlier than the second moment. This application is not limited to this.

[0083] In the embodiments of the present application, when controlling a lighting device, the electronic device may control the lighting device in conjunction with the number of target grids and the number of light-emitting units, or may control the lighting device in conjunction with the number of target grids and the number of light-emitting units. That is, the light-emitting units may be controlled by specifying target grids, and the present application does not limit this. When the electronic device is connected to different lighting devices at the same time, it may be controlled simultaneously based on different rules, as shown in the embodiment of FIG3. The present application can make the color displayed by the lighting device consistent with the color displayed in the image, thereby improving the lighting effect of the lighting device.

[0084] Please refer to Figure 6, which is a schematic diagram of the structure of the lighting effect control device provided in an embodiment of the present application. As shown in Figure 6, in this embodiment of the present application, the lighting effect control device 600 can be divided into multiple functional modules according to the functions it performs, and can include: an acquisition module 610, a division module 620, a calculation module 630, and a control module 640.

[0085] The acquisition module 610 is configured to acquire an image displayed on the user interaction interface of the electronic device.

[0086] The division module 620 is configured to divide the image into a corresponding target image, where the target image includes a plurality of grids, and determine at least one target grid from the plurality of grids.

[0087] The calculation module 630 is configured to calculate the color proportion of each color type in each target grid, and determine the color corresponding to the largest color proportion as the target color of the corresponding target grid.

[0088] The control module 640 is configured to control the plurality of light-emitting units in the lighting device to update the currently displayed color to the corresponding target color based on the target color corresponding to each target grid.

[0089] In some optional embodiments, after calculating the color proportion of each color category in each target grid, the method further includes: if there are at least two color categories with the largest and identical color proportions, arbitrarily selecting one color from the at least two color categories to be determined as the target color.

[0090] In some optional implementations, the image is a red, green, and blue (RGB) image, and the method further includes: converting the RGB image into a preset image.

[0091] In some optional embodiments, a pixel coordinate system corresponding to the preset image is established; a pixel coordinate set of a target color corresponding to each target grid of the preset image is obtained; based on the pixel coordinate set, an RGB value of the target color is determined; and multiple light-emitting units in the lighting device are controlled to update the RGB value of the current color to the RGB value of the target color.

[0092] In some optional embodiments, determining the RGB value of the target color based on the pixel coordinate set includes: calculating the RGB three-channel average of the pixel corresponding to the target color based on the pixel coordinate set; and determining the RGB three-channel average as the RGB value.

[0093] In some optional embodiments, based on the target color corresponding to each target grid, controlling multiple light-emitting units in the lighting device to update the currently displayed color to the corresponding target color includes: if it is determined from the multiple grids that the number of at least one target grid is equal to the number of the multiple light-emitting units, controlling the multiple light-emitting units to dynamically display the target color of the corresponding target grid in the target image corresponding to multiple frames of images.

[0094] In some optional embodiments, based on the target color corresponding to each target grid, controlling multiple light-emitting units in the lighting device to update the currently displayed color to the corresponding target color includes: if it is determined from the multiple grids that the number of at least one target grid is greater than the number of the light-emitting units, controlling each light-emitting unit to dynamically display the target color of the specified target grid in the target image corresponding to multiple frames of images according to a preset display order.

[0095] In some optional embodiments, based on the target color corresponding to each target grid, controlling multiple light-emitting units in the lighting device to update the currently displayed color to the corresponding target color includes: if it is determined from the multiple grids that the number of at least one target grid is less than the number of the light-emitting units, controlling the multiple light-emitting units to display the target color of the corresponding target grid in the target image corresponding to the multiple frames of images according to a preset display rule.

[0096] Please refer to FIG. 7 , which is a schematic structural diagram of an electronic device provided in an embodiment of the present application.

[0097] In this embodiment, the electronic device 10 includes a display screen 11, a memory 12, and at least one processor 13. The memory 12 may be an internal memory of the electronic device 10, i.e., a memory built into the electronic device 10. In other embodiments, the memory 12 may also be an external memory of the electronic device 10, i.e., a memory externally connected to the electronic device 10.

[0098] In some embodiments, the memory 12 is used to store program codes and various data, and to achieve high-speed and automatic access to programs or data during the operation of the electronic device 10 .

[0099] The memory 12 may include a random access memory and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0100] In one embodiment, the processor 13 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor may be any other conventional processor, etc.

[0101] If the program code and various data in the memory 12 are implemented in the form of a software functional unit and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, such as the lighting effect control method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, it can implement the steps of the above-mentioned method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), etc.

[0102] It is understood that the module division described above is a logical functional division, and other division methods may be used in actual implementation. In addition, the functional modules in the various embodiments of the present application can be integrated into the same processing unit, or each module can exist physically separately, or two or more modules can be integrated into the same unit. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit the present application. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present application.

Claims

1. A lighting effect control method, characterized in that: Applied to electronic equipment, the method comprises: Acquire an image displayed on a user interaction interface of the electronic device; Dividing the image to obtain a corresponding target image, the target image comprising a plurality of grids, and determining at least one target grid from the plurality of grids; Calculate the color proportion of each type of color in each target grid, and determine the color corresponding to the largest color proportion as the target color of the corresponding target grid; Based on the target color corresponding to each target grid, multiple light-emitting units in the lighting device are controlled to update the currently displayed color to the corresponding target color.

2. The lighting effect control method according to claim 1, characterized in that: After calculating the color proportion of each color type in each target grid, the method further includes: If there are at least two types of colors whose color proportions are the largest and the same, one color is randomly selected from the at least two types of colors and determined as the target color.

3. The lighting effect control method according to claim 1, characterized in that: The image is a red, green, and blue (RGB) image, and the method further includes: converting the RGB image into a preset image.

4. The lighting effect control method according to claim 3, characterized in that: The method further comprises: Establishing a pixel coordinate system corresponding to the preset image; Obtaining a pixel coordinate set of a target color corresponding to each target grid of the preset image; Determining the RGB value of the target color based on the pixel coordinate set; A plurality of light-emitting units in the lighting device are controlled to update the RGB value of the current color to the RGB value of the target color.

5. The lighting effect control method according to claim 4, characterized in that: The step of determining the RGB value of the target color based on the pixel coordinate set includes: Based on the pixel coordinate set, calculate the average value of the RGB three channels of the pixel corresponding to the target color; The average value of the RGB three channels is determined as the RGB value.

6. The lighting effect control method according to claim 1, characterized in that: The controlling the plurality of light-emitting units in the lighting device to update the currently displayed color to the corresponding target color based on the target color corresponding to each target grid includes: If it is determined from the multiple grids that the number of at least one target grid is equal to the number of the multiple light-emitting units, the multiple light-emitting units are controlled to dynamically display the target color of the corresponding target grid in the target image corresponding to the multiple frames of images.

7. The lighting effect control method according to claim 1, characterized in that: The controlling the plurality of light-emitting units in the lighting device to update the currently displayed color to the corresponding target color based on the target color corresponding to each target grid includes: If it is determined from the plurality of grids that the number of at least one target grid is greater than the number of the light-emitting units, each light-emitting unit is controlled to dynamically display the target grid of the target image corresponding to the plurality of frames of images according to a preset display order. Mark color.

8. The lighting effect control method according to claim 1, characterized in that: The controlling the plurality of light-emitting units in the lighting device to update the currently displayed color to the corresponding target color based on the target color corresponding to each target grid includes: If it is determined from the multiple grids that the number of at least one target grid is less than the number of the light-emitting units, the multiple light-emitting units are controlled to display the target color of the corresponding target grid in the target image corresponding to the multiple frames of images according to a preset display rule.

9. An electronic device, characterized in that: The electronic device comprises a processor and a memory, and the processor is used to execute a computer program stored in the memory to implement the lighting effect control method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by the processor, the lighting effect control method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Atmosphere lamp adjusting method and device based on picture, intelligent terminal and storage medium

    CN114040249A

  • Image data processing method and device, electronic equipment and storage medium

    CN114266838A

  • Lamp strip control method and device, display equipment, system and storage medium

    CN114340102A

  • Lamp effect control method and control terminal

    CN114677298A

  • Control method, control device, electronic equipment and computer readable storage medium

    CN116249237A