Method, device, vehicle and program product for controlling cabin of vehicle

By identifying the difference in color distribution in the video stream in the vehicle cockpit and adjusting the ambient light mode, the problem of poor linkage between the cockpit and film and television or games in the prior art is solved, and a better user interaction experience is achieved.

CN120382848APending Publication Date: 2025-07-29MOBILITY ASIA SMART TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410116005.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-26
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

The prior art lacks accurate identification of events or scene changes in film and television or games, resulting in poor linkage between vehicle cockpit and user entertainment behavior.

Method used

By extracting the first and second images from the video stream, identifying their color distribution differences, and adjusting the ambient light mode in the vehicle cockpit, the interaction between the video and the cockpit is realized.

Benefits of technology

Accurately identify events or scene changes in the video, improve the interaction between the cockpit and the video content, and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120382848A_ABST
    Figure CN120382848A_ABST
Patent Text Reader

Abstract

A method for controlling a cabin of a vehicle. The method includes extracting a first picture and a second picture from a video stream. The method further includes adjusting a mode of an ambience lamp within a cabin of the vehicle in response to a difference between the first color distribution of the first picture and the second color distribution of the second picture. Through the method implemented by the invention, the event in the video can be accurately identified, and interaction between the video and the cabin can be realized on the basis, so that the user experience can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of vehicle technologies, and more particularly, to methods, devices, vehicles, and program products for controlling a vehicle cockpit. Background Art

[0002] With the development of technologies such as artificial intelligence, human-machine interaction, and multimedia, the concept of intelligent cockpits has gradually emerged. An intelligent cockpit refers to a cockpit equipped with intelligent and networked in-vehicle products and thus having intelligent interaction functions. The intelligent cockpit can integrate functions such as in-vehicle entertainment, in-vehicle intelligent control, and in-vehicle environment control into one system, and can realize the intelligence, automation, and convenience of various functions in the vehicle through interaction interfaces and voice interactions.

[0003] With the development of intelligent cockpits, in-vehicle entertainment functions emerge in an endless stream. In the cockpits of some vehicles, videos can be played and games can be played. The gaming and entertainment experience of users in the cockpit has begun to become an important evaluation index for intelligent cockpits. How to achieve the linkage between devices such as displays, speakers, ambient lights, and aromas in the vehicle cockpit and the entertainment behaviors of users such as movies and games in the cockpit, and provide users with a more immersive entertainment experience, has become an increasingly concerned issue. Summary of the Invention

[0004] According to example embodiments of the present disclosure, there are provided methods, devices, vehicles, and computer program products for controlling a vehicle cockpit.

[0005] In a first aspect of the present disclosure, there is provided a method for controlling a vehicle cockpit. The method includes extracting a first picture and a second picture from a video stream. The method further includes adjusting a mode of an ambient light in the vehicle cockpit in response to a difference existing between a first color distribution of the first picture and a second color distribution of the second picture.

[0006] In a second aspect of the present disclosure, there is provided a method for controlling a vehicle cockpit. The method includes obtaining a video picture in a video stream. The method further includes determining a target shape in the video picture based on a target template. In addition, the method further includes controlling the vehicle cockpit in response to the target shape in the video picture satisfying a predetermined condition.

[0007] In a third aspect of the present disclosure, there is provided an electronic device for controlling a vehicle cockpit. The device includes at least one processing unit; and at least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions when executed by the at least one processing unit causing the electronic device to execute the methods according to the first aspect and / or the second aspect of the present disclosure.

[0008] In a fourth aspect of the present disclosure, a vehicle is provided, which includes the electronic device described in the third aspect of the present disclosure.

[0009] In a fifth aspect of the present disclosure, a computer program product is provided, which is tangibly stored on a non - volatile computer - readable medium and includes machine - executable instructions that, when executed, cause the machine to perform the methods described in the first aspect and / or the second aspect of the present disclosure.

[0010] It should be understood that the content described in the summary of the invention section is not intended to limit the key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In combination with the accompanying drawings and with reference to the following detailed description, the above - mentioned and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent. In the drawings, the same or similar reference numerals denote the same or similar elements, where:

[0012] Figure 1 A schematic diagram of an example environment according to an embodiment of the present disclosure is shown;

[0013] Figure 2 A schematic diagram of a cockpit according to some embodiments of the present disclosure is shown;

[0014] Figure 3 A schematic flowchart of a method for controlling a cockpit of a vehicle according to some embodiments of the present disclosure is shown;

[0015] Figure 4 Another schematic flowchart of a method for controlling a cockpit of a vehicle according to some embodiments of the present disclosure is shown;

[0016] Figure 5 Another schematic flowchart of a method for controlling a cockpit of a vehicle according to some embodiments of the present disclosure is shown;

[0017] Figure 6 A schematic diagram of a target shape according to some embodiments of the present disclosure is shown;

[0018] Figure 7 A schematic diagram of an interface for obtaining user input information according to some embodiments of the present disclosure is shown;

[0019] Figure 8 A schematic flowchart of a method for determining a target shape from a video frame according to some embodiments of the present disclosure is shown;

[0020] Figure 9 A schematic flow chart of a method for controlling a vehicle cabin based on target shapes in multiple video frames according to some embodiments of the present disclosure is shown;

[0021] Figure 10 A schematic flow chart illustrating a method for controlling a vehicle cabin according to some embodiments of the present disclosure; and

[0022] Figure 11 A schematic block diagram of an example device that can be used to implement embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0023] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0024] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to." The term "based on" should be understood as "based at least in part on." The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment." The terms "first," "second," etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0025] The vehicle (sometimes referred to as a vehicle) in this application is a vehicle in a broad sense, which can be a means of transportation (such as a car, truck, motorcycle, airplane, train, ship, etc.), an industrial vehicle (such as a forklift, trailer, tractor, etc.), an engineering vehicle (such as an excavator, a bulldozer, a crane, etc.), agricultural equipment (such as a lawn mower, a harvester, etc.), amusement equipment, a toy vehicle, etc. The embodiments of this application do not specifically limit the type of vehicle.

[0026] As mentioned earlier, in the smart cockpit sector, the linkage between users' entertainment activities, such as gaming and film, and the cockpit is becoming increasingly important. Currently, to achieve linkage between the vehicle's cockpit behavior and the movies or games the user is watching, it is possible to control the vehicle's ambient lighting, audio, and other devices based on events or scenes appearing in the movies or games. Events and scenes in movies or games can vary widely, and currently, there is a lack of a method that can accurately identify these changes and subsequently control the cockpit.

[0027] To address at least the above and other potential issues, embodiments of the present disclosure provide a method for controlling a vehicle cockpit. The method includes extracting a first frame and a second frame from a video stream. The method further includes adjusting the mode of the ambient lights in the vehicle cockpit in response to a difference between a first color distribution of the first frame and a second color distribution of the second frame. Through the method in the embodiments of the present disclosure, based on the color changes in the video, events or scene changes in the video can be accurately identified, and on this basis, the ambient lights in the vehicle cockpit can be controlled, thereby enabling interaction between the video and the ambient lights in the cockpit and improving the user experience.

[0028] Embodiments of the present disclosure will be described in further detail below with reference to the accompanying drawings, where Figure 1 shows a schematic diagram of an exemplary environment 100 according to an embodiment of the present disclosure. As Figure 1 shown, the exemplary environment 100 may include an entertainment device 101, a vehicle 102, and a control device 103. Among them, the entertainment device 101 may be a device for playing video and / or presenting game content, and may include, but is not limited to, a mobile phone, a tablet computer, a laptop computer, a computer, a monitor, an in-vehicle computer, a car head unit, an augmented reality device, a virtual reality device, etc. The vehicle 102 may be configured with an intelligent cockpit system, and devices such as a monitor, a sound system, ambient lights, a smart seat, and a fragrance diffuser may be configured in the cockpit of the vehicle 102.

[0029] The control device 103 may be a device for controlling the cockpit of the vehicle 102, and may include, but is not limited to, a controller, a processor, a chip, a chip system, etc. configured in the vehicle 102, or a mobile phone, a tablet computer, a laptop computer, a computer, a server, etc. independent of the vehicle 102. The control device 103 may also be a server configured in the cloud. The control of the cockpit of the vehicle 102 by the control device 103 includes, but is not limited to, the control of devices such as the monitor, the sound system, the ambient lights, the smart seat, and the fragrance diffuser in the cockpit. In some embodiments, the control device 103 may control the ambient lights in the cockpit, such as changing the rhythm, brightness, or color of the ambient lights. In some embodiments, the control device 103 may obtain the video stream in the entertainment device 101, such as the video stream of a video or a game video, and on this basis, control the cockpit of the vehicle 102, such as controlling the ambient lights.

[0030] Figure 2FIG. 0 shows a schematic diagram of the cockpit 200 according to some embodiments of the present disclosure. The cockpit 200 can be, for example, the cockpit of the vehicle 102. In the cockpit 200, there are included a vehicle head unit 201, a mobile phone 202, ambient lights 203 and ambient lights 204. In some embodiments, the vehicle head unit 201 and / or the mobile phone 202 in the cockpit 200 can correspond to the entertainment device 101 in the scenario 100 and can play videos, such as movie and television videos or game videos. In some embodiments, the vehicle head unit 201 and / or the mobile phone 202 in the cockpit 200 can also correspond to the control device 103 in the scenario 100 and can control the ambient lights 203 and / or the ambient lights 204.

[0031] In some embodiments, the mobile phone 202 can determine a control instruction for controlling the ambient lights 203 and / or the ambient lights 204 based on the video played by itself, and send it to the vehicle head unit 201, so as to realize the control of the ambient lights 203 and / or the ambient lights 204 through the vehicle head unit 201. In some embodiments, the mobile phone 202 can send the control instruction to the cockpit controller or the ambient light controller, so as to realize the control of the ambient lights 203 and / or the ambient lights 204. In some embodiments, the mobile phone 202 can obtain the video played on the display of the vehicle head unit 201 from the vehicle head unit 201, and determine the control instruction for controlling the ambient lights on this basis, so as to realize the control of the ambient lights 203 and / or the ambient lights 204. In some embodiments, the vehicle head unit 201 can control the ambient lights 203 and / or the ambient lights 204 based on the video played by itself and / or the video played by the mobile phone 202.

[0032] It should be understood that Figure 1 the shown scenario 100 and Figure 2 the shown cockpit 200 are only examples of the embodiments of the present disclosure and cannot be a limitation to the embodiments of the present disclosure. Exemplarily, in some embodiments, in the scenario 100, the entertainment device 101 can be configured in the vehicle 102. In some embodiments, in the scenario 100, the control device 103 can be the same device as the entertainment device 101 or a module in the entertainment device 101. In some embodiments, in the cockpit 200, there can also be more or fewer ambient lights, and the control device 103 can control each ambient light separately or jointly control all the ambient lights in the cockpit. In the embodiments of the present disclosure, the ambient lights can exist in the form of lamp beads or light strips, and the specific form and position of the ambient lights in the embodiments of the present disclosure are not limited. In some embodiments, the cockpit 200 can also include devices such as a sound system, a fragrance diffuser, and a smart seat, and the control device 103 can control these devices.

[0033] The above combines Figure 1 and Figure 2 describes an example environment according to the embodiments of the present disclosure. The following combinesFigure 3 Describe an example method 300 for controlling a vehicle cockpit according to an embodiment of the present disclosure. The method 300 can be executed, for example, by Figure 1 the control device 103 in. Next, taking the control device as the execution subject as an example, the method 300 will be described schematically. Referring to Figure 3 , the method 300 may include block 302 and block 304.

[0034] In block 302, the control device extracts a first picture and a second picture from the video stream. In some embodiments, the video stream may be a video stream of a game video. Exemplarily, in scenario 100, the entertainment device 101 may be a game device, and the graphics processing unit (GPU) of the game device may render game video frames in real time based on game code and instructions, thereby forming a video stream of the game video. In some embodiments, the video stream may be a video stream of a movie or TV show. Exemplarily, in scenario 100, the entertainment device 101 may be a video playback device, and the decoding chip of the device may decode video data stored in the memory or video data received from other devices into continuous video frames, thereby forming a video stream of the movie or TV show. The control device may, for example, obtain the video stream from the entertainment device and extract the first picture and the second picture from the video stream. In some embodiments, the control device may also directly obtain two video frames from the video stream of the entertainment device, and on this basis, obtain the first picture and the second picture.

[0035] In block 304, the control device adjusts the mode of the ambient light in the vehicle cockpit in response to a difference between a first color distribution of the first picture and a second color distribution of the second picture. Wherein, the first color distribution is used to indicate the color ratio of multiple colors in the first picture, and the second color distribution is used to indicate the color ratio of multiple colors in the second picture. The multiple colors corresponding to the first color distribution and the multiple colors corresponding to the second color distribution may be the same multiple colors or different multiple colors. The control device may determine the first color distribution and the second color distribution based on the area occupied by each color in the picture among multiple colors, or may also determine the first color distribution and the second color distribution based on the number of pixel points corresponding to each color.

[0036] The control device can determine whether there is a difference between the first color distribution and the second color distribution based on the first color distribution and the second color distribution. The difference between the two color distributions can include, but is not limited to, the two color distributions being different, or a predetermined condition being satisfied between the two color distributions. In some embodiments, there being a difference between the first color distribution and the second color distribution can be that the first color distribution is different from the second color distribution. In some embodiments, the first color distribution being different from the second color distribution can include the colors included in the first color distribution being different from the colors included in the second color distribution. The control device can determine that there is a difference between the two color distributions when the colors included in each of the two color distributions are different. In some embodiments, the first color distribution being different from the second color distribution can include the proportion of each color in the first color distribution being different from the proportion of each color in the second color distribution. The control device can determine that there is a difference between the two color distributions when the proportion of the colors included in each of the two color distributions is different.

[0037] In some embodiments, whether there is a difference between the first color distribution and the second color distribution can be determined by whether a predetermined condition is satisfied between the first color distribution and the second color distribution. In some embodiments, the predetermined condition can be that the color distribution difference between the first color distribution and the second color distribution is greater than a predetermined distribution difference threshold. The control device can determine the color distribution difference between the first color distribution and the second color distribution, compare this color distribution difference with the predetermined distribution difference threshold, and thereby determine whether the predetermined condition is satisfied. In some embodiments, the predetermined condition can be that the similarity between the first color distribution and the second color distribution is less than a predetermined similarity threshold. The control device can determine the similarity between the first color distribution and the second color distribution, compare this similarity with the predetermined similarity threshold, and thereby determine whether the predetermined condition is satisfied.

[0038] The adjustment of the mode of the ambient light by the control device can include, but is not limited to, adjusting the rhythm of the ambient light, adjusting the brightness of the ambient light, adjusting the color of the ambient light, etc. When it is determined that there is a difference between the first color distribution and the second color distribution, the control device can send a control instruction to the controller of the ambient light. This control instruction can, for example, instruct the ambient light to present a specific color, the ambient light to present a specific brightness, and / or the ambient light to rhythmically move at a specific rhythm, etc. After receiving this control instruction, the ambient light can present a corresponding effect in response to this control instruction. In some embodiments, when there is no change between the first color distribution and the second color distribution, the control device can not adjust the mode of the ambient light.

[0039] Through the above technical solution, the control device can adjust the mode of the ambient light based on the change in the color distribution between two pictures in the video stream, so as to realize the linkage between the cockpit and the video content. In some cases, the occurrence of an important event in the video only corresponds to the change in the proportion of some colors in the video picture. Through the solution provided by the embodiments of the present disclosure, such a change in color can be recognized, so that the event in the video content can be accurately recognized and the mode of the ambient light can be adjusted in a timely manner. In this way, the interaction effect between the cockpit and the video content can be better, and the user experience can be improved. In addition, in the embodiments of the present disclosure, the interaction between the game content and the ambient light is realized based on the picture of the game video, without relying on the application programming interface (API) of the game event. In this way, it is not necessary to obtain the game event API from the game provider, and the cost can be reduced.

[0040] In some embodiments, in the foregoing block 302, the first picture and the second picture may be two video frames in the video stream. For example, the video stream may include a first frame and a second frame, and the control device may directly use the first frame as the first picture and the second frame as the second picture. In some embodiments, the first frame and the second frame may be two consecutive video frames. In some embodiments, there may be a predetermined time interval between the first frame and the second frame, that is to say, the first frame and the second frame may not be two consecutive frames in the video stream.

[0041] In some embodiments, the first picture is the region of interest in the first frame of the video stream, and the second picture is the region of interest in the second frame of the video stream. That is to say, the first picture and the second picture are not complete video frames, but a part of the region in the video frame. The region of interest may be pre-configured or set by the user. The control device may extract the region of interest in the first frame of the video stream and use it as the first picture, and may extract the region of interest in the second frame of the video stream and use it as the second picture. In some embodiments, the physical positions of the region of interest in the first frame and the region of interest in the second frame are the same. In some embodiments, the region of interest in the first frame and the region of interest in the second frame correspond to the same video object, and the video object may be in different physical positions in different video frames. That is to say, the physical position of the first picture in the first frame may be different from the physical position of the second picture in the second frame.

[0042] In some embodiments, in the aforementioned block 304, the first color distribution indicates the first proportion of multiple central colors in the first screen, and the second color distribution indicates the second proportion of multiple central colors in the second screen. That is to say, the multiple colors corresponding to the first color distribution and the multiple colors corresponding to the second color distribution are the same multiple central colors. Exemplarily, the central colors can be, for example, 7 colors including yellow, red, orange, pink, brown, blue, green, and cyan. The first color distribution indicates the proportion of each of these 7 colors in the first screen, and the second color distribution indicates the proportion of each of these 7 colors in the second screen. It should be understood that the example of the central colors here is only given for the convenience of explanation and cannot be a limitation to the embodiments of the present disclosure. The number of central colors can also be 10, or other color types. The embodiments of the present disclosure do not limit the number and type of central colors.

[0043] In some embodiments, the type and number of central colors are pre-stored in the memory of the control device, and the control device can obtain multiple central colors from the memory. In some embodiments, the central colors are determined based on the colors of the ambient lights. For example, the ambient lights in the cockpit can present multiple types of colors, and the control device can obtain the number and type of these colors from the configuration file of the ambient lights and use them as the central colors. That is to say, the number of central colors and the number of colors that the ambient lights can present can be the same. In some embodiments, the control device can cluster a predefined number of central colors based on the colors of the ambient lights. That is to say, the number of central colors can be less than the number of colors of the ambient lights. In the embodiments of the present disclosure, colors can be encoded and stored in various formats, such as RGB format or HSV format, and the present disclosure does not limit this. In the embodiments of the present disclosure, obtaining a color includes obtaining the numerical value corresponding to the color, such as the RGB value or HSV value corresponding to the color.

[0044] In some embodiments, the control device can determine the central color corresponding to each pixel point in the screen and, based on this, determine the color distribution of the screen. In the first screen or the second screen, each pixel point can indicate a color. For each pixel point, the control device can determine the color distance between the color of the pixel point and each central color and use the central color with the smallest color distance from the color of the pixel point as the corresponding central color. Exemplarily, colors can be encoded in RGB format, and the color distance can be determined by the following formula:

[0045]

[0046] Wherein, PC1 represents the color of a pixel, CC1 represents one of multiple center colors, ||PC1 - CC1|| represents the color distance between the color of the pixel and the center color, PC 1,R represents the R value of color PC1, CC 1,R represents the R value of color CC1, PC 1,G represents the G value of color PC1, CC 1,G represents the G value of color CC1, PC 1,B represents the B value of color PC1, CC 1,B represents the B value of color CC1. In the embodiments of the present disclosure, colors can also be encoded in other types of formats, and the control device can determine the distance between colors based on a similar method. In some embodiments, the encoding format of the center color obtained by the control device is different from the encoding format of the color of the pixel in the screen, and the control device can convert it to the same encoding format and then determine the color distance.

[0047] After determining the center color corresponding to each pixel in the screen, the control device can determine the proportion of the center color in the screen. For example, the proportion of a center color in the screen can be the ratio of the number of pixels corresponding to the center color in the screen to the total number of pixels in the screen. Exemplarily, the proportion of a center color in the screen can be determined by the following formula:

[0048] P CC1 =(N CC1 / N)×100% (2)

[0049] Where P CC1 represents the proportion of one of the multiple center colors, color CC1, in the screen, N CC1 represents the number of pixels corresponding to color CC1 in the screen, and N represents the total number of pixels in the screen.

[0050] The control device can determine the proportion of each center color in the first screen and in the second screen, so as to determine the first color distribution of the first screen and the second color distribution of the second screen. Exemplarily, in the case where the center colors include 5 types of colors, the first color distribution of the first screen can be as shown in Table 1:

[0051] Table 1

[0052] Color <![CDATA[CC1]]> <![CDATA[CC2]]> <![CDATA[CC3]]> <![CDATA[CC4]]> <![CDATA[CC5]]> Ratio <![CDATA[a1]]> <![CDATA[a2]]> <![CDATA[a3]]> <![CDATA[a4]]> <![CDATA[a5]]>

[0053] In Table 1, CC1, CC2, CC3, CC4, and CC5 are used to respectively represent five center colors. a1 represents the proportion of color CC1 in the first picture, a2 represents the proportion of color CC2 in the first picture, a3 represents the proportion of color CC3 in the first picture, a4 represents the proportion of color CC4 in the first picture, and a5 represents the proportion of color CC5 in the first picture. a1, a2, a3, a4, and a5 are all specific values determined by the control device, and the sum of a1, a2, a3, a4, and a5 is 100%.

[0054] The second color distribution of the second picture can be, for example, as shown in Table 2:

[0055] Table 2

[0056] Color <![CDATA[CC1]]> <![CDATA[CC2]]> <![CDATA[CC3]]> <![CDATA[CC4]]> <![CDATA[CC5]]> Ratio <![CDATA[b1]]> <![CDATA[b2]]> <![CDATA[b3]]> <![CDATA[b4]]> <![CDATA[b5]]>

[0057] In Table 1, b1 represents the proportion of color CC1 in the second picture, b2 represents the proportion of color CC2 in the second picture, b3 represents the proportion of color CC3 in the second picture, b4 represents the proportion of color CC4 in the second picture, and b5 represents the proportion of color CC5 in the second picture. b1, b2, b3, b4, and b5 are all specific values determined by the control device, and the sum of b1, b2, b3, b4, and b5 is 100%. It should be understood that the first color distribution and the second color distribution shown in Table 1 and Table 2 are only examples of the embodiments of the present disclosure and cannot be a limitation on the embodiments of the present disclosure. For example, in some embodiments, the center colors can also be other quantities and types, and the first color distribution and the second color distribution can also exist in other forms. The present disclosure does not limit this.

[0058] In some embodiments, in the aforementioned block 304, the color proportions indicated by the first color distribution can be the color proportions of the colors included in the first picture, and the color proportions indicated by the second color distribution can be the color proportions of the colors included in the second picture. That is to say, in the case where the colors included in the first picture and the second picture are different, the multiple colors corresponding to the first color distribution and the multiple colors corresponding to the second color distribution can be different multiple colors. The control device can extract the colors included in the first picture from the first picture and can extract the colors included in the second picture from the second picture. The control device can determine the first color distribution and the second color distribution based on the area occupied by the colors in the picture, or can also determine the first color distribution and the second color distribution based on the number of pixel points corresponding to the colors in the picture.

[0059] In the foregoing box 304, after the control device determines the first color distribution and the second color distribution, it may determine whether a predetermined condition is satisfied between the first color distribution and the second color distribution, so as to determine whether there is a difference between the first color distribution and the second color distribution. In some embodiments, the predetermined condition may be that the color distribution difference between the first color distribution and the second color distribution is greater than a predetermined distribution difference threshold. The control device may determine the color distribution difference between the first color distribution and the second color distribution and compare it with the predetermined distribution difference threshold, so as to determine whether there is a difference between the first color distribution and the second color distribution.

[0060] In some embodiments, the first color distribution indicates the first proportion of multiple center colors in the first picture. For example, as shown in Table 1 above, the second color distribution indicates the second proportion of multiple center colors in the second picture. For example, as shown in Table 2 above. The control device may determine the color distribution difference based on the difference between the first proportion and the second proportion. In some embodiments, the difference between the first proportion and the second proportion may be determined by means of a chi-square test. Exemplarily, it may be determined by the following formula:

[0061]

[0062] where D X2 represents the color distribution difference between the first color distribution and the second color distribution determined by means of a chi-square test, a i represents the proportion of the center color in the first color distribution, b i represents the proportion of the center color in the second color distribution. Exemplarily, a i may be as shown in Table 1 above, and b i may be as shown in Table 2 above. The control device may compare the determined value of D X2 with the predetermined distribution difference threshold. When D X2 is greater than the predetermined distribution difference threshold, it may be determined that the predetermined condition is satisfied, that is, there is a difference between the first color distribution and the second color distribution. When D X2 is less than or equal to the predetermined distribution difference threshold, it may be determined that the predetermined condition is not satisfied, that is, there is no difference between the first color distribution and the second color distribution.

[0063] In some embodiments, the difference between the first proportion and the second proportion may be determined by means of a population stability index (PSI). Exemplarily, it may be determined by the following formula:

[0064]

[0065] Among them, D PSI represents the color distribution difference between the first color distribution and the second color distribution determined by the model stability index, a i represents the proportion of the central color in the first color distribution, b i represents the proportion of the central color in the second color distribution. The control device can compare the determined value of D PSI with a predetermined distribution difference threshold to determine whether a predetermined condition is satisfied, that is, whether there is a difference between the first color distribution and the second color distribution. It should be understood that the embodiments of the present disclosure can also determine the color distribution difference in other ways, and the present disclosure does not limit this. It should also be understood that the predetermined distribution difference thresholds corresponding to the color distribution differences determined by different methods can be different.

[0066] In this way, the overall change in color between the first screen and the second screen can be recognized. For example, it can be recognized whether the proportion of various colors in the video screen increases or decreases. Since the content presented in the video screen is displayed through the colors of various pixels in the screen, therefore, through the solution in the embodiments of the present disclosure, it is possible to sensitively determine whether a specific event has occurred in the video content and whether a scene change has occurred. On this basis, adjusting the mode of the ambient light can make the correlation between the ambient light and the video content better, so that the interaction effect between the ambient light and the video content is better. In this way, the user experience can be improved.

[0067] In some embodiments, a variety of control instructions for controlling the ambient light can be predefined in the memory of the control device. Each control instruction can respectively correspond to a color, brightness, and / or rhythm of the ambient light. In some embodiments, the control instruction can also indicate the response time of the ambient light. Exemplarily, it can indicate that the ambient light presents red and remains red for 5 seconds. In some embodiments, in the foregoing block 304, the controller can select a target control instruction from a variety of control instructions and send it to the controller of the ambient light, so as to realize the adjustment of the mode of the ambient light. In some embodiments, the control device can also directly determine the color, brightness, and / or rhythm of the ambient light based on the first screen and the second screen, and control the ambient light to present the color, brightness, and / or rhythm.

[0068] In some embodiments, in the aforementioned block 304, the control device may determine a control instruction for controlling the ambient light based on the color distribution difference between the first color distribution and the second color distribution. Exemplarily, the predetermined color distribution difference threshold may include multiple threshold levels. Each threshold level may correspond to a control instruction respectively, and the control device may determine the control instruction for controlling the ambient light based on the threshold level reached by the color distribution difference. In some embodiments, the control device may adjust the ambient light based on the colors in the first color distribution of the first screen and / or the second color distribution of the second screen. Exemplarily, the central colors may include red and yellow, for example. In the case where it is determined that the proportion of red in the second screen is the highest, the control device may control the ambient light to display red. In some embodiments, the control device may also determine multiple control instructions corresponding to the color with the highest proportion in the second color distribution, and then determine the target control instruction for controlling the ambient light from these multiple control instructions based on the color distribution difference. That is to say, the control of the ambient light by the control device may be related to both the main colors in the video screen and the changes in the colors in the video screen.

[0069] In some embodiments, the control device may obtain the first screen and the second screen in the video stream in real time and, on this basis, adjust the mode of the ambient light in real time. In some embodiments, the control device may also adjust the mode of the ambient light in the cockpit based on other numbers of screens. For example, three video screens may be determined based on three consecutive video frames in the video stream, and the mode of the ambient light may be adjusted based on the color distribution difference between the three video screens. In some embodiments, the control device may also control other devices in the cockpit based on the color distribution difference between the video screens in the video stream, such as adjusting the audio played by the audio system, or adjusting the mode of the fragrance, or adjusting the movement mode of the seat. In this way, a more immersive experience can be provided for the user.

[0070] As an example, Figure 4 shows a schematic diagram of a method 400 for controlling the cockpit of a vehicle in some embodiments of the present disclosure. The method 400 may be executed, for example, by Figure 1 the control device 103 therein. Next, taking the control device as the execution subject as an example, the method 400 will be described schematically. Referring to Figure 4 , the method 400 may include block 402 to block 424. In block 402, the control device obtains a video stream, for example, may obtain a game video stream of a game device or obtain a film and television video stream of a video playback device. In block 404, the control device extracts the first screen and the second screen from the video stream. For example, two consecutive video frames in the video stream may be used as the first screen and the second screen.

[0071] In block 406, the control device obtains the color of the ambient light. For example, it can obtain the predefined configuration file of the ambient light from the controller of the ambient light, and determine the types and quantities of colors that the ambient light can present from this configuration file. In block 408, based on the multiple colors that the ambient light can present, the control device clusters a predefined number of central colors, which can overall reflect the colors that the ambient light can present.

[0072] In block 410, the control device determines the color distances between the colors of each pixel in the first and second images and each central color. The color distance can be determined, for example, by the aforementioned formula (1). In block 412, based on the color distances between the pixels in the image and the central colors, the control device determines the central colors corresponding to each pixel in the first and second images respectively. Exemplarily, the control device can determine the central color with the closest color distance to a pixel's color among multiple central colors as the central color corresponding to this pixel. In block 414, the control device determines the first ratio of each central color in the first image and the second ratio in the second image. Exemplarily, the control device can determine the ratio of the central color in the image based on the number of pixels corresponding to each central color.

[0073] In block 416, the control device determines the color distribution difference between the first and second images based on the first ratio and the second ratio. Exemplarily, the control device can determine the color distribution difference through the aforementioned formula (3) or formula (4). In block 418, the control device determines whether the color distribution difference is greater than a predetermined distribution difference threshold. If so, it executes block 420; if not, it executes block 424. In block 420, the control device determines the target control instruction based on the second ratio. Exemplarily, the control device can determine one or more central colors with the highest proportion based on the second ratio, and determine the target control instruction associated with this central color from a predefined set of multiple control instructions. In block 422, the control device sends the target control instruction to the controller of the ambient light, thereby realizing the adjustment of the mode of the ambient light. In block 424, the control device does not adjust the mode of the ambient light. That is, when the color distribution difference is less than or equal to the predetermined distribution difference threshold, the control device can not make a response.

[0074] Through the above technical solution, it is possible to adjust the ambient light based on the change in the color distribution of the video, enabling interaction between the ambient light and the change in the color distribution of the video, thereby making the interaction effect between the cockpit and the video better and improving the user experience. In addition, the recognition of color changes in the video frame is based on the colors that the ambient light can present. That is to say, it is possible to adjust the ambient light by only considering the color changes in the video frame that are associated with the colors that the ambient light can present. In this way, the processing complexity can be reduced, and the adjustment of the ambient light can be made more timely.

[0075] The above content, in combination with Figure 3 and Figure 4 illustrates the method for controlling the cockpit of a vehicle based on the color distribution of a video frame in the embodiments of the present disclosure. In some embodiments, the occurrence of important events in the video content is also related to some shapes in the video frame, such as the progress bar of a video and audio video or the health bar, energy bar, etc. of video objects (including but not limited to characters, roles, vehicles, etc.) in a game video. Embodiments of the present disclosure also provide a method for controlling the cockpit of a vehicle, which can control the cockpit of the vehicle based on the shapes in the video frame.

[0076] Figure 5 FIG. shows a schematic diagram of a method 500 for controlling the cockpit of a vehicle provided by an embodiment of the present disclosure. The method 500 can be executed, for example, by Figure 1 the control device 103 therein. Next, taking the control device as the execution subject as an example, the method 500 will be described schematically. Referring to Figure 5 , the method 500 may include block 502 to block 506. In block 502, the control device acquires a video frame in the video stream. The video stream can be, for example, the video stream of a game video or the video stream of a movie video. The video stream may include multiple video frames, and a video frame can correspond to a video frame, for example, it can be the video frame itself or the region of interest in the video frame. The method by which the control device acquires the video frame in the video stream can be executed with reference to block 302 in the foregoing method 300, and will not be elaborated here.

[0077] In block 504, the control device determines a target shape in the video frame based on a target template. The target shape is a shape in the video frame that indicates key parameters (including but not limited to health values, energy values, etc.) of the video content. In some embodiments, the target shape can be a light bar. For example, in the game video of a racing game, the target shape included can be a nitro bar, and in the game video of a role-playing game, the target shape included can be a health bar or an energy bar. In some embodiments, the target shape can be a shape formed by multiple pixels with the same or similar colors in the video frame.

[0078] Figure 6 The schematic diagram of the target shape in some embodiments of the present disclosure is illustrated by taking a game video as an example. In Figure 6 In the shown scene 600, there is a game device 601, and the game device 601 can correspond to the entertainment device 101 in the scene 100 for example. The game device 601 can play a game video 602, and the game video 602 includes video objects 603 and 604. The target shape 605 is the health bar of the video object 603, and the target shape 606 is the health bar of the video object 604. The video stream 607 of the game video 602 can include multiple video frames, and in different video frames, there can be target shapes corresponding to the same video object. For example, the target shape 605-1 in the video frame 607-1 is the health bar of the video object 603, the target shape 605-2 in the video frame 607-2 is also the health bar of the video object 603, the target shape 606-1 in the video frame 607-1 is the health bar of the video object 604, and the target shape 606-2 in the video frame 607-2 is also the health bar of the video object 604. It should be understood that Figure 6 The shown scene is only an example of the present disclosure and cannot be a limitation to the present disclosure. In some embodiments, there can be other numbers of target shapes in a video frame.

[0079] The control device can determine the target shape from the video picture by means of template matching based on the target template. In some embodiments, the target template is predefined in a memory, and the memory can be the memory configured by the control device, or a separately provided memory for example. In some embodiments, the target template is generated based on the input information of the user. The control device can obtain the input information from the user, and thus generate the target template based on the output information. In some embodiments, the control device can also determine the position of the target shape in the video picture, such as the coordinates of the target shape. In some embodiments, the control device can also determine the area of the target shape. In some embodiments, the target shape is strip-shaped, and the control device can also determine the length of the target shape.

[0080] In block 506, the control device controls the vehicle's cockpit in response to the target shape in the video frame meeting a predetermined condition. In some embodiments, in the aforementioned block 504, the control device determines the position of the target shape in the frame, and the target shape meeting the predetermined condition may include the position of the target shape in the frame being at a predetermined position. In some embodiments, in the aforementioned block 504, the control device determines the coordinates of the target shape, and the target shape meeting the predetermined condition may include the coordinates of the target shape being within a predetermined coordinate range. In some embodiments, in the aforementioned block 504, the control device determines the area of the target shape, and the target shape meeting the predetermined condition may include the area of the target shape being within a predetermined area range, etc. In some embodiments, in the aforementioned block 504, the control device determines the length of the target shape, and the target shape meeting the predetermined condition may include the length of the target shape being within a predetermined length range.

[0081] It should be understood that the examples of the target shape meeting the predetermined condition here are only for illustration and cannot limit the embodiments of the present disclosure. In some embodiments, the predetermined condition may also be other conditions, which may be pre-configured or set by the user. When the target shape meets the predetermined condition, the control device can control the vehicle's cockpit, including but not limited to adjusting the mode of the ambient light, adjusting the audio played by the sound system, adjusting the mode of the fragrance, and adjusting the movement mode of the seat. In some embodiments, when the target shape meets the predetermined condition, the control device can determine the target control instruction corresponding to the predetermined condition from multiple control instructions and send the target control instruction to the controller of the ambient light, the controller of the sound system, the controller of the fragrance, or the controller of the seat in the cockpit, so as to achieve the control of the vehicle's cockpit. The method for the control device to control the vehicle's cockpit can be executed with reference to block 304 in the aforementioned method 300.

[0082] Through method 500, the cockpit can be controlled based on the shape in the video frame. In this way, the linkage mode between the cockpit and the video content can be expanded, thereby improving the user experience. In the embodiments of the present disclosure, the target shape can be identified from the video frame through the template matching method, which can accurately determine the target shape in the video frame, so that the interaction between the cockpit and the video content can be more accurate. In addition, compared with the method of identifying the shape in the frame through machine learning, the template matching method requires fewer computing resources, can save computing resources, and can shorten the time to identify the target shape, making the response more rapid, so that the cockpit's response to the video content is more timely, improving the linkage effect between the cockpit and the video content and enhancing the user experience.

[0083] In some embodiments, the target template for determining the target shape is determined based on the input information used. In some embodiments, the control device may obtain the user's input information and generate a target template based on the input information. In some embodiments, the control device may select a target template from a plurality of predefined templates based on the input information. In some embodiments, the control device may obtain the user's input information through an interface such as Figure 7 shown.

[0084] Figure 7 FIG. 700 is a schematic diagram of an interface for obtaining the user's input information in some embodiments of the present disclosure. The interface 700 may correspond to a game video. In the interface 700, the game name, game version, event name, template matching method, original image size, template style, original image style, and template label input by the user can be obtained. Among them, the template style may include different styles such as pixel RGB, single template, and multi-template mixture. The original image size may specify the size of the video frame to be processed. The template label may specify the search interest area in the picture, so that the control device can match the target shape only in the search interest area of the picture. In some embodiments, the template label may also specify the change rule of the target shape in multiple pictures. It should be understood that Figure 7 the interface 700 shown in FIG. is only an example of the present disclosure and cannot be a limitation to the present disclosure. The interface for receiving the user input information may also be presented in other forms.

[0085] In some embodiments, a video frame includes multiple target shapes. For example, in the foregoing Figure 6 FIG., a video frame of the video stream 607 may include both the target shape 605 and the target shape 606 at the same time. In some embodiments, each target shape may correspond to a target template respectively. In the foregoing block 504, the control device may determine multiple target shapes in a video frame based on multiple target templates. In some embodiments, each target shape may correspond to a predetermined condition respectively. In the foregoing block 506, the control device may control the vehicle cockpit when each target shape meets its corresponding predetermined condition.

[0086] In some embodiments, the control device may also obtain multiple video frames of the video stream, may determine the target shapes in each video frame, may determine whether the multiple target shapes respectively corresponding to the multiple video frames meet a predetermined condition, and may control the vehicle cockpit when the predetermined condition is met. Exemplarily, in scenario 600, the control device may obtain video frame 607-1 and video frame 607-2 in the video stream. The target shape 606-1 corresponding to the video object 604 in video frame 607-1 may be determined based on the target template, and the target shape 606-2 corresponding to the video object 604 in video frame 607-2 may be determined. The control device controls the vehicle cockpit when the target shape 606-1 and the target shape 606-2 meet the predetermined condition. It should be understood that the description here is only an example and cannot limit the embodiments of the present disclosure. In some embodiments, the number of video frames may be greater than two.

[0087] In some embodiments, the control device may determine the change speed of the target shape in the video stream based on the multiple target shapes. In the foregoing block 506, the target shape meeting the predetermined condition may further include that the change speed of the target shape in the video stream is greater than a predetermined speed threshold. In some embodiments, the control device may determine the coordinate positions of the target shapes corresponding to the same video object in different video frames, so as to determine the change speed of the target shape in the video frames, and control the vehicle cockpit based on this. Exemplarily, the control device may determine the coordinate positions of the target shapes in the multiple video frames by method 800 as shown in Figure 8 and may control the vehicle cockpit based on the change speed of the target shape by method 900 as shown in Figure 9 .

[0088] Figure 8 FIG. shows a schematic flowchart of method 800 for determining a target shape from a video frame in some embodiments of the present disclosure. Referring to Figure 8 , method 800 may include block 802 to block 806. In block 802, the control device determines the search region of interest of the video frame based on the size of the video frame and the original image size defined in the target template. In the target template, the original image size and the search region of interest under the original image size may be defined. After obtaining the video frame, the control device may adjust the original image size to be the same as the video frame, so as to determine the search region of interest in the video frame.

[0089] In block 804, the control device searches for a target shape within the search region of interest and determines the coordinate position of the target shape. In some embodiments, the style of the target shape may be defined in the target template, and the control device may determine the target shape from the video frame based on a template matching algorithm. In some embodiments, the color value of the target shape may be defined in the target template, and the control device may determine the pixel blocks that display the color value in the video frame based on the color value in the target template, thereby determining the position of the target shape. In some embodiments, the control device may also establish a coordinate system based on the video frame and determine the coordinate position of the target shape in the coordinate system.

[0090] In block 806, the control device determines a coordinate sequence based on the coordinate positions of the target shape in multiple video frames. After determining the coordinate positions of the target shape in multiple video frames through the methods in blocks 802 and 804, the control device may obtain the coordinate sequence of the target shape in multiple video frames, and this coordinate sequence can reflect the change of the target shape in the video. In some embodiments, the target shape is strip-shaped, and the control device may use the left endpoint of the target shape as the coordinate origin and the right endpoint of the target shape as the coordinate position of the target shape. The coordinate sequence including multiple coordinate positions can reflect the change of the length of the target shape in the video.

[0091] Figure 9 The figure shows a schematic diagram of a method 900 for controlling a vehicle cockpit based on a target shape in multiple video frames in some embodiments of the present disclosure. Referring to Figure 9 , method 900 may include blocks 902 to 906. In block 902, the control device determines the change speed of the target shape based on the coordinate sequence. Among them, the coordinate sequence may be obtained by the control device through the method 800 in Figure 8 . In some embodiments, the multiple frames of images obtained by the control device may be images separated by a predefined time length. The control device may determine the change speed of the target shape based on the position change or length change of the target shape indicated in the coordinate sequence and the predefined time length.

[0092] In block 904, the control device obtains a predetermined condition. Exemplarily, the predetermined condition can be, for example, a predetermined speed threshold, and the control device can obtain this predetermined speed threshold. In some embodiments, the predetermined condition can include multiple change speed levels, and each change speed level can respectively correspond to a strategy or control instruction for controlling the vehicle's cockpit. In block 906, the control device controls the vehicle's cockpit based on the predetermined condition and the change speed of the target shape. In some embodiments, the predetermined condition indicates a predetermined speed threshold. The control device can send an instruction for controlling the cockpit when the change speed of the target shape is greater than the predetermined change speed, and does not send an instruction for controlling the cockpit when the change speed of the target shape is less than the predetermined change speed. In some embodiments, the predetermined condition can include multiple change speed levels. The control device can send a target control instruction corresponding to the change speed level based on the change speed level reached by the change speed of the target shape, so as to realize the control of the cockpit.

[0093] The above content, in combination with Figures 5 to 9 schematically illustrates the method for controlling the vehicle's cockpit based on the shape in the video picture provided by the embodiments of the present disclosure. Next, in combination with Figure 10 , a specific example is used to further illustrate this method. Figure 10 FIG. shows a schematic flowchart of a method 1000 for controlling a vehicle's cockpit in an embodiment of the present disclosure. The method 1000 can be executed by the control device 103 in the scenario 100. Next, taking the control device as the execution subject, the method 1000 will be described. Referring to Figure 10 , the method 1000 can include block 1002 to block 1022.

[0094] In block 1002, the control device obtains a video stream of a game video, for example, it can be obtained from a game device such as a mobile phone or a car computer. In some embodiments, the control device and the game device can be different modules in the same device. In block 1004, the control device extracts multiple video pictures from the video stream. The multiple video pictures can be, for example, consecutive video frames, or multiple video frames spaced apart by a predefined time length. In block 1006, the control device obtains input information from the user. In block 1008, the control device determines a target template based on the input information. The control device can, for example, generate a target template, or the control device can also determine a target template that matches the user's input information from multiple predefined templates.

[0095] In block 1010, the control device determines a target shape in multiple video frames based on a target template. In block 1012, the control device forms a coordinate sequence based on the coordinates of the target shape in each video frame. The methods in block 1010 and block 1012 can be executed with reference to the foregoing method 800. In block 1014, the control device determines the change speed of the target shape in the video stream based on the coordinate sequence. The method in block 1014 can be executed with reference to block 902 in the foregoing method 900.

[0096] In block 1016, the control device determines whether the change speed of the target shape is greater than a predetermined speed threshold. If so, block 1018 is executed; if not, block 1022 is executed. In block 1018, the control device determines a target control instruction from multiple candidate control instructions based on the change speed of the target shape. In block 1020, the control device sends the target control instruction. The target control instruction can be, for example, a control instruction for adjusting the mode of the ambient light, and the control device can send the target control instruction to the controller of the ambient light. In block 1022, the controller does not change the state of the cockpit. Through method 1000, the control device can determine the target shape in the video stream by means of template matching, and control the vehicle's cockpit based on the change speed of the target shape. In this way, interaction between the cockpit and the change of the shape in the video can be achieved, thereby improving the user experience.

[0097] The above content, in combination with Figure 3 and Figure 4 illustrates the method for controlling a vehicle's cockpit based on color change in a video provided by an embodiment of the present disclosure, and in combination with Figures 5 to 10 illustrates the method for controlling a vehicle's cockpit based on the change of the shape in a video provided in an embodiment of the present disclosure. It should be understood that although the above content describes these two methods separately, it does not mean that the two methods are independent of each other. In some embodiments of the present disclosure, the control device can control the vehicle's cockpit based on both of these methods simultaneously.

[0098] Exemplarily, in some embodiments, after obtaining the video stream, the control device can first determine the priority between method 300 and method 500, and the control device can execute the method with a higher priority. In some embodiments, the control device can execute method 300 to generate a first control instruction for controlling the vehicle's cockpit, can execute method 500 to generate a second control instruction for controlling the vehicle's cockpit, and the control device can control the cockpit based on the first control instruction and the second control instruction respectively. In some embodiments, method 300 and method 500 can be executed simultaneously, the control device can determine the priority between the first control instruction and the second control instruction, and the control device can control the vehicle's cockpit based on the control instruction with a higher priority.

[0099] It should also be understood that the disclosed embodiments do not limit the timing of executing methods 300, 400, 500, 800, 900, and / or 1000. For example, during vehicle driving, the vehicle cockpit can be controlled based on the video or game that the passengers in the vehicle are watching or playing. As another example, when the vehicle is in a parking state, the vehicle cockpit can be controlled based on the video or game that the driver is watching or playing. In some embodiments, for driving safety, the methods provided in the embodiments of the present disclosure can be executed only when the vehicle is in a parking state. The control device can determine whether the vehicle is currently in a parking state. For example, it can obtain the state of the vehicle from the vehicle's vehicle control unit to determine whether the vehicle is in a parking state. The control device can execute the foregoing methods 300, 400, 500, 800, 900, and / or 1000 when the vehicle is in a parking state to control the vehicle cockpit and enable interaction between the cockpit and the video content. In this way, it is possible to avoid the impact of cockpit changes on the driver's driving when the vehicle is in a driving state, thereby ensuring the safety of vehicle driving.

[0100] Figure 11 FIG. shows a schematic block diagram of an exemplary device 1100 that can be used to implement the embodiments of the present disclosure. The device 1100 can correspond to the control device in the foregoing method embodiments. Figure 1 The control device 103 in can be implemented using the device 1100. As Figure 11 shown, the device 1100 includes a central processing unit (CPU) 1101, which can execute various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 1102 or computer program instructions loaded from a storage unit 1108 into a random access memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation of the device 1100 can also be stored. The CPU 1101, ROM 1102, and RAM 1103 are connected to each other through a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.

[0101] Multiple components in the device 1100 are connected to the I / O interface 1105, including: an input unit 1106, such as a keyboard, a mouse, etc.; an output unit 1107, such as various types of displays, speakers, etc.; a memory 1108, such as a magnetic disk, an optical disc, etc.; and a communication unit 1109, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1109 allows the device 1100 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0102] The various processes and treatments described above, such as methods 300, 400, 500, 700, 800, and / or 900, may be executed by the processing unit 1101. For example, in some embodiments, methods 300, 400, 500, 700, 800, and / or 900 may be implemented as computer software programs tangibly embodied in a machine-readable medium, such as the storage unit 1108. In some embodiments, part or all of the computer program may be loaded and / or installed onto the device 1100 via the ROM 1102 and / or the communication unit 1109. When the computer program is loaded into the RAM 1103 and executed by the CPU 1101, one or more actions of the methods 300, 400, 500, 700, 800, and / or 900 described above may be performed.

[0103] The present disclosure may be a method, an apparatus, a system, and / or a computer program product. The computer program product may include a computer-readable storage medium having thereon computer-readable program instructions for performing various aspects of the present disclosure.

[0104] A computer-readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device. A computer-readable storage medium may be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanically encoded device such as a punch card or raised structures in grooves having instructions stored thereon, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not construed to be an instantaneous signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., an optical pulse through an optical fiber cable), or an electrical signal transmitted through a wire.

[0105] The computer-readable program instructions described herein can be downloaded to various computing / processing devices from a computer-readable storage medium or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing / processing device.

[0106] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state-setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, by using the state information of the computer-readable program instructions to customize an electronic circuit, such as a programmable logic circuit, a field-programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute the computer-readable program instructions to implement various aspects of the present disclosure.

[0107] Aspects of the present disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0108] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that the instructions, when executed by the processing unit of the computer or other programmable data processing apparatus, result in an apparatus that implements the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, a programmable data processing apparatus, and / or other devices to operate in a particular manner, so that the computer-readable medium storing the instructions comprises a manufacture including instructions that implement various aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0109] The computer-readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device, such that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0110] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two consecutive blocks may in fact be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functionality involved. It should also be noted that each block of the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by special-purpose hardware-based systems that perform the specified functions or actions, or by combinations of special-purpose hardware and computer instructions.

[0111] The embodiments of the present disclosure have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art in the field without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, the practical application, or the technical improvement of the technology in the market, or to enable other ordinary skilled persons in the art in the field to understand the embodiments disclosed herein.

Claims

1. A method for controlling a vehicle cockpit, comprising: extracting a first frame and a second frame from a video stream; and in response to a difference existing between a first color distribution of the first frame and a second color distribution of the second frame, adjusting a mode of an ambient light in the cockpit of the vehicle.

2. The method according to claim 1, further comprising: determining whether a predetermined condition is satisfied between the first color distribution and the second color distribution; and determining that a difference exists between the first color distribution and the second color distribution when the predetermined condition is satisfied between the first color distribution and the second color distribution.

3. The method according to claim 2, wherein determining whether a predetermined condition is satisfied between the first color distribution and the second color distribution includes: determining a color distribution difference between the first color distribution and the second color distribution; determining whether the color distribution difference is greater than a predetermined distribution difference threshold; and wherein determining that a difference exists between the first color distribution and the second color distribution when the predetermined condition is satisfied between the first color distribution and the second color distribution includes: in response to the color distribution difference being greater than the predetermined distribution difference threshold, determining that a difference exists between the first color distribution and the second color distribution.

4. The method according to claim 3, further comprising: acquiring a plurality of center colors; determining the first color distribution based on the plurality of center colors and the first frame, wherein the first color distribution indicates a first proportion of the plurality of center colors in the first frame; and determining the second color distribution based on the plurality of center colors and the second frame, wherein the second color distribution indicates a second proportion of the plurality of center colors in the second frame.

5. The method according to claim 4, wherein determining the color distribution difference between the first color distribution and the second color distribution includes: determining the color distribution difference based on a difference between the second proportion and the first proportion.

6. The method according to claim 4, wherein acquiring a plurality of center colors includes: determining the plurality of center colors based on the color of the ambient light.

7. The method according to claim 6, wherein the number of the plurality of center colors is less than the number of the colors of the ambient light, and wherein the plurality of center colors are obtained by clustering based on the color of the atmosphere.

8. The method according to claim 4, wherein determining the first color distribution based on the plurality of center colors and the first frame includes: determining a center color corresponding to a pixel point in the first frame based on a color distance between the color of the pixel point included in the first frame and each center color in the plurality of center colors; determining the first proportion based on the number of pixel points corresponding to the center color in the first frame; and wherein determining the second color distribution based on the plurality of center colors and the second frame includes: Determine a central color corresponding to the pixel points included in the second screen based on the color distance between the colors of the pixel points included in the second screen and each of the multiple central colors; and Determine the second ratio based on the number of pixel points corresponding to the central color in the second screen.

9. The method according to claim 1, wherein adjusting a mode of an ambient light in the cockpit of the vehicle in response to a difference between a first color distribution of the first screen and a second color distribution of the second screen includes: Determine a target control instruction for controlling the ambient light from a plurality of control instructions in response to a difference between the first color distribution and the second color distribution, wherein the target control instruction corresponds to at least one of the first color distribution and the second color distribution; and Send the target control instruction.

10. The method according to claim 1, wherein extracting the first screen and the second screen from a video stream includes: Extract a region of interest in a first frame of the video stream as the first screen; And Extract a region of interest in a second frame of the video stream as the second screen.

11. The method according to any one of claims 1 to 10, wherein the video stream includes a video stream of a game video.

12. A method for controlling a cockpit of a vehicle, comprising: Obtain a video picture in a video stream; Determine a target shape in the video picture based on a target template; And Control the cockpit in response to the target shape in the video picture meeting a predetermined condition.

13. The method according to claim 12, wherein obtaining a video picture in a video stream includes: Obtain a plurality of video pictures in the video stream; Andwherein controlling the cockpit in response to the target shape in the video picture meeting a predetermined condition includes: Control the cockpit in response to a plurality of target shapes corresponding to the plurality of video pictures meeting a predetermined condition.

14. The method according to claim 13, wherein determining a target shape in the video picture based on a target template includes: Determine positions of a plurality of target shapes respectively corresponding to the plurality of video pictures based on the target template; Determine a change speed of the target shape in the video stream based on the positions of the plurality of target shapes; Andwherein controlling the cockpit in response to a plurality of target shapes corresponding to the plurality of video pictures meeting a predetermined condition includes: Control the cockpit in response to the change speed being greater than a predetermined speed threshold.

15. The method according to claim 12, further comprising: Obtain input information from a user; AndGenerate the target template based on the input information.

16. The method according to claim 12, wherein the cockpit includes an ambient light, and wherein controlling the cockpit includes: Determine a target control instruction for controlling the ambient light from a plurality of control instructions, wherein the target control instruction corresponds to the predetermined condition; AndSend the target control instruction. ​ ​ ​ ​ 17. The method according to any one of claims 12 to 16, wherein the video stream includes a video stream of a game video.

18. An electronic device, comprising: at least one processor; and a memory coupled to the at least one processor and having instructions stored thereon, the instructions, when executed by the at least one processor, cause the electronic device to perform the method according to any one of claims 1 to 11, or to perform the method according to any one of claims 12 to 17.

19. A vehicle, comprising the electronic device according to claim 18.

20. A computer program product, the computer program product being tangibly stored on a non - volatile computer - readable medium and comprising machine - executable instructions, the machine - executable instructions, when executed, cause the machine to perform the steps of the method according to any one of claims 1 to 11, or cause the machine to perform the steps of the method according to any one of claims 12 to 17.