Vehicle lamp control method and device, vehicle and medium
By filtering the car audio source signal, audio sub-signals in multiple frequency bands are obtained and the car lights are controlled based on these signals, the problem of low matching between existing car light show music and lights is solved, and a higher user experience is achieved.
Patent Information
- Application Number
- CN202311814639.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2025-06-27
AI Technical Summary
The low matching degree of music and lighting for existing car light shows results in poor user experience.
By filtering the sound source signal on the vehicle, audio sub-signals in multiple frequency bands are obtained, and corresponding car lights are controlled according to these audio sub-signals, so that music characteristics and lights can be changed synchronously.
Improve the matching degree between music and lights, so that the headlights change with music when playing music, improving the user experience.
Smart Images

Figure CN120207213A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of vehicles, and in particular, to a vehicle lamp control method, apparatus, vehicle, and medium. Background Art
[0002] With the popularization of automobiles and the improvement of living quality, people's requirements for the diversity of automobile entertainment are getting higher and higher. The light show of the external lamps of the automobile not only improves the overall grade of the vehicle, but also enhances the user experience. Therefore, the application of the light show in automobiles is becoming more and more extensive. However, at present, the matching degree between the light show music and the lights is low or even non-existent, resulting in a poor experience for users. Summary of the Invention
[0003] To overcome the problems existing in the related art, the present disclosure provides a vehicle lamp control method, apparatus, vehicle, and medium.
[0004] According to a first aspect of an embodiment of the present disclosure, a vehicle lamp control method is provided. The method includes: filtering a sound source signal on a vehicle to obtain an audio signal, where the audio signal includes audio sub-signals of multiple frequency bands; and controlling a vehicle lamp corresponding to each audio sub-signal according to the audio sub-signals of the multiple frequency bands included in the audio signal.
[0005] Optionally, the controlling a vehicle lamp corresponding to each audio sub-signal according to the audio sub-signals of the multiple frequency bands included in the audio signal includes: obtaining a brightness of a vehicle lamp corresponding to each audio sub-signal according to the audio sub-signals of the multiple frequency bands included in the audio signal; and controlling the vehicle lamp corresponding to each audio sub-signal according to the brightness of the vehicle lamp corresponding to each audio sub-signal.
[0006] Optionally, the obtaining a brightness of a vehicle lamp corresponding to each audio sub-signal according to the audio sub-signals of the multiple frequency bands included in the audio signal includes: processing each audio sub-signal in the audio signal to obtain a processing result corresponding to each audio sub-signal; and obtaining a brightness of a vehicle lamp corresponding to the processing result according to the processing result corresponding to each audio sub-signal and a first mapping relationship, where the first mapping relationship includes a corresponding relationship between the processing result corresponding to the audio sub-signal and the brightness of the vehicle lamp.
[0007] Optionally, the processing each audio sub-signal in the audio signal to obtain a processing result corresponding to each audio sub-signal includes: performing downsampling processing on each audio sub-signal in the audio signal to obtain a downsampled audio sub-signal.
[0008] Optionally, the downsampling process for each audio sub-signal in the audio signal includes: downsampling each audio sub-signal in the audio signal according to a downsampling coefficient; where f h is the highest frequency of the downsampled audio sub-signal, f s is the sampling rate corresponding to this audio sub-signal; D is the downsampling coefficient corresponding to this audio sub-signal.
[0009] Optionally, the process of processing each audio sub-signal in the audio signal to obtain the processing result corresponding to each audio sub-signal includes: performing frame division on each audio sub-signal in the audio signal, dividing each audio sub-signal into multiple audio frame signals, and obtaining the processing result corresponding to each audio sub-signal. Optionally, the process of performing frame division on each audio sub-signal in the audio signal, dividing each audio sub-signal into multiple audio frame signals, and obtaining the processing result corresponding to each audio sub-signal includes: performing frame division on each audio sub-signal in the audio signal, dividing each audio sub-signal into multiple audio frame signals; calculating the average energy value of each audio frame signal in the multiple audio frame signals; and performing normalization processing on each audio frame signal according to the average energy value of each audio frame signal in the multiple audio frame signals to obtain the processing result corresponding to each audio sub-signal.
[0010] Optionally, the process of performing normalization processing on each audio frame signal according to the average energy value of each audio frame signal in the multiple audio frame signals to obtain the processing result corresponding to each audio sub-signal includes: performing normalization processing on each audio frame signal according to the average energy value of each audio frame signal in the multiple audio frame signals to obtain the normalized audio frame signal for each frame; and performing smoothing processing on the normalized audio frame signal for each frame to obtain the processing result corresponding to each audio sub-signal.
[0011] Optionally, controlling the vehicle lights corresponding to each audio sub-signal according to the audio sub-signals in the multiple frequency bands included in the audio signal includes: obtaining the vehicle light color corresponding to each audio sub-signal according to the audio sub-signals in the multiple frequency bands included in the audio signal; and controlling the vehicle lights corresponding to each audio sub-signal according to the vehicle light color corresponding to each audio sub-signal.
[0012] Optionally, the audio signal includes audio sub-signals of n frequency bands. Obtaining the vehicle light color corresponding to each audio sub-signal according to the audio sub-signals of the multiple frequency bands included in the audio signal includes: converting the audio sub-signals of the n frequency bands from the time domain to the frequency domain to obtain n audio sub-signals in the frequency domain; multiplying each audio sub-signal in the frequency domain by m Mel filter banks to obtain m groups of energy values corresponding to each audio sub-signal; determining a target energy value from the m groups of energy values; and determining the vehicle light color corresponding to each audio sub-signal according to the target energy value and a second mapping relationship, where the second mapping relationship includes the correspondence between the target energy value and the vehicle light color.
[0013] Optionally, obtaining the vehicle light color corresponding to each audio sub-signal according to the audio sub-signals of the multiple frequency bands included in the audio signal includes: obtaining the vehicle light brightness corresponding to each audio sub-signal according to the audio sub-signals of the multiple frequency bands included in the audio signal; and obtaining the vehicle light color corresponding to each audio sub-signal according to the vehicle light brightness corresponding to each audio sub-signal.
[0014] Optionally, filtering the sound source signal on the vehicle to obtain an audio signal includes: filtering the sound source signal on the vehicle through a first filter to obtain an audio sub-signal of a first frequency band; filtering the sound source signal on the vehicle through a second filter to obtain an audio sub-signal of a second frequency band; filtering the sound source signal on the vehicle through a third filter to obtain an audio sub-signal of a third frequency band, where the frequency of the audio sub-signal of the first frequency band is lower than the frequency of the audio sub-signal of the second frequency band, and the frequency of the audio sub-signal of the second frequency band is lower than the frequency of the audio sub-signal of the third frequency band; and obtaining the audio signal according to the audio sub-signal of the first frequency band, the audio sub-signal of the second frequency band, and the audio sub-signal of the third frequency band.
[0015] Optionally, before filtering the sound source signal on the vehicle to obtain an audio signal, it further includes: acquiring a multi-channel music source signal on the vehicle; and calculating the average value of the music source signals of all channels to obtain the sound source signal.
[0016] According to a second aspect of the embodiments of the present disclosure, there is provided a vehicle light control device, where the device includes: a filtering module, configured to filter a sound source signal on the vehicle to obtain an audio signal, where the audio signal includes audio sub-signals of multiple frequency bands; and a control module, configured to control a vehicle light corresponding to each audio sub-signal according to the audio sub-signals of the multiple frequency bands included in the audio signal.
[0017] According to a third aspect of the embodiments of the present disclosure, a vehicle is provided, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to implement the steps of the vehicle headlight control method provided in the first aspect of the present disclosure when executing the instructions.
[0018] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored, and when the program instructions are executed by a processor, the steps of the vehicle headlight control method provided in the first aspect of the present disclosure are implemented.
[0019] The vehicle headlight control method, device, vehicle and medium provided by the present disclosure filter the sound source signal on the vehicle to obtain an audio signal. The audio signal includes audio sub-signals of multiple frequency bands, and each audio sub-signal represents a music feature. Thus, the sound source signal is divided into different music features, and then according to the audio sub-signals of multiple frequency bands included in the audio signal, the vehicle headlights corresponding to each audio sub-signal are controlled. The vehicle headlights are controlled based on the music features of the audio signal, so that music and vehicle headlights are associated, and the matching degree between the two is high. While playing music, the vehicle headlights change along with the music, thereby improving the user experience.
[0020] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure.
[0022] Figure 1 The flowchart of a vehicle headlight control method provided by an exemplary embodiment of the present disclosure is shown;
[0023] Figure 2 Shows the Figure 1 A schematic flow diagram of step S120 of the vehicle headlight control method shown;
[0024] Figure 3 Shows the Figure 1 A schematic flow diagram of step S120 of the vehicle headlight control method shown;
[0025] Figure 4 Is a schematic diagram of a vehicle applied to the vehicle headlight control method;
[0026] Figure 5 The flowchart of a vehicle headlight control method provided by another exemplary embodiment of the present disclosure is shown;
[0027] Figure 6 Is a block diagram of a vehicle headlight control device shown according to an exemplary embodiment;
[0028] Figure 7 It is a schematic functional block diagram of a vehicle shown in an exemplary embodiment. Detailed implementation manners
[0029] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0030] It should be noted that all actions of obtaining signals, information, or data in this application are carried out on the premise of complying with the corresponding data protection regulations and policies of the country where the location is located and obtaining authorization from the owner of the corresponding device.
[0031] With the popularization of automobiles and the improvement of living quality, people's requirements for the diversity of automobile entertainment are getting higher and higher. The light show of the external lights of the automobile not only improves the overall grade of the vehicle, but also can enhance the user experience. Therefore, the application of the light show in automobiles is becoming more and more extensive. However, at present, the matching degree between the light show music and the lights is low or even non-existent, the rhythm of the light flashing is decoupled from the rhythm of the music, and there is no "follow-up" feeling between the music and the lights, resulting in a poor experience for users. Usually, the light colors are monotonous, often only one color or two similar colors in the same color system are switched for the light effect, and the brightness change of the lights is not obvious, which is difficult to arouse the enthusiasm of users and further reduces the user experience.
[0032] Based on this, the present disclosure provides a vehicle lamp control method, which can be applied to Figure 6 the vehicle lamp control device 200 shown in Figure 7 the vehicle 600 shown in, and a computer-readable storage medium. In this embodiment, taking the application to the vehicle 600 as an example, please refer to Figure 1 , the vehicle lamp control method may include the following steps:
[0033] Step S110: Filter the sound source signal on the vehicle to obtain an audio signal, where the audio signal includes audio sub-signals of multiple frequency bands.
[0034] The sound source signal on the vehicle can be understood as the audio to be played by the audio on the vehicle. The sound source signal can be multi-channel or mono-channel. The vehicle filters the sound source signal on the vehicle through multiple filters to obtain an audio signal composed of audio sub-signals of multiple frequency bands.
[0035] Optionally, the multiple frequency bands may include two frequency bands, such as a high frequency band and a low frequency band. The multiple frequency bands may also include, but are not limited to, three, four, or five frequency bands. Each audio sub-signal belongs to one frequency band, and the specific number of frequency bands may be determined according to the sound source signal itself.
[0036] Exemplarily, taking the multiple frequency bands as three frequency bands as an example, the multi-band filter includes a first filter, a second filter, and a third filter. The sound source signal on the vehicle is filtered through the first filter to obtain an audio sub-signal of the first frequency band; the sound source signal on the vehicle is filtered through the second filter to obtain an audio sub-signal of the second frequency band; the sound source signal on the vehicle is filtered through the third filter to obtain an audio sub-signal of the third frequency band, wherein the frequency of the audio sub-signal of the first frequency band is lower than the frequency of the audio sub-signal of the second frequency band, and the frequency of the audio sub-signal of the second frequency band is lower than the frequency of the audio sub-signal of the third frequency band; according to the audio sub-signal of the first frequency band, the audio sub-signal of the second frequency band, and the audio sub-signal of the third frequency band, the audio signal is obtained. The first filter may be a low-pass filter that allows sound signals below 200 Hz to pass through. The second filter may be a band-pass filter that allows sound signals between 200 Hz and 1000 Hz to pass through. The third filter may be a high-pass filter that allows sound signals above 1000 Hz to pass through. Then, the audio sub-signal of the first frequency band is an audio sub-signal below 200 Hz, the audio sub-signal of the second frequency band is an audio sub-signal between 200 Hz and 1000 Hz, and the audio sub-signal of the third frequency band is an audio sub-signal above 1000 Hz.
[0037] It is not difficult to understand that the audio sub-signals of multiple frequency bands can represent different musical characteristics in the sound source signal. For example, the low-frequency audio sub-signal split from the sound source signal can represent the beat of the sound source signal, which is equivalent to the drumbeat or rhythm part in music. The low-medium frequency audio sub-signal split from the sound source signal is the melody in the sound source signal and contains the main melody part of the sound source signal. The high-frequency signal split from the sound source signal contains the high-pitched part of the sound source signal.
[0038] Step S120: Control the vehicle lights corresponding to each audio sub-signal according to the audio sub-signals of the multiple frequency bands included in the audio signal.
[0039] A vehicle includes multiple vehicle lights such as headlamps, front fog lamps, front turn signals, high-mounted brake lights, tail lights, reverse lights, rear turn signals, and rear fog lamps. For different vehicle lights, they are controlled by audio sub-signals of different frequency bands, that is, each audio sub-signal corresponds to a vehicle light. For example, low-frequency audio sub-signals correspond to headlamps and front turn signals, and high-frequency audio sub-signals correspond to front fog lamps and tail lights. The vehicle lights are controlled by the audio sub-signals corresponding to them. For example, the brightness, color, etc. of the vehicle lights are controlled. Under the control of different audio sub-signals, at the same moment, the colors and brightness of different vehicle lights may be different.
[0040] The vehicle light control method provided in this embodiment filters the sound source signal on the vehicle to obtain an audio signal. The audio signal includes audio sub-signals of multiple frequency bands, and each audio sub-signal represents a music feature. Thus, the sound source signal is divided into different music features. Then, according to the audio sub-signals of multiple frequency bands included in the audio signal, the vehicle lights corresponding to each audio sub-signal are controlled. The vehicle lights are controlled according to the music features of the audio signal, so that music and vehicle lights are associated, and their matching degree is high. While playing music, the vehicle lights change along with the music, thereby improving the user experience.
[0041] In one implementation manner, the control of the vehicle lights includes the control of the brightness of the vehicle lights. Therefore, please refer to Figure 2 , step S120 may include the following steps:
[0042] Step S121, according to the audio sub-signals of the multiple frequency bands included in the audio signal, obtain the brightness of the vehicle lights corresponding to each audio sub-signal.
[0043] As a way, each audio sub-signal in the audio signal is processed to obtain a processing result corresponding to each audio sub-signal. Then, according to the processing result corresponding to each audio sub-signal and the first mapping relationship, the brightness of the vehicle lights corresponding to this processing result is obtained, where the first mapping relationship includes the corresponding relationship between the processing result corresponding to the audio sub-signal and the brightness of the vehicle lights. Exemplarily, the value range of the processing result is a value between 0 and 1, and the value range of the vehicle light brightness is between 0 and 100. Then, each value in the corresponding range of the processing result corresponds to each value in the corresponding range of the vehicle light brightness. For example, if the processing result is 0.3, then the corresponding vehicle light brightness is 30. Another example, if the processing result is 0.5, then the corresponding vehicle light brightness is 50.
[0044] For example, the processing of the audio sub-signals can be carried out in the following manner: downsampling each of the audio sub-signals in the audio signal to obtain the downsampled audio sub-signal. Through downsampling, some features are retained from the audio sub-signal to obtain the downsampled audio sub-signal. Specifically, each audio sub-signal in the audio signal is downsampled according to the downsampling coefficient. Wherein, f h is the highest frequency of the downsampled audio sub-signal, f s is the sampling rate corresponding to this audio sub-signal; D is the downsampling coefficient corresponding to this audio sub-signal.
[0045] Again for example, the processing of the audio signal can be carried out in the following manner: performing at least one of frame processing, energy calculation, normalization processing, and smoothing processing on each of the audio sub-signals in the audio signal to obtain the processing result corresponding to each audio sub-signal.
[0046] Through the above downsampling process, the downsampled audio sub-signal is obtained, and then the downsampled audio sub-signal is used for subsequent calculations, which can reduce the computing power, reduce the latency, and ensure the synchronization of audio and lighting. Through research, after downsampling, the processor occupancy rate of the test vehicle is only 0.3%, and the calculation amount of each frame of audio sub-signal only requires about 50 microseconds. The peak physical memory occupancy of the audio signal is only 2928 KB, and the occupancy of the read-only memory (ROM) is only 58 K. Moreover, after long-term operation, the processor and memory do not increase significantly, and the resource occupancy is stable.
[0047] It should be noted that the processing method for each audio sub-signal can be any combination of one or more of downsampling, frame processing, normalization processing, and smoothing processing. For example, the processing method for the audio sub-signal can be to first perform downsampling and then perform frame processing. Another example is that the processing method for the audio sub-signal can be to first perform downsampling and then perform smoothing processing. Another example is that the processing method for the audio signal can be to sequentially perform downsampling, frame processing, energy calculation, normalization processing, and smoothing processing.
[0048] Exemplarily, if the processing method is frame processing, then each of the audio sub-signals in the audio signal is frame-processed to divide each audio sub-signal into multiple frames of audio frame signals, and the processing result corresponding to each audio sub-signal is obtained. It can be understood that the processing result corresponding to each audio sub-signal is the multiple frames of audio frame signals.
[0049] Exemplarily, the processing methods are frame processing, energy averaging processing, and normalization processing in sequence. As follows, perform frame processing on each audio sub-signal in the audio signal, and divide each audio sub-signal into multiple frames of audio frame signals. Calculate the average energy value of each frame of audio frame signal in the multiple frames of audio frame signals. The average energy value E of each frame of audio sub-signal can be calculated by the following formula:
[0050]
[0051] where E is the average energy value, L is the frame length of the audio sub-signal, and x(n) is the data of one frame of audio frame signal. According to the average energy value of each frame of audio frame signal in the multiple frames of audio frame signals, perform normalization processing on each frame of audio frame signal to obtain the processing result corresponding to each audio sub-signal. It can be understood that performing normalization on all audio frame signals of an audio sub-signal, the normalization result is the processing result.
[0052] Exemplarily, on the basis of the above, the processing method further includes smoothing processing. For example, according to the average energy value of each frame of audio frame signal in the multiple frames of audio frame signals, perform normalization processing on each frame of audio frame signal to obtain each frame of normalized audio frame signal. Perform smoothing processing on each frame of normalized audio frame signal to obtain the processing result corresponding to each audio sub-signal. The smoothing processing can be performed by the following formula:
[0053] y(n) = p(n - 1)*a + p(n)*(1 - a)
[0054] where p(n) is the audio frame signal of the current frame after normalization, p(n - 1) is the audio frame signal of the previous frame of p(n), and a is the smoothing coefficient. The larger the smoothing coefficient, the smaller the influence of the current frame, and the more obvious the smoothing effect. It can be understood that the processing result is the smoothing processing result. y(n) is the result after smoothing processing of p(n).
[0055] Exemplarily, taking the processing methods of the audio sub-signal in the audio signal as downsampling processing, frame processing, energy calculation, normalization processing, and smoothing processing in sequence as an example for explanation, the processing methods of the audio sub-signals in multiple frequency bands included in the audio signal are similar. Here, taking the processing of an audio sub-signal in one frequency band as an example for explanation. Perform downsampling processing on the audio sub-signal according to the downsampling coefficient corresponding to the audio sub-signal to obtain the downsampled audio sub-signal. Secondly, perform frame processing on the downsampled audio sub-signal, that is, divide the audio sub-signal into multiple frames to obtain multiple frames of audio frame signals. Then perform energy calculation on the audio sub-signal after frame processing, and calculate the average energy value E of each frame of audio frame signal. For example, the energy calculation is performed by the following formula:
[0056]
[0057] Among them, E is the average energy value, L is the frame length, and x(n) is the data of one frame of audio sub-signal. In order to control the final brightness output within a preset range, for example, the preset range is 0 to 100, the audio sub-signal is normalized to obtain the normalized audio sub-signal p(n). For example, determine the maximum energy value maxE(n) in the audio sub-signal. Since the sound source signal is played in real time, only the maximum energy value maxE(n) can be obtained from the played part. As the sound source signal is played, the maximum energy value may change and be updated. The maximum energy value must be the one with the largest energy value among the played audio sub-signals. The normalization of the audio sub-signal can be achieved through the following formula:
[0058]
[0059] Among them, p(n) is the normalized audio sub-signal, P(n) is the audio sub-signal, and maxPow(n) is the audio sub-signal corresponding to the current maximum energy value. Then, the normalized audio sub-signal is smoothed to obtain data with less noise. The smoothing can be performed through the following formula:
[0060] y(n) = p(n - 1) * a + p(n) * (1 - a)
[0061] Among them, p(n) is the audio frame signal of the current frame after normalization, p(n - 1) is the audio frame signal of the previous frame of p(n), and a is the smoothing coefficient. The larger the smoothing coefficient, the smaller the influence of the current frame, and the more obvious the smoothing effect. Finally, a dynamic compression algorithm can also be used to compress the smoothed audio sub-signal to complete the processing of the audio sub-signal and obtain the processing result. It can be understood that the processing result is the compressed audio sub-signal here.
[0062] Optionally, the smoothing coefficient a can be set through an electronic device associated with the vehicle, or by the user through the center console screen of the vehicle.
[0063] It should be noted that when processing different audio sub-signals in the audio signal, the parameters of each processing method may be different. For example, when performing downsampling processing on audio sub-signals in different frequency bands, the downsampling coefficients corresponding to the audio sub-signals in different frequency bands can be different.
[0064] Step S122: Control the vehicle lights corresponding to each audio sub-signal according to the vehicle light brightness corresponding to each audio sub-signal.
[0065] It should be noted that as the sound source signal is played, the audio sub-signal is constantly changing. The brightness of the vehicle lamp controlled according to the constantly changing audio sub-signal is also constantly changing, presenting the effect that the vehicle lamp changes with the music.
[0066] In this embodiment, the brightness of the corresponding vehicle lamp is controlled by the audio sub-signal, which improves the richness of the vehicle lamp show when the vehicle performs the vehicle lamp show, thereby enhancing the user experience.
[0067] In another embodiment, the control of the vehicle lamp includes the control of the color of the vehicle lamp. Therefore, please refer to Figure 3 , step S120 may include the following steps:
[0068] Step S123: Obtain the vehicle lamp color corresponding to each audio sub-signal according to the audio sub-signals of the multiple frequency bands included in the audio signal.
[0069] For example, the audio signal includes audio sub-signals of n frequency bands, where n is a positive integer. As a way, first convert the audio sub-signals of the n frequency bands from the time domain to the frequency domain to obtain n audio sub-signals in the frequency domain. For example, perform Fourier transform on the audio sub-signals of the n frequency bands to convert the time domain to the frequency domain and obtain n audio sub-signals in the frequency domain. Then multiply each audio sub-signal in the frequency domain by m Mel filter banks to obtain m groups of energy values corresponding to each audio sub-signal, where m is a positive integer. Determine the target energy value from the m groups of energy values. The target energy value can be the maximum value among the m groups of energy values, or any value among the m groups of energy. Then, according to the target energy value and the second mapping relationship, determine the vehicle lamp color corresponding to each audio sub-signal, where the second mapping relationship includes the corresponding relationship between the target energy value and the vehicle lamp color.
[0070] As another way, fixed colors can be set. For example, for the low-frequency audio sub-signal, red is preset to correspond to it, and for the high-frequency audio sub-signal, white is preset to correspond to it. According to the set corresponding relationship, obtain the vehicle lamp color corresponding to the audio sub-signal.
[0071] As another way, according to the audio sub-signals of the multiple frequency bands included in the audio signal, obtain the headlight brightness corresponding to each audio sub-signal. According to the headlight brightness corresponding to each audio sub-signal, obtain the headlight color corresponding to each audio sub-signal. For example, preset the headlight color sequence of the headlight corresponding to each audio sub-signal. When the headlight brightness corresponding to each audio sub-signal reaches the preset brightness threshold, switch to the next headlight color according to the headlight color sequence, and this color is the headlight color corresponding to each audio sub-signal. As another example, preset the corresponding relationship between different brightness ranges and multiple headlight colors, with a one-to-one correspondence between the brightness range and the headlight color. Obtain the brightness range to which the headlight brightness corresponding to each audio sub-signal belongs, and according to the foregoing corresponding relationship, obtain the headlight color corresponding to this brightness range, and this headlight color is the headlight color corresponding to the audio sub-signal.
[0072] In this way, according to the combination of the headlight color and the headlight brightness, the matching degree between the light and the music is higher. During the light show, the music and the light cooperate with each other, with a sense of dynamics, which can enhance the visual effect of the light show and thus improve the user experience.
[0073] As another way, the headlight color sequence can be preset, and the headlight color can be switched according to the preset time and the headlight color sequence. Optionally, a preset duration t can be set, and the number of frames f of the audio sub-signal within the time t is calculated. The number of frames f is calculated by the following formula: f = L * t / fs, where f is the number of frames, L is the frame length, t is the preset duration, and fs is the sampling rate.
[0074] As another way, the headlight color sequence can be preset, and a preset number of frames can be preset, and the headlight color can be switched according to the headlight color sequence.
[0075] Step S124: Control the headlight corresponding to each audio sub-signal according to the headlight color corresponding to each audio sub-signal.
[0076] In this embodiment, the corresponding headlight color is controlled by the audio sub-signal, which improves the richness of the headlight show during the vehicle's headlight show and thus improves the user experience.
[0077] Optionally, the method further includes: obtaining a multi-channel music source signal on the vehicle. For example, the number of channels is 2.0, 5.1, 7.1.4, etc.; calculating the average value of the music source signals of all channels to obtain the audio source signal.
[0078] It is not difficult to understand that by averaging the multi-channel music source signal, the obtained audio source signal is single-channel. Converting the multi-channel music source signal into a single-channel audio source signal facilitates subsequent processing and analysis of the audio to save computing resources.
[0079] Please refer to Figure 4 , the vehicle includes an audio system, an in-vehicle music source, and a light source. The in-vehicle music source processes the aforementioned method according to the ambient light algorithm, controls the brightness of different light sources and the color of vehicle lights, and at the same time controls the audio system to play the in-vehicle music source.
[0080] Optionally, in order to give users a higher degree of freedom for the lighting effect, we extract the maximum brightness, minimum brightness, smoothing coefficient, filter order, and filter cut-off frequency in the low-frequency, mid-high frequency, and high-frequency regions into a configuration file, and the lighting effect can be adjusted in real time by modifying the configuration file in real time.
[0081] The present disclosure also provides a vehicle light control method. Please refer to Figure 5 , the vehicle light control method includes: the music source signal is processed to obtain a sound source signal. For example, the multi-channel music source signal is averaged to obtain a single-channel sound source signal. The sound source signal is filtered through a low-pass filter, a band-pass filter, and a high-pass filter respectively to obtain an audio signal, and the audio signal includes audio sub-signals of multiple frequency bands. Then, energy calculation, normalization processing, and dynamic range compression processing are respectively performed on each audio sub-signal in the audio sub-signals of multiple frequency bands to obtain a processing result. Through the light show matching logic, according to the processing result and the brightness strategy, the brightness corresponding to the audio sub-signal is obtained, and the vehicle lights corresponding to the audio sub-signal are controlled by the brightness. Through the light show matching logic, according to the processing result and the color strategy, the vehicle light color corresponding to the audio sub-signal is obtained, and the vehicle lights corresponding to the audio sub-signal are obtained through the vehicle light color.
[0082] Among them, the drumbeat feature in the brightness strategy refers to obtaining the brightness according to the audio sub-signal corresponding to the low frequency. The accompaniment feature refers to obtaining the brightness according to the audio sub-signal corresponding to the low and mid frequencies. The high-frequency feature refers to obtaining the brightness according to the audio sub-signal corresponding to the high frequency. The full-frequency feature refers to directly obtaining the brightness according to the sound source signal.
[0083] In the color strategy, the fixed color means that fixed colors are set for different audio sub-signals. Changing with time means that a sequence of headlight colors is preset, and the headlight colors are switched according to the preset time and the sequence of headlight colors. Threshold judgment means that a sequence of headlight colors corresponding to each audio sub-signal is preset. When the brightness of the headlight corresponding to each audio sub-signal reaches the preset brightness threshold, the headlight color is switched to the next headlight color according to the sequence of headlight colors, and this color is the headlight color corresponding to each audio sub-signal. Energy mapping means that a corresponding relationship between different brightness ranges and multiple headlight colors is preset, and there is a one-to-one correspondence between the brightness ranges and the headlight colors. The brightness range to which the brightness of the headlight corresponding to each audio sub-signal belongs is obtained, and according to the foregoing corresponding relationship, the headlight color corresponding to this brightness range is obtained, and this headlight color is the headlight color corresponding to the audio sub-signal. Pitch mapping means that first, the audio sub-signals in the n frequency bands are transformed from the time domain to the frequency domain to obtain n audio sub-signals in the frequency domain. For example, the audio sub-signals in the n frequency bands are subjected to Fourier transform to transform the time domain into the frequency domain to obtain n audio sub-signals in the frequency domain. Then each audio sub-signal in the frequency domain is multiplied by m Mel filter banks to obtain m sets of energy values corresponding to each audio sub-signal, where m is a positive integer. A target energy value is determined from the m sets of energy values. The target energy value can be the maximum value among the m sets of energy values, or any value among the m sets of energy. Then, according to the target energy value and the second mapping relationship, the headlight color corresponding to each audio sub-signal is determined, where the second mapping relationship includes the corresponding relationship between the target energy value and the headlight color.
[0084] Based on the same inventive concept, the present disclosure provides a headlight control device. Please refer to Figure 6 , and the headlight control device 200 includes:
[0085] A filtering module 210, configured to filter the sound source signal on the vehicle to obtain an audio signal, where the audio signal includes audio sub-signals in multiple frequency bands;
[0086] A control module 220, configured to control the headlight corresponding to each audio sub-signal according to the audio sub-signals in the multiple frequency bands included in the audio signal.
[0087] Optionally, the control module 220 includes:
[0088] A headlight brightness acquisition module, configured to obtain the brightness of the headlight corresponding to each audio sub-signal according to the audio sub-signals in the multiple frequency bands included in the audio signal;
[0089] A first control module, configured to control the headlight corresponding to each audio sub-signal according to the brightness of the headlight corresponding to each audio sub-signal.
[0090] Optionally, the headlight brightness acquisition module includes:
[0091] A processing module for processing each audio sub-signal in the audio signal to obtain a processing result corresponding to each audio sub-signal;
[0092] A first mapping module for obtaining the headlight brightness corresponding to the processing result according to the processing result corresponding to each audio sub-signal and a first mapping relationship, where the first mapping relationship includes the correspondence between the processing result corresponding to the audio sub-signal and the headlight brightness.
[0093] Optionally, the processing module includes:
[0094] A first processing module for performing downsampling processing on each audio sub-signal in the audio signal to obtain a downsampled audio sub-signal.
[0095] Optionally, the first processing module includes: a downsampling module for performing downsampling processing on each audio sub-signal in the audio signal according to a downsampling coefficient; where
[0096] f h is the highest frequency of the downsampled audio sub-signal, f s is the sampling rate corresponding to this audio sub-signal; D is the downsampling coefficient corresponding to this audio sub-signal.
[0097] Optionally, the processing module includes:
[0098] A second processing module for performing frame splitting processing on each audio sub-signal in the audio signal, dividing each audio sub-signal into multiple frame audio frame signals, and obtaining a processing result corresponding to each audio sub-signal.
[0099] Optionally, the second processing module is specifically configured to perform frame splitting processing on each audio sub-signal in the audio signal, divide each audio sub-signal into multiple frame audio frame signals; calculate the average energy value of each frame audio frame signal in the multiple frame audio frame signals; and perform normalization processing on each frame audio frame signal according to the average energy value of each frame audio frame signal in the multiple frame audio frame signals to obtain a processing result corresponding to each audio sub-signal.
[0100] Optionally, the second processing module is specifically configured to perform normalization processing on each frame audio frame signal according to the average energy value of each frame audio frame signal in the multiple frame audio frame signals to obtain a normalized each frame audio frame signal; and perform smoothing processing on the normalized each frame audio frame signal to obtain a processing result corresponding to each audio sub-signal.
[0101] Optionally, the control module 220 includes:
[0102] A vehicle lamp color acquisition module, configured to obtain a vehicle lamp color corresponding to each audio sub-signal according to the audio sub-signals of multiple frequency bands included in the audio signal;
[0103] A second control module, configured to control the vehicle lamp corresponding to each audio sub-signal according to the vehicle lamp color corresponding to each audio sub-signal.
[0104] Optionally, the audio signal includes audio sub-signals of n frequency bands, and the vehicle lamp color acquisition module includes:
[0105] A conversion module, configured to convert the audio sub-signals of the n frequency bands from the time domain to the frequency domain to obtain n audio sub-signals in the frequency domain;
[0106] A multiplication module, configured to multiply each audio sub-signal in the frequency domain by m Mel filter banks to obtain m groups of energy values corresponding to each audio sub-signal;
[0107] A determination module, configured to determine a target energy value from the m groups of energy values;
[0108] A second mapping module, configured to determine the vehicle lamp color corresponding to each audio sub-signal according to the target energy value and a second mapping relationship, where the second mapping relationship includes the corresponding relationship between the target energy value and the vehicle lamp color.
[0109] Optionally, the vehicle lamp color acquisition module includes:
[0110] A first vehicle lamp color acquisition module, configured to obtain a vehicle lamp brightness corresponding to each audio sub-signal according to the audio sub-signals of multiple frequency bands included in the audio signal;
[0111] A second vehicle lamp color acquisition module, configured to obtain a vehicle lamp color corresponding to each audio sub-signal according to the vehicle lamp brightness corresponding to each audio sub-signal.
[0112] Optionally, the filtering module 210 includes:
[0113] A first filtering module, configured to filter the sound source signal on the vehicle through a first filter to obtain an audio sub-signal of a first frequency band;
[0114] A second filtering module, configured to filter the sound source signal on the vehicle through a second filter to obtain an audio sub-signal of a second frequency band;
[0115] A third filtering module is configured to filter the sound source signal on the vehicle through a third filter to obtain an audio sub-signal in a third frequency band, where the frequency of the audio sub-signal in the first frequency band is lower than that of the audio sub-signal in the second frequency band, and the frequency of the audio sub-signal in the second frequency band is lower than that of the audio sub-signal in the third frequency band;
[0116] A fourth filtering module is configured to obtain the audio signal according to the audio sub-signal in the first frequency band, the audio sub-signal in the second frequency band, and the audio sub-signal in the third frequency band.
[0117] Optionally, the vehicle lamp control device 200 further includes:
[0118] A music source signal acquisition module is configured to acquire a multi-channel music source signal on the vehicle;
[0119] A sound source signal acquisition module is configured to calculate an average value of the music source signals of all channels to obtain the sound source signal.
[0120] Regarding the vehicle lamp control device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.
[0121] The present disclosure also provides a computer-readable storage medium, on which computer program instructions are stored, and when the program instructions are executed by a processor, the steps of the vehicle lamp control method provided by the present disclosure are implemented.
[0122] Figure 7 is a block diagram of a vehicle shown according to an exemplary embodiment. For example, the vehicle 600 may be a hybrid vehicle, or a non-hybrid vehicle, an electric vehicle, a fuel cell vehicle, or other types of vehicles. The vehicle 600 may be an autonomous vehicle, a semi-autonomous vehicle, or a non-autonomous vehicle.
[0123] Please refer to Figure 7 , the vehicle 600 may include various subsystems. For example, an infotainment system 610, a perception system 620, a decision control system 630, a drive system 640, and a computing platform 650. Among them, the vehicle 600 may further include more or fewer subsystems, and each subsystem may include multiple components. In addition, each subsystem and each component of the vehicle 600 may be interconnected by wired or wireless means.
[0124] In some embodiments, the infotainment system 610 may include a communication system, an entertainment system, a navigation system, and the like.
[0125] The perception system 620 may include several types of sensors for sensing information about the environment around the vehicle 600. For example, the perception system 620 may include a global positioning system (the global positioning system may be a GPS system, or a Beidou system, or other positioning systems), an inertial measurement unit (IMU), lidar, millimeter-wave radar, ultrasonic radar, and a camera device.
[0126] The decision-making and control system 630 may include a computing system, a vehicle controller, a steering system, an accelerator, and a braking system.
[0127] The drive system 640 may include components that provide motive power for the vehicle 600. In one embodiment, the drive system 640 may include an engine, an energy source, a powertrain, and wheels. The engine may be one or a combination of an internal combustion engine, an electric motor, and an air compression engine. The engine is capable of converting the energy provided by the energy source into mechanical energy.
[0128] Some or all of the functions of the vehicle 600 are controlled by the computing platform 650. The computing platform 650 may include at least one processor 651 and a memory 652, and the processor 651 may execute instructions 653 stored in the memory 652.
[0129] The processor 651 may be any conventional processor, such as a commercially available CPU. The processor may also include, for example, a Graphic Process Unit (GPU), a Field Programmable Gate Array (FPGA), a System on Chip (SOC), an Application Specific Integrated Circuit (ASIC), or a combination thereof.
[0130] The memory 652 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.
[0131] In addition to the instructions 653, the memory 652 may also store data, such as road maps, route information, data on the position, direction, speed, etc. of the vehicle. The data stored in the memory 652 can be used by the computing platform 650.
[0132] In an embodiment of the present disclosure, the processor 651 may execute the instruction 653 to complete all or part of the steps of the above-described vehicle headlight control method.
[0133] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program executable by a programmable device, and the computer program has a code portion for executing the above-described vehicle headlight control method when executed by the programmable device.
[0134] Those skilled in the art will readily conceive of other implementations of the present disclosure after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.
[0135] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.
Claims
1. A vehicle lamp control method, characterized in that, The method includes: Filtering the sound source signal on the vehicle to obtain an audio signal, where the audio signal includes audio sub-signals in multiple frequency bands; Controlling the vehicle lights corresponding to each audio sub-signal according to the audio sub-signals in the multiple frequency bands included in the audio signal.
2. The method according to claim 1, wherein The controlling the vehicle lights corresponding to each audio sub-signal according to the audio sub-signals in the multiple frequency bands included in the audio signal includes: Obtaining the brightness of the vehicle lights corresponding to each audio sub-signal according to the audio sub-signals in the multiple frequency bands included in the audio signal; Controlling the vehicle lights corresponding to each audio sub-signal according to the brightness of the vehicle lights corresponding to each audio sub-signal.
3. The method according to claim 2, wherein The obtaining the brightness of the vehicle lights corresponding to each audio sub-signal according to the audio sub-signals in the multiple frequency bands included in the audio signal includes: Processing each audio sub-signal in the audio signal to obtain a processing result corresponding to each audio sub-signal; Obtaining the brightness of the vehicle lights corresponding to the processing result according to the processing result corresponding to each audio sub-signal and a first mapping relationship, where the first mapping relationship includes the corresponding relationship between the processing result corresponding to the audio sub-signal and the brightness of the vehicle lights.
4. The method according to claim 3, characterized in that, The processing each audio sub-signal in the audio signal to obtain a processing result corresponding to each audio sub-signal includes: Performing downsampling processing on each audio sub-signal in the audio signal to obtain a downsampled audio sub-signal.
5. The method according to claim 4, wherein The performing downsampling processing on each audio sub-signal in the audio signal includes: Downsample each audio sub-signal in the audio signal according to the downsampling factor; wherein, f h is the highest frequency of the downsampled audio sub-signal, f s is the sampling rate corresponding to this audio sub-signal; D is the downsampling coefficient corresponding to this audio sub-signal.
6. The method according to claim 3, wherein The processing each audio sub-signal in the audio signal to obtain a processing result corresponding to each audio sub-signal includes: Performing framing processing on each audio sub-signal in the audio signal, dividing each audio sub-signal into multiple frames of audio frame signals, and obtaining a processing result corresponding to each audio sub-signal.
7. The method according to claim 3, characterized in that The performing framing processing on each audio sub-signal in the audio signal, dividing each audio sub-signal into multiple frames of audio frame signals, and obtaining a processing result corresponding to each audio sub-signal includes: Performing framing processing on each audio sub-signal in the audio signal, dividing each audio sub-signal into multiple frames of audio frame signals; Calculating the average energy value of each frame of audio frame signal in the multiple frames of audio frame signals; Normalizing each frame of audio frame signal according to the average energy value of each frame of audio frame signal in the multiple frames of audio frame signals to obtain a processing result corresponding to each audio sub-signal.
8. The method according to claim 7, characterized in that, The normalizing each frame of audio frame signal according to the average energy value of each frame of audio frame signal in the multiple frames of audio frame signals to obtain a processing result corresponding to each audio sub-signal includes: Normalizing each frame of audio frame signal according to the average energy value of each frame of audio frame signal in the multiple frames of audio frame signals to obtain a normalized each frame of audio frame signal; Performing smoothing processing on the normalized each frame of audio frame signal to obtain a processing result corresponding to each audio sub-signal.
9. The method according to claim 1, wherein Controlling the vehicle lights corresponding to each audio sub-signal according to the audio sub-signals of the multiple frequency bands included in the audio signal includes: Obtaining the vehicle light color corresponding to each audio sub-signal according to the audio sub-signals of the multiple frequency bands included in the audio signal; Controlling the vehicle lights corresponding to each audio sub-signal according to the vehicle light color corresponding to each audio sub-signal.
10. The method according to claim 9, wherein The audio signal includes audio sub-signals of n frequency bands. Obtaining the vehicle light color corresponding to each audio sub-signal according to the audio sub-signals of the multiple frequency bands included in the audio signal includes: Converting the audio sub-signals of the n frequency bands from the time domain to the frequency domain to obtain n audio sub-signals in the frequency domain; Multiplying each audio sub-signal in the frequency domain by m Mel filter banks to obtain m sets of energy values corresponding to each audio sub-signal; Determining a target energy value from the m sets of energy values; Determining the vehicle light color corresponding to each audio sub-signal according to the target energy value and a second mapping relationship, where the second mapping relationship includes the corresponding relationship between the target energy value and the vehicle light color.
11. The method according to claim 9, wherein Obtaining the vehicle light color corresponding to each audio sub-signal according to the audio sub-signals of the multiple frequency bands included in the audio signal includes: Obtaining the vehicle light brightness corresponding to each audio sub-signal according to the audio sub-signals of the multiple frequency bands included in the audio signal; Obtaining the vehicle light color corresponding to each audio sub-signal according to the vehicle light brightness corresponding to each audio sub-signal.
12. The method according to any one of claims 1 to 11, characterized in that Filtering the audio source signal on the vehicle to obtain an audio signal includes: Filtering the audio source signal on the vehicle through a first filter to obtain an audio sub-signal of a first frequency band; Filtering the audio source signal on the vehicle through a second filter to obtain an audio sub-signal of a second frequency band; Filtering the audio source signal on the vehicle through a third filter to obtain an audio sub-signal of a third frequency band, where the frequency of the audio sub-signal of the first frequency band is lower than the frequency of the audio sub-signal of the second frequency band, and the frequency of the audio sub-signal of the second frequency band is lower than the frequency of the audio sub-signal of the third frequency band; Obtaining the audio signal according to the audio sub-signal of the first frequency band, the audio sub-signal of the second frequency band, and the audio sub-signal of the third frequency band.
13. The method according to any one of claims 1 to 11, characterized in that, Before filtering the audio source signal on the vehicle to obtain an audio signal, it further includes: Obtaining a multi-channel music source signal on the vehicle; Calculating the average value of the music source signals of all channels to obtain the audio source signal.
14. A vehicle lamp control device, characterized in that, The device includes: A filtering module for filtering the audio source signal on the vehicle to obtain an audio signal, where the audio signal includes audio sub-signals of multiple frequency bands; A control module for controlling the vehicle lights corresponding to each audio sub-signal according to the audio sub-signals of the multiple frequency bands included in the audio signal.
15. A vehicle, characterized in that, It includes: A processor; A memory for storing instructions executable by the processor; Wherein, when the processor is configured to execute the instructions, it implements the steps of the method according to any one of claims 1 to 13.
16. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the program instruction is executed by a processor, it implements the steps of the method according to any one of claims 1 to 13.