Atmosphere lamp control method and device and vehicle
Patent Information
- Application Number
- CN202610938008.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-08-28
AI Technical Summary
[0003]本发明提供了一种氛围灯控制方法、装置及车辆,以解决相关技术中的氛围灯在与车载中控显示端进行灯效联动展示时,存在灯效与中控画面显示内容不匹配的问题
[0019] The ambient lighting control method provided by this invention extracts theme colors based on scene type and attention heatmaps, enabling precise adaptation to the visual focus characteristics of different scenes: for example, focusing on the colors of the core plot area in a movie-watching scene, capturing the dynamic tones of key combat or interactive areas in a game scene, highlighting the colors of route guidance-related visual elements in a navigation scene, and locking the color scheme of core function buttons or information modules in a static interface scene. This precise adaptation not only makes the theme color extraction more in line with the core visual expression needs of the scene, but also enables the subsequent ambient lighting effect output to form a deeper level of synergy with the scene content, avoiding the color deviation or disconnection from the scene atmosphere that may occur under general extraction methods, further enhancing the effect of lighting on the scene experience and providing users with a more immersive atmosphere with a sense of scene.
Smart Images

Figure CN122661995A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of lighting control technology, specifically to ambient lighting control methods, devices, and vehicles. Background Technology
[0002] Ambient lights, as a core visual interaction component of smart devices, can achieve visualized interaction of device status through lighting. However, when ambient lights in related technologies are linked with display terminals for lighting effect display, there is a problem of mismatch between the lighting effects and the displayed content. Summary of the Invention
[0003] This invention provides an ambient lighting control method, device, and vehicle to solve the problem in related technologies where the ambient lighting effects are mismatched with the content displayed on the central control screen when the ambient lighting is linked with the vehicle's central control display.
[0004] In a first aspect, the present invention provides an ambient light control method, comprising: detecting the human eye attention area of an original image frame output by a display terminal to obtain an attention heatmap; extracting pixel features of the visual focus area of the original image frame based on the attention heatmap to obtain at least one theme color; generating an ambient light control command based on the position information of the visual focus area and the quantity information of the theme color; and controlling each ambient light area to output corresponding light effects according to the ambient light control command.
[0005] The ambient lighting control method provided by this invention extracts the theme color of the visual focus area based on a heatmap of attention, ensuring that the lighting effect color highly matches the core content of the screen that the user is focused on. At the same time, it generates instructions by combining the position of the focus area and the quantity of theme colors, so that the distribution of the ambient lighting effect corresponds to the spatial position of the visual focus of the screen, improving the accuracy and coordination of the lighting effect linkage. By dynamically adjusting the lighting effect according to the user's real-time visual focus, it enhances the interactive immersion between the display terminal and the ambient lighting, bringing users a more personalized and scene-appropriate visual experience.
[0006] In one optional implementation, the original image frames output by the display terminal are subjected to human eye attention region detection to obtain an attention heatmap, including: preprocessing the original image frames output by the display terminal to obtain a standardized image; extracting multi-scale features from the standardized image to obtain visual features and semantic features; fusing and reconstructing the visual features and semantic features to obtain a fused feature map with the same resolution as the standardized image; converting the fused feature map into a single-channel probability map, and generating an attention heatmap based on the single-channel probability map, wherein each pixel value in the single-channel probability map is used to characterize the probability that the corresponding pixel is noticed by the human eye.
[0007] The ambient lighting control method provided by this invention obtains standardized images through preprocessing of the original image frames, effectively reducing the impact of noise interference and size differences on subsequent detection, laying the foundation for accurate detection of human eye attention areas. Multi-scale feature extraction combined with the fusion reconstruction of visual and semantic features not only preserves detailed information such as the edges and textures of objects in the image, but also incorporates scene semantic understanding, enabling the generated fusion feature map to more comprehensively reflect the visual focus of the image. The attention heatmap generated based on the fusion feature map can accurately reflect the distribution of human eye attention in the image, providing a reliable basis for subsequently determining the visual focus area and extracting the theme color, thereby ensuring a high degree of matching between the ambient lighting effect and the user's visual focus, improving the accuracy and immersiveness of the lighting effect linkage; especially in dynamically changing in-vehicle scenarios, it can more quickly and accurately capture the core content that users are concerned about, achieving a smoother lighting effect response.
[0008] In one optional implementation, based on the attention heatmap, pixel features are extracted from the visual focus area of the original image frame to obtain at least one theme color, including: binarizing the attention heatmap based on a preset threshold to generate a human eye attention area mask; determining the corresponding visual focus area in the original image frame according to the human eye attention area mask; extracting pixel features from the visual focus area to obtain an effective pixel set; and performing color clustering on the effective pixel set based on the target cluster number to obtain at least one theme color.
[0009] The ambient lighting control method provided by this invention generates a mask of the area of interest through binarization processing with a preset threshold. This accurately filters out the core area that the human eye is actually focused on, effectively eliminating interference from irrelevant backgrounds or secondary elements in the image, and ensuring the accuracy of the visual focus area positioning. Based on the mask, the visual focus area is determined and the effective pixel set is extracted, which reduces the interference of pixels in non-interested areas on color analysis and improves the reliability of subsequent color clustering. Color clustering is completed by the number of target clusters, which can flexibly generate an appropriate number of theme colors according to the needs of actual application scenarios. This avoids the lighting effect being cluttered due to too many color types and also prevents the lack of layering caused by a single color. In the in-vehicle scenario, this process can quickly and accurately extract the theme color that matches the user's visual focus, making the ambient lighting effect more consistent with the core visual content of the current image, further improving the coordination of lighting effect linkage, enhancing the immersive experience of the user, especially when the image is dynamically changing, ensuring the real-time and accuracy of theme color extraction, and achieving seamless connection between lighting effects and visual focus.
[0010] In one optional implementation, an ambient light control command is generated based on the location information of the visual focus area and the quantity information of the theme color, including: matching the location information of the visual focus area with each ambient light zone of the display terminal to obtain a zone matching result; configuring the light color for the matched ambient light zone based on the quantity information of the theme color to obtain a light color configuration result; and generating an ambient light control command based on the zone matching result and the light color configuration result.
[0011] The ambient lighting control method provided by this invention precisely matches the position of the visual focus area with the ambient lighting zones, ensuring that the illuminated area of the ambient light highly corresponds to the core area of the user's visual attention, thus avoiding misalignment between the lighting effect and the focus position. The method configures theme colors as needed for the matched zones, allowing the lighting effects of different areas to echo the core colors of the corresponding positions on the screen, enhancing the spatial hierarchy and visual synergy of the lighting effects. Control commands are generated based on the matching and configuration results, ensuring the completeness and accuracy of the commands, further improving the intelligence level of ambient lighting control. This allows the lighting effects to not only match the colors of the screen but also adapt to the spatial distribution of the visual focus, providing users with a more immersive and harmonious experience.
[0012] In one optional implementation, the light color is configured for the matching ambient light zone based on the quantity information of the theme color to obtain the light color configuration result, including: if the quantity information indicates that the number of theme colors is 1, then the theme color is used to uniformly match the matching ambient light zone to obtain a first light color configuration result; if the quantity information indicates that the number of theme colors is greater than or equal to 2, then each ambient light zone is matched based on the pixel ratio of each theme color in the visual focus area to obtain a second light color configuration result; the first light color configuration result or the second light color configuration result is used as the light color configuration result.
[0013] The ambient lighting control method provided by this invention ensures consistent lighting style and avoids visual interference caused by multiple colors when the number of theme colors is 1, allowing the ambient lighting effect to form a highly unified sense of wholeness with the core color of the screen. When the number of theme colors is greater than or equal to 2, color matching is performed according to the pixel ratio of each theme color in the visual focus area, which can accurately restore the color level of the focus area of the screen, so that the light color of different ambient lighting zones matches the color weight of the corresponding screen area, further strengthening the deep linkage between lighting effect and screen content, improving the visual immersion and experience comfort when users watch or use, and effectively meeting the ambient lighting adaptation needs of different screen scenes.
[0014] In one optional implementation, based on the pixel percentage of each theme color in the visual focus area, color matching is performed for each ambient light zone to obtain a second light color configuration result, including: determining the theme color with the highest pixel percentage as the primary color, and determining the remaining theme colors as secondary colors in descending order of pixel percentage; assigning the primary color to the ambient light zone corresponding to the visual focus area to generate the primary color configuration result; assigning each secondary color to other adjacent ambient light zones in the sorting order to generate the secondary color configuration result; and obtaining the second light color configuration result based on the primary color configuration result and the secondary color configuration result.
[0015] The ambient lighting control method provided by this invention uses a layered allocation strategy of primary and secondary colors to accurately match the primary color with the highest proportion to the ambient lighting zone corresponding to the visual focus area. This ensures that the visual center of the lighting effect is highly consistent with the core content of the image, enhancing the user's perception of the focal point of the image. At the same time, secondary colors are sorted by pixel proportion and then allocated to adjacent zones. This preserves the rich layers of color in the image while avoiding visual clutter caused by disordered distribution of multiple colors. This allows the ambient lighting effect to present a natural and smooth color transition, further improving the matching degree between the lighting effect and the image content, and providing users with a more delicate and immersive visual experience during viewing or use.
[0016] In one optional implementation, controlling the output of corresponding lighting effects for each ambient light area according to the ambient light control command includes: obtaining the target color and gradient parameters of each ambient light area based on the ambient light control command; wherein the gradient parameters include at least one of inter-frame smoothing coefficient and interpolation frame number of the light strip; determining the light color transition path according to the current output color and target color of each ambient light area, the light color transition path including at least one of temporal gradient path and spatial gradient path; and driving the LED beads of each ambient light area to transition to the target color and output lighting effects frame by frame based on the light color transition path.
[0017] The ambient lighting control method provided by this invention effectively avoids abrupt changes in light color switching by using gradual parameters such as inter-frame smoothing coefficient and interpolation frame number within the light strip, as well as a dual transition path design in the temporal and spatial domains. This results in a smooth and natural visual effect, with the light effect changes appearing as natural as flowing water. The frame-by-frame driven control method ensures that the transition process is precise and controllable, guaranteeing accurate reproduction of the target color and enabling the light effect changes in different ambient lighting areas to form an organic linkage in the temporal and spatial dimensions. This further enhances the synergy between the lighting effect and the scene content, bringing users a more coherent and comfortable immersive experience.
[0018] In one optional implementation, pixel features are extracted from the visual focus area of the original frame based on the attention heatmap to obtain at least one theme color. The method further includes: obtaining the scene type of the original frame, where the scene type includes at least one of movie-watching scene, game scene, navigation scene, and static interface scene; and extracting pixel features from the visual focus area of the original frame based on the scene type and the attention heatmap to obtain at least one theme color.
[0019] The ambient lighting control method provided by this invention extracts theme colors based on scene type and attention heatmaps, enabling precise adaptation to the visual focus characteristics of different scenes: for example, focusing on the colors of the core plot area in a movie-watching scene, capturing the dynamic tones of key combat or interactive areas in a game scene, highlighting the colors of route guidance-related visual elements in a navigation scene, and locking the color scheme of core function buttons or information modules in a static interface scene. This precise adaptation not only makes the theme color extraction more in line with the core visual expression needs of the scene, but also enables the subsequent ambient lighting effect output to form a deeper level of synergy with the scene content, avoiding the color deviation or disconnection from the scene atmosphere that may occur under general extraction methods, further enhancing the effect of lighting on the scene experience and providing users with a more immersive atmosphere with a sense of scene.
[0020] In one optional implementation, an ambient light control command is generated based on the location information of the visual focus area and the quantity information of the theme color, including: acquiring motion information and emotional information of the visual focus area; and generating an ambient light control command based on the location information, motion information, emotional information, and the quantity information of the theme color.
[0021] The ambient lighting control method provided by this invention further optimizes the generation logic of ambient lighting control commands by incorporating motion and emotional information from the visual focus area. Motion information captures dynamic features such as the displacement and speed of the visual focus. For example, in a game scene, when the visual focus moves rapidly with the character's combat actions, the ambient lighting can synchronously respond to its trajectory and adjust the dynamic rhythm of the lighting effects. Emotional information extracts the emotional tone of the scene (such as warmth, tension, excitement, etc.) based on the color saturation and hue of the image content, making the color and brightness changes of the ambient lighting more closely match the emotional expression of the current scene. This fusion of multi-dimensional information makes the ambient lighting control commands more scene-adaptable and emotionally resonant, effectively enhancing the delicacy and immersiveness of the lighting effects, and further improving the user experience in different scenarios.
[0022] In a second aspect, the present invention provides an ambient lighting control device, comprising: The region detection module is used to detect the regions of human eye attention in the original image frames output by the display terminal and obtain a heat map of attention. The feature extraction module is used to extract pixel features from the visual focus area of the original image frame based on the attention heatmap to obtain at least one theme color; The instruction generation module is used to generate ambient light control instructions based on the location information of the visual focus area and the quantity information of the theme color. The lighting effect control module is used to control the output of corresponding lighting effects in each ambient light area according to the ambient light control instructions.
[0023] Thirdly, the present invention provides a vehicle comprising: a controller and an ambient light, the controller comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the ambient light control method of the first aspect or any corresponding embodiment thereof.
[0024] Fourthly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the ambient light control method of the first aspect or any corresponding embodiment described above.
[0025] Fifthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the ambient light control method of the first aspect or any corresponding embodiment thereof.
[0026] In a sixth aspect, the present invention provides a computer program product, including computer instructions for causing a computer to execute the ambient light control method of the first aspect or any corresponding embodiment described above. Attached Figure Description
[0027] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0028] Figure 1 This is a schematic flowchart of the first type of ambient light control method according to an embodiment of the present invention; Figure 2 This is a second flowchart illustrating the ambient lighting control method according to an embodiment of the present invention; Figure 3 This is a structural block diagram of an ambient lighting control device according to an embodiment of the present invention; Figure 4This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0030] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.
[0031] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0032] According to an embodiment of the present invention, an embodiment of an ambient light control method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0033] This embodiment provides an ambient light control method. Figure 1 This is a flowchart of an ambient lighting control method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps: Step S101: Detect the human eye attention area of the original image frame output by the display terminal to obtain an attention heatmap.
[0034] The display terminal can be an in-vehicle terminal, or a smart TV, computer monitor, VR / AR device, or other device with image output capabilities. These terminals can establish a data connection with the ambient lighting control system, transmitting real-time raw image frame data to the system, providing the basic input for subsequent attention heatmap generation and ambient lighting adjustment. The human eye attention area refers to a specific area within the image frame output by the display terminal where the user's visual attention is highly concentrated. This area typically has significant visual characteristics, such as high color saturation, intensity of dynamic changes, or semantic priority (e.g., the navigation guidance area of an in-vehicle terminal, the main subject or key scene area in content played on a smart TV, etc.).
[0035] In some optional implementations, when performing human eye attention region detection on the original image frames output by the display terminal to obtain an attention heatmap, the original image frames output by the display terminal can be preprocessed to obtain a standardized image; multi-scale feature extraction can be performed on the standardized image to obtain visual features and semantic features; the visual features and semantic features can be fused and reconstructed to obtain a fused feature map with the same resolution as the standardized image; the fused feature map can be converted into a single-channel probability map, and an attention heatmap can be generated based on the single-channel probability map, where each pixel value in the single-channel probability map is used to represent the probability that the corresponding pixel is noticed by the human eye.
[0036] Specifically, the original image frames can first undergo standardization preprocessing to obtain a standardized image. This preprocessing includes: adjusting the image resolution to a preset size (e.g., 224×224), converting the color space from RGB to BGR format, and normalizing pixel values (e.g., scaling pixel values to the [0,1] range) to eliminate the impact of brightness differences between images output from different devices on subsequent feature extraction. Then, multi-scale feature extraction is performed on the standardized image, simultaneously acquiring low-level visual features and high-level semantic features. For example, a pre-trained convolutional neural network can be used as the base model to complete multi-level feature extraction: shallow convolutional layers extract low-level visual features such as edges and textures, while deep convolutional layers extract high-level semantic features such as object contours, categories, and scene semantics, outputting a multi-scale feature set. Cross-level fusion and upsampling reconstruction are then performed on the multi-scale features, combined with skip connections to supplement shallow detail information, generating a fused feature map with the same resolution as the standardized image. The fused feature map is converted into a single-channel probability map through the terminal convolutional layer, and then normalized to the [0,1] interval by the Sigmoid activation function to obtain the attention heatmap; where each pixel value of the single-channel probability map represents the probability that the corresponding pixel is noticed by the human eye.
[0037] As an example, when the in-vehicle terminal displays a fused frame of the navigation interface and real-time road image, the original frame contains elements such as the blue navigation route, red congestion markers, trees on both sides of the road, and distant buildings. First, this frame is preprocessed: the resolution is adjusted to 224×224, the color space is converted to BGR format, and pixel values are normalized to the [0,1] range. Next, a pre-trained ResNet50 model is used to extract multi-scale features: shallow convolutional layers capture low-level visual features such as the edges of navigation icons and the straight lines of the road; deep convolutional layers identify semantic entities such as "navigation route" and "congestion markers," outputting feature sets containing different scales such as 1×1 and 2×2. Then, skip connections are used to fuse the shallow details with the deep semantics, and after upsampling and reconstruction, a fused feature map consistent with the normalized image resolution is obtained. Finally, after processing with a 1×1 convolutional layer and a sigmoid activation function, a single-channel probability map is generated: the pixel probability values in the navigation route area are concentrated between 0.85 and 0.95, the probability value of the red congestion marker area is about 0.8-0.9, while the probability value of trees on both sides of the road and distant buildings is below 0.3. This attention heatmap accurately reflects the user's visual focus on key navigation information in driving scenarios, providing a precise input basis for subsequent adjustment of ambient light color and brightness based on the areas of attention.
[0038] As another example, when an in-vehicle terminal displays a space battle scene from a science fiction movie, the original frame often includes visual elements such as highly dynamic laser beam trajectories, glowing spaceship engines, and shimmering interstellar backgrounds. First, the frame undergoes standardized preprocessing, adjusting the resolution to a preset size and completing color space conversion and pixel normalization. Then, through multi-scale feature extraction, the edge texture of the laser beam (low-level visual features) and the semantic information of the spaceship body and key special effects areas (high-level semantic features) are captured. After cross-level fusion and upsampling reconstruction, the generated attention heatmap marks the laser beam path and the glowing area of the spaceship engine as high-probability attention areas, while the low-brightness areas of the interstellar background are marked as low-probability attention areas.
[0039] As shown above, by preprocessing the original image frames to obtain standardized images, the impact of noise interference and size differences on subsequent detection is effectively reduced, laying the foundation for accurate detection of areas of human eye focus. Multi-scale feature extraction combined with the fusion and reconstruction of visual and semantic features not only preserves details such as the edges and textures of objects in the image, but also incorporates scene semantic understanding, enabling the generated fusion feature map to more comprehensively reflect the visual focus of the image. The attention heatmap generated based on the fusion feature map can accurately reflect the distribution of human eye focus in the image, providing a reliable basis for subsequently determining the visual focus area and extracting the theme color, thereby ensuring a high degree of matching between ambient lighting effects and user visual focus, improving the accuracy and immersiveness of lighting effect linkage; especially in dynamically changing in-vehicle scenarios, it can more quickly and accurately capture the core content that users are concerned about, achieving a smoother lighting effect response.
[0040] Step S102: Based on the attention heatmap, extract pixel features from the visual focus area of the original image frame to obtain at least one theme color.
[0041] The visual focus area refers to the set of consecutive pixels in the attention heatmap whose pixel probability value is higher than a preset threshold (e.g., 0.7). This area reflects the core visual focus of the user when viewing the current frame. The theme color refers to the set of key colors extracted from the visual focus area that can represent the core visual characteristics of that area, directly reflecting the main color tendency of the content that the user is paying attention to.
[0042] In some optional implementations, when extracting pixel features from the visual focus area of the original image frame based on the attention heatmap to obtain at least one theme color, the attention heatmap can be binarized based on a preset threshold to generate a human eye attention area mask; the corresponding visual focus area is determined in the original image frame based on the human eye attention area mask; pixel features are extracted from the visual focus area to obtain an effective pixel set; and color clustering is performed on the effective pixel set based on the target cluster number to obtain at least one theme color.
[0043] Specifically, a preset threshold (e.g., 0.7) can be set first. Pixels with a probability value greater than or equal to this threshold in the heatmap are marked as 1 (representing areas of human attention), and those less than the threshold are marked as 0 (representing areas of non-attention), thus generating a binary mask of areas of human attention. Next, this mask is matched pixel by pixel with the original image frame, and the pixels in the original image frame corresponding to the positions marked as 1 in the mask are extracted to form a set of valid pixels. Subsequently, a color clustering algorithm (such as K-means clustering) is used to process the set of valid pixels: first, the target number of clusters is set (which can be preset to 1-3 depending on the scene requirements), and then, using the RGB color value of the pixels as the feature dimension, the valid pixels are divided into multiple clusters through iterative calculation. The center color value of each cluster is the theme color corresponding to that cluster.
[0044] As an example, when the in-vehicle terminal displays a fused frame containing a blue navigation route and red congestion markers, a preset threshold of 0.7 is first set, and the attention heatmap is binarized: pixels in the navigation route (probability 0.85-0.95) and congestion marker (probability 0.8-0.9) regions are marked as 1, and other regions are marked as 0, resulting in a mask of the human eye's attention area. Next, this mask is matched with the original frame, and the pixels marked as 1 in the mask are extracted to form a valid pixel set, which includes the blue pixels of the navigation route and the red pixels of the congestion markers. Then, a K-means clustering algorithm is used, setting the target cluster number to 2, and clustering is performed using RGB color values as the feature dimension: the center of the first cluster is dark blue (RGB: 26, 115, 232), corresponding to the navigation route region; the center of the second cluster is red (RGB: 244, 67, 4), corresponding to the congestion marker region.
[0045] As another example, when the in-vehicle terminal displays a space battle scene from a science fiction movie, a binary mask is generated based on a heatmap of attention, with a preset threshold of 0.7. The effective pixel set corresponding to the laser beam path and the spacecraft engine's luminous area is then extracted. K-means clustering (with the number of clusters set to 1) is used to obtain a center color value of RGB(255,204,0) (representing the orange-yellow of the laser beam), meaning that the theme color in this scene is orange-yellow.
[0046] As mentioned above, by generating a mask for the area of interest through binarization processing with a preset threshold, the core area that the human eye is actually focused on can be accurately selected, effectively eliminating interference from irrelevant backgrounds or secondary elements in the image, and ensuring the accuracy of the visual focus area positioning. Determining the visual focus area based on the mask and extracting the effective pixel set can reduce the interference of non-focus area pixels on color analysis and improve the reliability of subsequent color clustering. Color clustering is completed by the number of target clusters, which can flexibly generate an appropriate number of theme colors according to the needs of actual application scenarios. This avoids the lighting effects being cluttered due to too many color types and also prevents the lack of layering caused by a single color. In the in-vehicle scenario, this process can quickly and accurately extract the theme color that matches the user's visual focus, making the ambient lighting effects more consistent with the core visual content of the current image, further improving the coordination of lighting effect linkage, enhancing the immersive experience of the user, especially when the image is dynamically changing, it can ensure the real-time and accuracy of theme color extraction and achieve seamless connection between lighting effects and visual focus.
[0047] Step S103: Generate ambient light control instructions based on the location information of the visual focus area and the quantity information of the theme color.
[0048] The location information of the visual focus area can include the coordinate range of the area where the visual focus is located in the image (such as the pixel coordinate range with the top left corner of the screen as the origin), the area type (such as the center area, left area, right area, top area, bottom area, etc.), and its size relative to the screen.
[0049] In some optional implementations, when generating ambient light control instructions based on the location information of the visual focus area and the quantity information of theme colors, the location information of the visual focus area can be matched with each ambient light zone of the display terminal to obtain a zone matching result; the light color can be configured for the matched ambient light zone based on the quantity information of theme colors to obtain a light color configuration result; and the ambient light control instructions can be generated based on the zone matching result and the light color configuration result.
[0050] Specifically, zoning rules can be pre-defined for the ambient lighting of the display terminal. If the display terminal is an in-vehicle terminal, the ambient lighting zones can be divided into zones on both sides of the central control screen, a zone for the driver's side door trim panel, a zone for the passenger side door trim panel, a zone around the instrument panel, and a zone for foot lighting. Each zone corresponds to a specific coordinate range on the screen (e.g., the zones on both sides of the central control screen correspond to 40%-60% of the screen's horizontal direction and 20%-80% of its vertical direction). When performing zone matching, the coordinate range of the visual focus area is compared with the screen mapping range of each ambient lighting zone. If the overlapping area of the focus area exceeds 50% of the mapping range of that zone, then that zone is determined as the matching target. If the quantity information indicates that the number of theme colors is 1, then the theme color is used to match the ambient lighting zone for unified color matching, resulting in the first light color configuration result. If the quantity information indicates that the number of theme colors is greater than or equal to 2, then based on the pixel proportion of each theme color in the visual focus area, color matching is performed for each ambient lighting zone, resulting in the second light color configuration result. The first light color configuration result or the second light color configuration result is used as the light color configuration result. When generating control commands, the commands may include the target zone identifier, the RGB value of the light color, the brightness parameter (brightness is positively correlated with the average attention probability of the focus area, for example, an average probability of 0.8 corresponds to 80% brightness) and the switching mode (such as gradual switching or instant switching).
[0051] As an example, when the in-vehicle terminal is in a navigation scenario, the visual focus areas are the navigation route (coordinate range: 35%-65% horizontally and 25%-75% vertically) and the congestion markers (coordinate range: 50%-60% horizontally and 30%-40% vertically). Comparing the coordinates of the focus areas with the mapping range of the ambient lighting zones reveals that the overlap between the two zones on the center console screen and the navigation route area reaches 65%, and the overlap between the driver's side door panel zone and the congestion marker area reaches 55%. Both zones are identified as matching targets. Since there are two theme colors, the red color corresponding to the congestion markers (RGB: 244, 67, 4) is the high-attention theme color and is assigned to the driver's side door panel zone; the blue color corresponding to the navigation route (RGB: 26, 115, 232) is the low-attention theme color and is assigned to the two zones on the center console screen. The average attention probability of the focus areas is 0.85, corresponding to a brightness setting of 85%, and the switching mode uses a gradual transition (duration 1.5 seconds). The final ambient lighting control command is as follows: target zone identifier [both sides of the central control screen, driver's side door trim panel], light color configuration [both sides of the central control screen: RGB(26,115,232), driver's side door trim panel: RGB(244,67,4)], brightness 85%, and transition mode gradient.
[0052] As another example, when the in-vehicle terminal plays a space battle scene from a science fiction movie, the visual focus area is the laser beam path and the area illuminated by the spaceship engine. The screen coordinates of this area correspond to the two side partitions of the central control screen and the partition around the instrument panel. Since the number of theme colors is 1, orange-yellow is assigned to these two matching partitions. The brightness parameter is set to 88% based on the average attention probability of the focus area (0.88), and the switching mode is selected as gradient to adapt to the dynamic changes of the movie scene. The final generated control commands are: "Partition ID: 001 (both sides of the central control screen), color: RGB(255,204,0), brightness: 88%, switching mode: gradient; Partition ID: 003 (peripheral area of the instrument panel), color: RGB(255,204,0), brightness: 88%, switching mode: gradient".
[0053] As shown above, when the number of theme colors is 1, a unified color scheme can ensure consistent lighting style, avoid visual interference caused by multiple colors mixing, and create a highly unified sense of wholeness between the ambient lighting effect and the core color of the screen. When the number of theme colors is greater than or equal to 2, color matching is performed according to the pixel ratio of each theme color in the visual focus area. This can accurately restore the color level of the focus area of the screen, match the light color of different ambient light zones with the color weight of the corresponding screen area, further strengthen the deep linkage between lighting effects and screen content, improve the visual immersion and experience comfort when users watch or use the screen, and effectively meet the ambient lighting adaptation needs of different screen scenarios.
[0054] Furthermore, if the display terminal is an in-vehicle terminal, when mapping the location information of the visual focus area to the ambient lighting zones in the cabin, a mapping relationship between the display terminal screen coordinate system and the cabin ambient lighting zone coordinate system can be pre-established. For example, the top, left, middle, and right areas of the screen can be corresponding to the top, left, middle, and right ambient lighting zones of the cabin, respectively. Zone matching can also be performed according to upper, middle, lower, front, and rear rows to obtain the zone matching results. If the number of theme colors is one, that theme color is uniformly configured to all matched ambient lighting zones, making the ambient lighting in the cabin present a consistent hue and enhancing overall visual harmony. If the number of theme colors is two, the two theme colors can be assigned to different zones according to the spatial distribution of the zones (such as left and right zones, front and rear rows) to form contrasting or complementary lighting effects. If the number of theme colors is three or more, the theme colors are assigned to zones with higher priority according to the area proportion or importance of the visual focus area. For example, the theme color corresponding to the visual focus area with the largest proportion is assigned to the core zone in the middle of the cabin, and the remaining theme colors are assigned to the surrounding auxiliary zones. In addition, it can also be combined with user-preset preference modes (such as cozy mode and sports mode) to adapt and adjust the brightness and gradient speed of the light color, ensuring that the ambient light effect is highly consistent with the user's current usage scenario.
[0055] As an example, when the in-vehicle terminal plays a family comedy movie, and the scene depicts a heartwarming birthday celebration, the visual focus area of the original frame is the pink candle flames dancing on the cake (screen coordinate range: horizontal 45%-55%, vertical 30%-40%) and the cluster of yellow balloons floating in the background (horizontal 20%-30%, vertical 10%-20%). After extracting the effective pixel set from the binarized mask generated based on the attention heatmap, K-means clustering (with a cluster size of 2) yields two theme colors: pink (RGB:255,182,193) corresponding to the candle flames, and yellow (RGB:255,215,0) corresponding to the balloon clusters. During partition matching, the overlap between a portion of the central control screen and the candle flame area reaches 70%, and the overlap between the passenger-side door trim panel partition and the balloon cluster area reaches 60%. Both are identified as matching targets. Since the user's preset preference is a warm and inviting mode, the theme color allocation prioritizes the highly attention-grabbing pink for the central control area and yellow for the passenger side trim panel. Brightness is set to 75% based on the average attention probability of the focus area (0.75), and the gradient transition time is adjusted to 2 seconds to match the warm atmosphere. The final generated control commands are: "Partition ID: 002 (Central Control Area), Color: RGB(255,182,193), Brightness: 75%, Transition Mode: Gradient; Partition ID: 004 (Passenger Side Door Trim Panel), Color: RGB(255,215,0), Brightness: 75%, Transition Mode: Gradient."
[0056] As another example, when the in-vehicle terminal is playing music, specifically high-energy electronic music, the visual focus area is a real-time dynamic spectrum visualization histogram on the screen, with coordinates ranging from 10%-90% horizontally and 60%-80% vertically. Different frequency bands of the histogram correspond to different levels of visual attention. K-means clustering (with a cluster size of 3) was used to extract the theme color, resulting in: purple (RGB:153,51,255) corresponding to the high-frequency band with the highest attention, green (RGB:0,255,0) corresponding to the mid-frequency band, and blue (RGB:0,0,255) corresponding to the low-frequency band. During zone matching, the overlap between the zones on both sides of the central control screen and the high-frequency band histogram area reached 75%, the overlap between the zone around the instrument panel and the mid-frequency band area reached 65%, and the overlap between the footwell lighting zone and the low-frequency band area reached 60%. All three zones were identified as matching targets. Three theme colors were extracted and assigned in descending order of attention: purple to the two sides of the central control screen, green to the area around the instrument panel, and blue to the foot lighting area. The average attention probability of the focus area was 0.9, corresponding to a brightness setting of 90%. The switching mode adopted an instant switching to match the rapid changes in the music rhythm. The final generated control commands were: "Partition ID: 001 (two sides of the central control screen), color: RGB(153,51,255), brightness: 90%, switching mode: instant; Partition ID: 003 (area around the instrument panel), color: RGB(0,255,0), brightness: 90%, switching mode: instant; Partition ID: 005 (foot lighting), color: RGB(0,0,255), brightness: 90%, switching mode: instant".
[0057] In some optional implementations, when color matching is performed on each ambient light zone based on the pixel ratio of each theme color in the visual focus area to obtain the second light color configuration result, the theme color with the highest pixel ratio can be determined as the primary color, and the remaining theme colors can be determined as secondary colors in descending order of pixel ratio; the primary color is assigned to the ambient light zone corresponding to the visual focus area to generate the primary color configuration result; each secondary color is assigned to other adjacent ambient light zones in the sorting order to generate the secondary color configuration result; the second light color configuration result is obtained based on the primary color configuration result and the secondary color configuration result.
[0058] As an example, when the in-vehicle terminal plays the nature documentary "Forest Secrets," the visual focus area of the current frame comprises three parts: a green forest covering 30%-70% horizontally and 20%-60% vertically (60% pixel percentage); a blue lake covering 70%-85% horizontally and 30%-50% vertically to the right of the green forest (25% pixel percentage); and yellow wildflowers covering 15%-30% horizontally and 40%-55% vertically to the left of the green forest (15% pixel percentage). Pixel percentage analysis identifies green (RGB:34,139,34) as the primary color, blue (RGB:0,191,255) as the first secondary color, and yellow (RGB:255,215,0) as the second secondary color. During partition matching, the green forest area corresponds to the central control area (80% overlap); the blue lake corresponds to the adjacent passenger-side door panel area (55% overlap); and the yellow wildflowers correspond to the adjacent driver-side door panel area (52% overlap). The primary color, green, is assigned to the central console area; the first secondary color, blue, is assigned to the passenger-side door trim panel area; and the second secondary color, yellow, is assigned to the driver-side door trim panel area. The average attention probability of the focus area is 0.82, the brightness is set to 82%, and the color transition uses a gradient mode with a gradient duration of 1.2 seconds. The final generated control commands are: "Partition ID: 002 (Central Console), Color: RGB(34,139,34), Brightness: 82%, Transition Mode: Gradient; Partition ID: 004 (Passenger-side Door Trim Panel), Color: RGB(0,191,255), Brightness: 82%, Transition Mode: Gradient; Partition ID: 005 (Driver-side Door Trim Panel), Color: RGB(255,215,0), Brightness: 82%, Transition Mode: Gradient."
[0059] As shown above, by employing a layered allocation strategy of primary and secondary colors, the primary color with the highest proportion is precisely matched to the ambient light zone corresponding to the visual focus area, ensuring that the visual center of the lighting effect is highly consistent with the core content of the image, thus enhancing the user's perception of the focal point of the image. At the same time, the secondary colors are sorted by pixel proportion and then distributed to adjacent zones, which not only preserves the rich layers of color in the image but also avoids the visual clutter caused by the disordered distribution of multiple colors, allowing the ambient light effect to present a natural and smooth color transition, further improving the matching degree between the lighting effect and the image content, and providing users with a more delicate and immersive visual experience during viewing or use.
[0060] The ambient lighting control method provided by this invention precisely matches the position of the visual focus area with the ambient lighting zones, ensuring that the illuminated area of the ambient light highly corresponds to the core area of the user's visual attention, thus avoiding misalignment between the lighting effect and the focus position. The method configures theme colors as needed for the matched zones, allowing the lighting effects of different areas to echo the core colors of the corresponding positions on the screen, enhancing the spatial hierarchy and visual synergy of the lighting effects. Control commands are generated based on the matching and configuration results, ensuring the completeness and accuracy of the commands, further improving the intelligence level of ambient lighting control. This allows the lighting effects to not only match the colors of the screen but also adapt to the spatial distribution of the visual focus, providing users with a more immersive and harmonious experience.
[0061] Step S104: Control each ambient light area to output the corresponding light effect according to the ambient light control command.
[0062] In some optional implementations, when controlling the output of corresponding light effects in each ambient light area according to the ambient light control command, the target color and gradient parameters of each ambient light area can be obtained based on the ambient light control command; wherein, the gradient parameters include at least one of the inter-frame smoothing coefficient and the number of interpolation frames in the light strip; the light color transition path is determined according to the current output color and the target color of each ambient light area, and the light color transition path includes at least one of the temporal gradient path and the spatial gradient path; based on the light color transition path, the LED beads of each ambient light area are driven frame by frame to transition to the target color and output light effects.
[0063] Specifically, the inter-frame smoothing coefficient and the number of interpolation frames within the light strip can be determined through a preset gradient parameter library: if the switching mode specified by the ambient light control command is gradient, the inter-frame smoothing coefficient is set to 0.12 by default (i.e., the color update amplitude of each frame is 12% of the target difference), and the number of interpolation frames within the light strip is dynamically adjusted according to the number of LED beads in the partition. For example, a partition with 20 LED beads is set to 4 frames, and a partition with 40 LED beads is set to 8 frames; if the switching mode is instantaneous, the inter-frame smoothing coefficient is set to 1.0, and the number of interpolation frames is set to 0. When determining the light color transition path, the temporal gradient path can be interpolated based on the HSV color space to avoid color deviation caused by direct interpolation in the RGB space. For example, transitioning from red (H:0°, S:100%, V:100%) to blue (H:240°, S:100%, V:100%), the H value is increased by 5° each frame until the target value is reached. The spatial gradient path can use linear interpolation or radial interpolation. For example, the LEDs in the surrounding areas of the dashboard can start the gradient sequentially in a clockwise direction with a delay of 0.03 seconds to create a flowing effect. When driving the LEDs, the color data of each frame is sent to the lighting controller of each area via the CAN bus or LIN bus. The controller adjusts the current of the red, green, and blue channels of the LEDs according to the PWM duty cycle to achieve accurate color output. For example, when the target color is RGB (255,182,193), the lighting controller sets the red channel PWM duty cycle to 100%, the green channel to 71%, and the blue channel to 76%, and updates the duty cycle frame by frame according to the gradient parameters to ensure a natural and smooth transition of the lighting effect.
[0064] As an example, when the in-vehicle terminal is in a navigation scenario and the current interface displays congested urban roads during morning rush hour, the detected visual focus area includes the red road segment marked "Congested" in the center of the screen (coordinate range: horizontal 40%-60%, vertical 50%-70%) and the green road segment marked "Unobstructed" on the right side of the screen (horizontal 65%-80%, vertical 45%-60%). With a cluster size of 2, K-means clustering is used to extract the theme color of the screen, where red (RGB:255,0,0) corresponds to the congested road segment, and green (RGB:0,255,0) corresponds to the unobstructed road segment. When performing ambient lighting zone matching, the overlap between the central control area and the red congested road segment is 78%, and the overlap between the passenger-side door panel area and the green unobstructed road segment is 68%. Both areas are identified as matching targets. In the user-preset navigation mode, the color switching mode is set to instantaneous to quickly reflect changes in traffic conditions; the ambient lighting brightness is set to 85% based on the average attention probability of the focus area of 0.85. The final generated control commands are: "Partition ID: 002 (Central Control Panel), Color: RGB(255,0,0), Brightness: 85%, Switching Mode: Instantaneous; Partition ID: 004 (Passenger Door Panel), Color: RGB(0,255,0), Brightness: 85%, Switching Mode: Instantaneous." When executing the control commands, the system sends color data to each partition controller via the CAN bus: After receiving the red RGB value, the central control panel controller sets the red channel PWM duty cycle to 100%, and the green and blue channels to 0%; the passenger side controller sets the green channel duty cycle to 100%, and the red and blue channels to 0%. Because the switching mode is instantaneous, the inter-frame smoothing coefficient is set to 1.0, and the interpolation frame count is 0, the LEDs instantly switch to the target color, allowing the driver to quickly perceive changes in road conditions through the ambient light color, improving driving safety.
[0065] As another example, when the in-vehicle terminal plays a live football match and the screen captures the moment a goal is scored, there are three visual focal points: the blue jersey of the goal scorer in the center of the screen (horizontal range 35%-65%, vertical range 25%-55%), the green pitch as the background (horizontal range 10%-90%, vertical range 60%-90%), and the red scoreboard in the upper right corner of the screen (horizontal range 80%-95%, vertical range 5%-15%). Using a K-means clustering algorithm (with 3 clusters), the theme colors of the screen are extracted: blue (RGB:0,0,255) corresponds to the jersey, green (RGB:0,255,0) corresponds to the pitch, and red (RGB:255,0,0) corresponds to the scoreboard. When matching ambient lighting zones, the overlap between the central control area and the jersey area is 72%, the overlap between the foot lighting zone and the pitch area is 68%, and the overlap between the upper dashboard area and the scoreboard area is 63%. The theme colors were then assigned according to their level of attention, from highest to lowest: blue for the central control area, green for the foot lighting zone, and red for the upper dashboard zone. The average attention probability of the extracted focus areas was 0.88, therefore the ambient light brightness was set to 88%; the switching mode was set to instant to match the exciting atmosphere of a goal. The final control commands were generated as follows: Zone ID: 002 (Central Control Area), Color: RGB(0,0,255), Brightness: 88%, Switching Mode: Instant; Zone ID: 005 (Foot Lighting), Color: RGB(0,255,0), Brightness: 88%, Switching Mode: Instant; Zone ID: 003 (Above Dashboard), Color: RGB(255,0,0), Brightness: 88%, Switching Mode: Instant. When executing the commands, the system sent control data via the LIN bus: the central control area controller set the blue channel PWM duty cycle to 100%, and the red and green channels to 0%; the foot lighting controller set the green channel duty cycle to 100%; and the upper dashboard controller set the red channel duty cycle to 100%. Because the switching mode is instantaneous, the LEDs will switch to the target state instantly, allowing passengers in the car to simultaneously experience the excitement of a goal.
[0066] In addition, to avoid abrupt color changes with video frames, the target color calculated in frame t can be denoted as Target_. t The actual output color of frame t is denoted as Output_ t , satisfying the relationship Output_ t =α×Outpu t_{t-1} +(1-α)×Target_ t α is a smoothing factor (e.g., 0.7). When the target color changes, it does not directly command all LEDs to switch, but instead calculates a gradient path from the current color to the target color for each LED, and completes the transition through linear interpolation within a few frames (e.g., 10 frames, about 0.2 seconds).
[0067] As mentioned above, by using gradual parameters such as inter-frame smoothing coefficient and interpolation frame number within the light strip, as well as the dual transition path design in the temporal and spatial domains, the abrupt changes in light color switching are effectively avoided, making the light effect change present a natural and smooth visual effect like flowing water. The frame-by-frame driven control method ensures that the transition process is precise and controllable, which not only ensures the accurate reproduction of the target color, but also allows the light effect changes of different ambient light areas to form an organic linkage in the temporal and spatial dimensions, further improving the synergy between the light effect and the scene content, and bringing users a more coherent and comfortable immersive experience.
[0068] The ambient lighting control method provided in this embodiment extracts the theme color of the visual focus area based on a heatmap of attention, ensuring that the lighting effect color highly matches the core content of the screen that the user is focused on. At the same time, it generates instructions by combining the location of the focus area and the quantity of theme colors, so that the distribution of the ambient lighting effect corresponds to the spatial position of the visual focus of the screen, improving the accuracy and coordination of the lighting effect linkage. By dynamically adjusting the lighting effect according to the user's real-time visual focus, it enhances the interactive immersion between the display terminal and the ambient lighting, bringing users a more personalized and scene-appropriate visual experience.
[0069] This embodiment provides an ambient light control method. Figure 2 This is a flowchart of an ambient lighting control method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps: Step S201: Human eye attention region detection is performed on the original image frames output by the display terminal to obtain an attention heatmap. For details, please refer to [link to details]. Figure 1 Step S101 of the illustrated embodiment will not be described again here.
[0070] Step S202: Based on the attention heatmap, extract pixel features from the visual focus area of the original image frame to obtain at least one theme color.
[0071] Specifically, step S202 includes: Step S2021: Obtain the scene type of the original image frame.
[0072] The scene types include at least one of the following: movie viewing scene, game scene, navigation scene, and static interface scene.
[0073] In some optional implementations, when obtaining the scene type of the original image frame, a preliminary determination can be made based on the type of application currently running on the vehicle terminal. For example, a video playback application is initially classified as a movie-watching scene, and a navigation application is initially classified as a navigation scene. Then, a secondary verification is performed by combining the dynamic characteristics and element identifiers of the original image frame. For example, game scenes often contain high-frequency flashing special effects animations or interactive character models, while static interface scenes are mainly composed of UI controls with fixed layouts (such as buttons and text boxes). In addition, the scene type can be corrected by associating with the user's real-time operation behavior (such as clicking the navigation command input box or adjusting the video playback progress) to ensure the accuracy of scene recognition.
[0074] As an example, when the in-vehicle terminal runs a navigation application, the current scene is initially determined to be a navigation scene. Then, the dynamic characteristics and element identifiers of the original screen frames are analyzed. It is found that there are UI controls such as fixed-layout road guidance arrows and distance display text boxes in the screen, and there are no high-frequency flashing effects or interactive character models. This verifies that the scene meets the characteristics of a navigation scene. Finally, the user's real-time operation behavior is correlated. If it is detected that the user has clicked on the navigation command input box and entered the destination within 1 minute, the current scene type is further corrected and confirmed to be a navigation scene.
[0075] As another example, when the in-vehicle terminal runs a racing game application, the current scene is initially determined to be a game scene. Then, the dynamic characteristics and element identifiers of the original screen frames are analyzed, and it is found that there are high-frequency flashing nitro acceleration effects, interactive 3D racing car models and dynamic lighting effects on the track, and UI controls without fixed layouts (such as text boxes and buttons). This verifies that the scene meets the characteristics of a game scene. Finally, the user's real-time operation behavior is correlated. If it is detected that the user clicks the acceleration button on the steering wheel continuously within 30 seconds and adjusts the game view, the current scene type is further corrected and confirmed to be a game scene.
[0076] Step S2022: Based on scene type and attention heatmap, extract pixel features from the visual focus area of the original image frame to obtain at least one theme color.
[0077] In some optional implementations, during the process of extracting pixel features from the visual focus areas of the original frame based on scene type and attention heatmap to obtain at least one theme color, a high attention area threshold for the attention heatmap can be set according to the scene type. For example, the threshold can be set to 60% for movie-watching scenes, 80% for game scenes, 70% for navigation scenes, and 75% for static interface scenes. Areas with heat values exceeding the corresponding thresholds are selected as visual focus areas. Pixels within these areas are subjected to RGB color space clustering analysis (e.g., using the K-means algorithm), and the top 2 to 3 colors in the clustering results are extracted as candidate theme colors. The candidate theme colors are then screened and optimized based on the scene type: for movie-watching scenes, the two colors with the highest matching degree with the overall atmosphere of the screen are retained to avoid oversaturated colors interfering with the viewing experience; for game scenes, the primary colors of focus elements (such as characters and special effects) are retained first to enhance the game's immersive experience; for navigation scenes, the colors of key elements such as road guidance and destination signs are selected to strengthen the visual association between ambient lighting and navigation information; and for static interface scenes, the primary colors of UI controls are extracted to maintain a consistent style between the interface and ambient lighting. For example, when the scene is a movie-watching scene and the focus area is the protagonist's clothing in the movie, two candidate colors, red and gold, are obtained through clustering. After filtering, gold, which is consistent with the warm tone of the scene, is retained as the theme color. When the scene is a navigation scene and the focus area is a green road directional arrow, green is directly extracted as the theme color to ensure that the ambient light color corresponds to the navigation information.
[0078] As an example, when the in-vehicle terminal displays a static interface for vehicle air conditioning settings, the current scene is initially determined to be a static interface scene. Subsequently, the dynamic characteristics and element identifiers of the original frame are analyzed to confirm the presence of fixed-layout UI controls such as a temperature adjustment slider and an "Auto Mode" button, without any dynamic effects or interactive character models. This confirms the scene's characteristics as a static interface scene. Finally, user behavior is considered in conjunction with real-time actions; if the user is detected dragging the temperature adjustment slider within 5 seconds, the scene type is further confirmed. Next, the attention heatmap threshold is set to 75%, and the area of the temperature adjustment slider with a heat value exceeding the threshold (horizontal range 20%-30%, vertical range 40%-60%) is selected as the visual focus area. K-means clustering is performed on the pixels in this area (target cluster number set to 1), extracting blue (RGB:0,128,255) as a candidate theme color. Combining the characteristics of the static interface scene, a blue color consistent with the UI control style is selected as the final theme color, ensuring that the ambient light color maintains consistency with the visual style of the static interface.
[0079] As another example, when the in-vehicle terminal runs a science fiction movie playback application, the current scene is initially determined to be a movie viewing scene. Subsequently, the dynamic characteristics and element identifiers of the original frame are analyzed, and it is found that there are slow flashing effects of the blue energy shield of the spaceship, the metallic outline of the spaceship, and UI controls without fixed layout (such as the playback control button being hidden), which further verifies that the scene matches the characteristics of a movie viewing scene. Finally, the user's real-time operation behavior is correlated. If it is detected that the user adjusts the video playback volume within 20 seconds, the current scene type is further corrected and confirmed to be a movie viewing scene. Next, the attention heatmap threshold was set to 60%, and the energy shield area with heat value exceeding the threshold (horizontal range 45%-65%, vertical range 30%-50%) was selected as the visual focus area. K-means clustering was performed on the pixels in this area (target cluster number set to 2) to extract two candidate theme colors: dark blue (RGB:0,0,128) and light blue (RGB:0,191,255). Combining the characteristics of the movie viewing scene, dark blue, which has a higher matching degree with the atmosphere of the science fiction movie universe, was selected as the final theme color, so that the ambient light presents a deep blue consistent with the energy shield on the screen, enhancing the immersive experience during the movie viewing.
[0080] As shown above, the theme color is extracted based on scene type and attention heatmap, which can achieve precise adaptation to the visual focus characteristics of different scenes: for example, the color of the core plot area in the movie-watching scene, the dynamic color tone of the key combat or interaction area in the game scene, the color of the visual elements related to route guidance in the navigation scene, and the color scheme of the core function button or information module in the static interface scene. This precise adaptation not only makes the theme color extraction more in line with the core visual expression needs of the scene, but also enables the subsequent ambient light effect output to form a deeper level of synergy with the scene content, avoiding the color deviation or disconnection from the scene atmosphere that may occur under the general extraction method, further enhancing the effect of light effects on the scene experience and providing users with a more immersive atmosphere with a sense of scene.
[0081] Step S203: Generate ambient light control instructions based on the location information of the visual focus area and the quantity information of the theme color.
[0082] Specifically, step S203 includes: Step S2031: Obtain motion and emotion information of the visual focus area.
[0083] Motion information can include the frequency of dynamic changes, displacement trajectory, and flashing cycle of elements within the visual focus area. Emotional information can include the color emotional tendency corresponding to the visual focus area (such as dark blue representing a sense of technology and tranquility, and light blue representing a sense of lightness and futurism) and the emotional atmosphere associated with the scene (such as the immersive and relaxing feeling in a movie-watching scene).
[0084] In some optional implementations, when acquiring motion and emotional information of the visual focus area, motion information can be extracted through inter-frame analysis of multiple consecutive frames: performing inter-frame difference operations on the visual focus area in 5-10 consecutive original frames, and statistically analyzing the proportion and frequency of pixel changes, yields the dynamic change frequency; using optical flow to track the pixel displacement of key elements (such as game characters and navigation arrows) within the focus area, fitting the displacement trajectory and movement speed; for flickering elements, calculating the flickering period by analyzing the periodic changes in brightness values in consecutive frames. For emotional information, a pre-built color emotion mapping library can be used to match the RGB values of the theme color with corresponding emotional tendencies (e.g., red associated with enthusiasm, green with safety, and purple with technology); this is then combined with the emotional tags of the scene type (e.g., game scenes correspond to excitement, navigation scenes to focus), and user historical behavior data (e.g., increasing the weight of blue-toned technology when users prefer science fiction content) to comprehensively determine the emotional atmosphere associated with the scene. For example, when the visual focus area is the purple nitro boost effect in the game scene, the dynamic change frequency is obtained as 4 times per second through inter-frame difference, and the effect moves along the direction of the car's movement by optical flow tracing at a speed of 150 pixels per second with a flashing period of 0.3 seconds. The color mapping library is used to match purple to "passion + technology", and combined with the "immersive excitement" tag of the game scene, the emotional information is finally determined to be "high dynamic passion technology atmosphere".
[0085] As an example, when the in-vehicle terminal is in a navigation scenario and the visual focus area is a green road guide arrow, motion information is first extracted: inter-frame difference calculation is performed on the focus area of 8 consecutive original frames, and the pixel change rate is found to be 12%, with a dynamic change frequency of 1 time per second (because the arrow slowly adjusts its direction as the road turns); the displacement trajectory of the arrow is tracked using optical flow, and it is found that it moves at a constant speed along the road extension direction, with a speed of 20 pixels / second; since the arrow has no flickering effect, the flickering period is recorded as 0. Next, emotional information is extracted: from the pre-built color emotion mapping library, the emotional tendency corresponding to green is "safety, guidance, and calmness"; combined with the "focus and reliability" emotional tags of the navigation scenario, and further querying the user's historical behavior data, it is found that the user often chooses a green-themed navigation interface, preferring a safe and stable visual experience. Therefore, the emotional atmosphere associated with the scene is determined to be "low-dynamic safety guidance atmosphere".
[0086] As another example, when the in-vehicle terminal is in a game scene and the visual focus area is the red brake taillights of a race car, motion information is first extracted: inter-frame difference calculation is performed on the focus area of 6 consecutive original frames, and the pixel change ratio is found to be 25%, with a dynamic change frequency of 3 times per second (due to the taillights flashing frequently as the race car brakes); the displacement trajectory of the taillights is tracked using optical flow, and it is found that they move in an arc as the race car turns, at a speed of 180 pixels per second; by analyzing the periodic changes in brightness values in consecutive frames, the flashing period is calculated to be 0.2 seconds. Next, emotional information is extracted: from the pre-built color emotion mapping library, the emotional tendency corresponding to red is "passion, warning, and vitality"; combined with the "competitive excitement" emotional tag of the game scene, and further querying the user's historical behavior data, it is found that the user prefers high-dynamic game visual effects and often turns on the ambient light synchronization function, so the emotional atmosphere associated with the scene is determined to be "high-dynamic passionate competitive atmosphere".
[0087] Step S2032: Generate ambient light control instructions based on location information, motion information, emotional information, and the quantity information of theme colors.
[0088] In some optional implementations, when generating ambient lighting control commands based on location information, motion information, emotional information, and the number of theme colors, the allocation priority of theme colors can be determined according to the matching relationship between the number of theme colors and the number of ambient lighting zones in the vehicle: if the number of theme colors equals the number of zones, they are allocated to the corresponding physical location zones in descending order of visual focus area attention; if the number of theme colors is less than the number of zones, the theme color with the highest attention is selected to cover multiple associated zones; if the number of theme colors is greater than the number of zones, the top N theme colors with the highest emotional matching degree with the scene are retained (N is the number of zones). Secondly, combining the location information of the visual focus area, the theme color is mapped to the ambient lighting zone with the closest physical location: for example, the central focus area of the screen corresponds to the central control area, the lower focus area of the screen corresponds to the foot lighting zone, and the upper right focus area of the screen corresponds to the upper section of the instrument panel. Next, control parameters are adjusted based on motion information: if the dynamic change frequency is higher than 3 times / second, the switching mode is set to instant; if a flashing cycle exists, the flashing frequency of the ambient light is kept consistent with the flashing cycle of the focal area; if the displacement trajectory is linear, the lights in the corresponding zone are controlled to gradually transition along the displacement direction. Then, brightness and color saturation are optimized based on emotional information: when the emotional tendency is "excitement" or "passion," the brightness is set to 80%-95%, and the color saturation is increased by 10%-15%; when the emotional tendency is "tranquility" or "focus," the brightness is set to 40%-60%, and the color saturation is reduced by 5%-10%. Finally, all parameters are integrated to generate structured control instructions, including zone ID, RGB color values, brightness percentage, switching mode, and special effect parameters (such as flashing frequency and gradient direction), and sent to each zone controller for execution via LIN bus or CAN bus. For example, when the scene is a game scene, the theme colors are purple (RGB:128,0,128) and red (RGB:255,0,0), the number of partitions is 2 (central control ID:002, upper dashboard ID:003), the focus area corresponds to the central control area, the motion information is a dynamic change frequency of 4 times / second and a flashing period of 0.3 seconds, and the emotional information is "high dynamic passionate technology atmosphere," the generated control commands are: Partition ID:002, color: RGB(128,0,128), brightness: 90%, switching mode: instant, flashing frequency: 0.3 seconds; Partition ID:003, color: RGB(255,0,0), brightness: 85%, switching mode: instant. During execution, the central control controller sets the purple channel PWM duty cycle to 100%, the red and green channel PWM duty cycles to 0%, and flashes at a 0.3-second cycle; the upper dashboard controller sets the red channel PWM duty cycle to 100%, achieving a high level of immersion matching with the game scene.
[0089] As an example, when the in-vehicle terminal is in a navigation scenario and the visual focus area is a green road guide arrow, the theme color is green (RGB:0,255,0), and the number of ambient lighting zones is 3 (center console ID:002, footwell lighting ID:004, and above the instrument panel ID:003). First, the theme color allocation priority is determined: since the number of theme colors (1) is less than the number of zones (3), the most attention-grabbing green is selected to cover the center console and footwell lighting zones (closer to the visual focus position of the navigation guide). Next, physical locations are mapped: the green theme color corresponds to the center console ID:002 and footwell lighting ID:004 zones. Then, parameters are adjusted based on motion information: the dynamic change frequency is 1 time / second (less than 3 times / second), the switching mode is set to delayed; the displacement trajectory extends linearly along the road, and the light is controlled to gradually transition along this direction; there is no flicker cycle, and the flicker frequency is not set for special effects parameters. Finally, brightness and saturation are optimized based on emotional information: the emotional atmosphere is "low dynamic safety guidance," the brightness is set to 50%, and the color saturation is reduced by 8%. The final generated control commands are as follows: Partition ID: 002, Color: RGB(0,255,0), Brightness: 50%, Switching Mode: Delay, Gradient Direction: Road Extension Direction; Partition ID: 004, Color: RGB(0,255,0), Brightness: 45%, Switching Mode: Delay, Gradient Direction: Road Extension Direction; Partition ID: 003, Color: RGB(0,180,0) (a green variant with reduced saturation), Brightness: 40%, Switching Mode: Delay. During execution, the green lights in the central control area and footwell lighting zones gradually fade along the road direction, while the instrument panel zones maintain a low-saturation green, creating an overall safe and focused navigation atmosphere that highly matches the user's preferred stable visual experience.
[0090] As another example, when the in-vehicle terminal is in a music playback scenario and the visual focus area is the lyrics scroll bar and the blue rhythmic wave, motion information is first extracted: inter-frame difference calculation is performed on the focus area of 7 consecutive original frames, and the pixel change ratio is found to be 18%, with a dynamic change frequency of 2 times per second (due to the periodic fluctuation of the rhythmic wave with the music beat); the displacement trajectory of the lyrics scroll bar is tracked using optical flow, and it is found that it moves upward at a constant speed in the vertical direction, with a speed of 15 pixels / second; by analyzing the brightness value changes of the rhythmic wave in consecutive frames, the flicker period is calculated to be 0.4 seconds. Next, emotional information is extracted: from the pre-built color emotion mapping library, the emotional tendency corresponding to blue is "soothing, pleasant, immersive"; combined with the "relaxing, enjoyment" emotional tag of the music playback scenario, and further querying the user's historical behavior data, it is found that the user prefers a blue music atmosphere and often turns on the ambient light synchronization function with the music rhythm, so the emotional atmosphere associated with the scene is determined to be "medium dynamic soothing and immersive atmosphere". Then, ambient lighting control instructions are generated: the theme color is blue (RGB:0,0,255), and the number of interior ambient lighting zones is 3 (center console ID:002, left door ID:005, right door ID:006). First, the theme color allocation priority is determined: since the number of theme colors (1) is less than the number of zones (3), the most attention-grabbing blue is selected to cover the center console and the associated zones on both doors; next, physical positions are mapped: the blue theme color corresponds to the center console ID:002, left door ID:005, and right door ID:006 zones; then, parameters are adjusted based on motion information: the dynamic change frequency is 2 times / second (less than 3 times / second), and the switching mode is set to delayed; there is a 0.4-second flashing period, so the ambient lighting flashing frequency is kept consistent with this; the lyrics scroll bar's displacement trajectory is vertically upward, controlling the corresponding zone lights to gradually transition vertically; finally, brightness and saturation are optimized based on emotional information: emotional... The atmosphere is set to "Medium Dynamic, Soothing, and Immersive," with brightness set to 65% and color saturation increased by 5%. Finally, the parameters are integrated to generate control commands: Partition ID: 002, Color: RGB(0,0,255), Brightness: 65%, Switching Mode: Delay, Flashing Frequency: 0.4 seconds, Gradient Direction: Vertical Upward; Partition ID: 005, Color: RGB(0,0,255), Brightness: 60%, Switching Mode: Delay, Flashing Frequency: 0.4 seconds, Gradient Direction: Vertical Upward; Partition ID: 006, Color: RGB(0,0,255), Brightness: 60%, Switching Mode: Delay, Flashing Frequency: 0.4 seconds, Gradient Direction: Vertical Upward. When executed, the blue lights in the center console and on both side doors flash in 0.4-second intervals in sync with the music rhythm, while slowly grading vertically, echoing the scrolling lyrics. This creates a soothing and immersive musical atmosphere, catering to the user's personalized preferences.
[0091] As mentioned above, the generation logic of ambient light control commands is further optimized by leveraging motion and emotional information from the visual focus area: motion information captures dynamic features such as the displacement and speed of the visual focus. For example, in a game scene, when the visual focus moves rapidly with the character's combat actions, the ambient light can synchronously respond to its trajectory and adjust the dynamic rhythm of the lighting effects. Emotional information extracts the emotional tone of the scene (such as warmth, tension, excitement, etc.) based on the color saturation and hue of the screen content, making the color and brightness changes of the ambient light more in line with the emotional expression of the current scene. This fusion of multi-dimensional information makes the ambient light control commands more scene-adaptable and emotionally resonant, effectively enhancing the delicacy and immersion of the lighting effects output, and further improving the user experience in different scenarios.
[0092] Step S204: Control the output of corresponding lighting effects in each ambient light area according to the ambient light control instructions. For details, please refer to [link / reference]. Figure 1 Step S104 of the illustrated embodiment will not be described again here.
[0093] The ambient lighting control method provided in this embodiment achieves semantic mapping from "visual focus / theme of the image" to "lighting atmosphere" through human eye attention area detection, making the lighting truly part of the narrative experience and significantly enhancing the immersive cabin experience. By focusing on visually significant areas, it effectively eliminates irrelevant color interference caused by complex backgrounds, subtitles, UI control edges, video noise, etc., resulting in a purer and more representative theme color, avoiding misleading the lighting color by non-critical elements. The lighting color no longer frequently changes with irrelevant background colors in the image, but smoothly changes with the story's protagonist, key objects, or emotional tone, resulting in a more stable overall lighting effect that better meets the psychological expectations of the viewer, greatly enhancing the harmony of the driving experience. Based on a layered color matching strategy of theme color quantity and light group distribution, as well as a dual smooth transition mechanism in the temporal and spatial domains, it avoids abrupt changes and flickering of lighting colors, making lighting transitions softer and more natural.
[0094] This embodiment also provides an ambient light control device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, hardware implementations, or a combination of software and hardware, are also possible and contemplated.
[0095] This embodiment provides an ambient lighting control device, such as... Figure 3 As shown, it includes: The region detection module 301 is used to detect the human eye attention region of the original image frame output by the display terminal and obtain the attention heat map. The feature extraction module 302 is used to extract pixel features from the visual focus area of the original image frame based on the attention heatmap to obtain at least one theme color; The instruction generation module 303 is used to generate ambient light control instructions based on the location information of the visual focus area and the quantity information of the theme color. The light effect control module 304 is used to control the output of corresponding light effects in each ambient light area according to the ambient light control instructions.
[0096] In some alternative implementations, the region detection module 301 includes: The image processing unit is used to preprocess the original image frames output by the display terminal to obtain a standardized image; The feature extraction unit is used to perform multi-scale feature extraction on the standardized image to obtain visual and semantic features. The fusion reconstruction unit is used to fuse and reconstruct visual features and semantic features to obtain a fused feature map with the same resolution as the standardized image. The heatmap generation unit is used to convert the fused feature map into a single-channel probability map, and generate an attention heatmap based on the single-channel probability map. The pixel values in the single-channel probability map are used to represent the probability that the corresponding pixel is noticed by the human eye.
[0097] In some alternative implementations, the feature extraction module 302 includes: The mask generation unit is used to perform binarization processing on the attention heatmap based on a preset threshold to generate a mask of the area of human eye attention. The focus determination unit is used to determine the corresponding visual focus area in the original image frame based on the human eye attention area mask; The pixel extraction unit is used to extract pixel features from the visual focus area to obtain an effective pixel set. A color clustering unit is used to perform color clustering on the effective pixel set based on the target cluster number to obtain at least one theme color.
[0098] In some alternative implementations, the instruction generation module 303 includes: The partition matching unit is used to match the position information of the visual focus area with the ambient light partitions of the display terminal to obtain the partition matching result; The lighting color configuration unit is used to configure the lighting colors for the matching ambient light zones based on the quantity information of the theme colors, and obtain the lighting color configuration results; The instruction generation unit is used to generate ambient light control instructions based on the partition matching results and the light color configuration results.
[0099] In some optional implementations, the light color configuration unit includes: The first configuration subunit is used to uniformly match the ambient light partition with the matching theme color if the quantity information represents the number of theme colors as 1, and obtain the first light color configuration result. The second configuration subunit is used to match the colors of each ambient light zone based on the pixel ratio of each theme color in the visual focus area if the quantity information represents the number of theme colors greater than or equal to 2, so as to obtain the second light color configuration result. The result determination subunit is used to take the first light color configuration result or the second light color configuration result as the light color configuration result.
[0100] In some optional implementations, the second configuration subunit is specifically used to determine the theme color with the highest pixel ratio as the primary color, and the remaining theme colors as secondary colors in descending order of pixel ratio; to assign the primary color to the ambient light partition corresponding to the visual focus area, generating a primary color configuration result; to assign each secondary color to other adjacent ambient light partitions in the sorting order, generating a secondary color configuration result; and to obtain a second light color configuration result based on the primary color configuration result and the secondary color configuration result.
[0101] In some alternative implementations, the light effect control module 304 includes: The parameter acquisition unit is used to acquire the target color and gradient parameters of each ambient light area based on the ambient light control command; wherein, the gradient parameters include at least one of the inter-frame smoothing coefficient and the number of interpolation frames within the light strip; The path determination unit is used to determine the light color transition path based on the current output color and target color of each ambient light area. The light color transition path includes at least one of the time domain gradient path and the spatial domain gradient path. The output light effect unit is used to drive the LED beads of each ambient light area to transition to the target color and output light effect frame by frame based on the light color transition path.
[0102] In some optional implementations, the feature extraction module further includes: The scene type acquisition unit is used to acquire the scene type of the original frame. The scene type includes at least one of the following: movie viewing scene, game scene, navigation scene, and static interface scene. The pixel feature extraction unit is used to extract pixel features from the visual focus area of the original image frame based on scene type and attention heatmap to obtain at least one theme color.
[0103] In some optional implementations, the instruction generation module 303 further includes: The area information acquisition unit is used to acquire motion and emotional information of the visual focus area; The control command generation unit is used to generate ambient light control commands based on location information, motion information, emotional information, and the quantity of theme colors.
[0104] The ambient lighting control device provided in this embodiment of the invention can execute the ambient lighting control method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method. Further functional descriptions of the various modules and units described above are the same as in the corresponding embodiments described above, and will not be repeated here.
[0105] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.
[0106] The following is a detailed reference. Figure 4 This diagram illustrates a structural schematic suitable for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 401, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 402 or a program loaded from memory 408 into random access memory (RAM) 403. The RAM 403 also stores various programs and data required for the operation of the electronic device. The processor 401, ROM 402, and RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0107] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.
[0108] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 409, or installed from a memory 408, or installed from a ROM 402. When the computer program is executed by the processor 401, it performs the functions defined in the ambient lighting control method of the embodiments of the present invention.
[0109] Figure 4The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0110] This invention also provides a vehicle, which includes a controller and an ambient light. The controller includes a memory and a processor, which are communicatively connected. The memory stores computer instructions, and the processor executes the computer instructions to perform the ambient light control method shown in the above embodiments.
[0111] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the ambient light control method shown in the above embodiments is implemented.
[0112] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0113] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. An ambient lighting control method, characterized in that, The method includes: The human eye attention area is detected in the original image frames output by the display terminal to obtain an attention heatmap; Based on the attention heatmap, pixel features are extracted from the visual focus area of the original image frame to obtain at least one theme color; Based on the location information of the visual focus area and the quantity information of the theme color, an ambient light control command is generated. The ambient light control commands control each ambient light area to output corresponding lighting effects.
2. The method according to claim 1, characterized in that, The step of detecting the human eye's attention region in the original image frames output by the display terminal to obtain an attention heatmap includes: The original image frames output by the display terminal are preprocessed to obtain a standardized image; Multi-scale feature extraction is performed on the standardized image to obtain visual and semantic features; The visual features and the semantic features are fused and reconstructed to obtain a fused feature map with the same resolution as the standardized image. The fused feature map is converted into a single-channel probability map, and the attention heatmap is generated based on the single-channel probability map. Each pixel value in the single-channel probability map is used to represent the probability that the corresponding pixel is noticed by the human eye.
3. The method according to claim 1, characterized in that, Based on the attention heatmap, pixel features are extracted from the visual focus area of the original image frame to obtain at least one theme color, including: The attention heatmap is binarized based on a preset threshold to generate a mask for the human eye's attention region. Based on the human eye attention area mask, the corresponding visual focus area is determined in the original image frame; Pixel features are extracted from the visual focus region to obtain an effective pixel set; Based on the target cluster number, the effective pixel set is clustered by color to obtain at least one theme color.
4. The method according to claim 1, characterized in that, The generation of ambient light control instructions based on the location information of the visual focus area and the quantity information of the theme color includes: The location information of the visual focus area is matched with the ambient light zones of the display terminal to obtain the zone matching result; Based on the quantity information of the theme color, the light color is configured for the matched ambient light zone to obtain the light color configuration result; Based on the partition matching results and the light color configuration results, the ambient light control command is generated.
5. The method according to claim 4, characterized in that, Based on the quantity information of the theme color, the light colors are configured for the matching ambient light zones to obtain the light color configuration results, including: If the quantity information indicates that the number of the theme color is 1, then the ambient light zone matching the theme color is used for unified color matching to obtain the first light color configuration result; If the quantity information indicates that the number of theme colors is greater than or equal to 2, then based on the pixel ratio of each theme color in the visual focus area, color matching is performed for each of the ambient light zones to obtain the second light color configuration result. The first light color configuration result or the second light color configuration result shall be used as the light color configuration result.
6. The method according to claim 5, characterized in that, The step of configuring the second light color based on the pixel percentage of each theme color in the visual focus area, and then matching the colors of each ambient light zone to obtain the second light color configuration result, includes: The theme color with the highest pixel percentage is determined as the primary color, and the remaining theme colors are determined as secondary colors in descending order of pixel percentage. The main color is assigned to the ambient light zone corresponding to the visual focus area to generate the main color configuration result; The secondary colors are assigned to other adjacent ambient light zones in the order of sorting to generate the secondary color configuration results; Based on the primary color configuration result and the secondary color configuration result, the second light color configuration result is obtained.
7. The method according to claim 1, characterized in that, The step of controlling the output of corresponding lighting effects in each ambient light area according to the ambient light control command includes: Based on the ambient light control command, the target color and gradient parameters of each ambient light area are obtained; wherein, the gradient parameters include at least one of the inter-frame smoothing coefficient and the number of interpolation frames within the light strip; Based on the current output color of each ambient light area and the target color, a light color transition path is determined, and the light color transition path includes at least one of a temporal gradient path and a spatial gradient path. Based on the light color transition path, the LED beads in each ambient light area are driven frame by frame to transition to the target color and output light effects.
8. The method according to claim 1, characterized in that, The step of extracting pixel features from the visual focus area of the original image frame based on the attention heatmap to obtain at least one theme color also includes: Obtain the scene type of the original frame, wherein the scene type includes at least one of the following: movie viewing scene, game scene, navigation scene, and static interface scene; Based on the scene type and the attention heatmap, pixel features are extracted from the visual focus area of the original image frame to obtain at least one theme color.
9. The method according to claim 8, characterized in that, The generation of ambient light control instructions based on the location information of the visual focus area and the quantity information of the theme color includes: Obtain motion and emotional information of the visual focus area; Based on the location information, motion information, emotional information, and the quantity information of the theme color, an ambient light control command is generated.
10. An ambient lighting control device, characterized in that, The device includes: The region detection module is used to detect the regions of human eye attention in the original image frames output by the display terminal and obtain a heat map of attention. The feature extraction module is used to extract pixel features from the visual focus area of the original image frame based on the attention heatmap to obtain at least one theme color; The instruction generation module is used to generate ambient light control instructions based on the location information of the visual focus area and the quantity information of the theme color; The light effect control module is used to control the output of corresponding light effects in each ambient light area according to the ambient light control command.
11. A vehicle, characterized in that, The vehicles include: A controller and ambient light, the controller comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, the processor executing the computer instructions to perform the method of any one of claims 1 to 9.