Summary of the invention
Technical matters to be solved by this invention provides method, image that a kind of image dubs in background music dub in background music device and image playing device, in order to according to picture characteristics, selects and dubbing in background music that image is complementary.
For solving the problems of the technologies described above, it is as follows to the invention provides scheme:
The method that a kind of image is dubbed in background music comprises:
Steps A is determined the tone changes in temperature characteristic of image;
Step B according to predetermined tone changes in temperature characteristic and first corresponding relation between the style school, determines the first style school of the tone changes in temperature characteristic correspondence of described image;
Step C, from predetermined a plurality of melodies, the melody that selection and the described first style school are complementary is as dubbing in background music of described image.
Preferably, in the method that above-mentioned image is dubbed in background music, in the described steps A,, determine the tone changes in temperature characteristic of described image further according to the blue composition in the image and the size of yellow composition.
Preferably, in the method that above-mentioned image is dubbed in background music,
Also comprise in the described steps A:, calculate the average acutance of described image according to the brightness of pixel in the described image;
Also comprise among the described step B:, determine first rhythm of described average acutance correspondence according to predetermined acutance and second corresponding relation between the rhythm;
Among the described step C, further select the melody that all mates with described first rhythm and the described first style school, as dubbing in background music of described image.
Preferably, in the method that above-mentioned image is dubbed in background music, also comprise after the described step C:
According to the brightness of the described image that obtains in advance, determine described pad value of dubbing in background music, wherein, described pad value reduces with the increase of the brightness of described image; And when playing described dubbing in background music, described loudness of dubbing in background music is carried out overall attenuation according to described pad value.
Preferably, in the method that above-mentioned image is dubbed in background music, also comprise after the described step C:
According to the contrast of the described image that obtains in advance and predetermined contrast reference value, determine that a loudness adjusts parameter, wherein, during greater than described contrast reference value, it is positive number that described loudness is adjusted parameter in the contrast of described image; During less than described contrast reference value, it is negative that described loudness is adjusted parameter in the contrast of described image;
When the dubbing in background music of playing image, the size of the initial loudness of more described frame signal of dubbing in background music and a predetermined mean loudness reference value: in the initial loudness of described frame signal of dubbing in background music during greater than described mean loudness reference value, adjust parameter with the initial loudness of described frame signal and described loudness with value be desired value, adjust the loudness of described frame signal; When the initial loudness of described frame signal of dubbing in background music was less than or equal to described mean loudness reference value, deducting described loudness with the initial loudness of described frame signal, to adjust the difference that parameter obtains be desired value, adjusts the loudness of described frame signal.
Preferably, in the method that above-mentioned image is dubbed in background music, also comprise after the described step C:
According to the tone changes in temperature characteristic of described image, specify described musical instrument accompaniment of dubbing in background music.
The present invention also provides a kind of image device of dubbing in background music, and comprising:
Image analyzing unit is used for determining the tone changes in temperature characteristic of described image;
The characteristic of dubbing in background music determining unit is used for determining the first style school of the tone changes in temperature characteristic correspondence of described image according to predetermined tone changes in temperature characteristic and first corresponding relation between the style school;
The selected cell of dubbing in background music is used for from predetermined a plurality of melodies, selects the melody that is complementary with the described first style school, as dubbing in background music of described image.
Preferably, above-mentioned image is dubbed in background music in the device,
Described image analyzing unit comprises:
The tone analytic unit is used for according to the blue composition of image and the size of yellow composition, determines the tone changes in temperature characteristic of described image.
Preferably, above-mentioned image is dubbed in background music in the device,
Described image analyzing unit also comprises:
The acutance analytic unit is used for the brightness according to described image pixel, calculates the average acutance of described image;
The described characteristic determining unit of dubbing in background music also is used for determining first rhythm of described average acutance correspondence according to predetermined acutance and second corresponding relation between the rhythm;
The described selected cell of dubbing in background music is further used for selecting the melody that all mates with described first rhythm and the described first style school, as dubbing in background music of described image.
Preferably, above-mentioned image is dubbed in background music in the device,
The described characteristic determining unit of dubbing in background music also is used for the brightness according to the described image that obtains in advance, determines described pad value of dubbing in background music, and wherein, described pad value reduces with the increase of the brightness of described image;
The described image device of dubbing in background music also comprises:
Playing control unit is used for according to described pad value described loudness of dubbing in background music being carried out overall attenuation when playing described dubbing in background music.
Preferably, above-mentioned image is dubbed in background music in the device,
The described characteristic determining unit of dubbing in background music, also be used for contrast and predetermined contrast reference value, determine loudness adjustment parameter, wherein according to the described image that obtains in advance, during greater than described contrast reference value, it is positive number that described loudness is adjusted parameter in the contrast of described image; During less than described contrast reference value, it is negative that described loudness is adjusted parameter in the contrast of described image;
Described playing control unit, also be used for when the dubbing in background music of playing image, the size of the initial loudness of more described frame signal of dubbing in background music and a predetermined mean loudness reference value: in the initial loudness of described frame signal of dubbing in background music during greater than described mean loudness reference value, adjust parameter with the initial loudness of described frame signal and described loudness with value be desired value, adjust the loudness of described frame signal; When the initial loudness of described frame signal of dubbing in background music was less than or equal to described mean loudness reference value, deducting described loudness with the initial loudness of described frame signal, to adjust the difference that parameter obtains be desired value, adjusts the loudness of described frame signal.
The present invention also provides a kind of image playing device, comprising:
The image broadcast unit is used to play predetermined picture;
Image analyzing unit is used for determining the tone changes in temperature characteristic of described image;
The characteristic of dubbing in background music determining unit is used for determining the first style school of the tone changes in temperature characteristic correspondence of described image according to predetermined tone changes in temperature characteristic and first corresponding relation between the style school;
The selected cell of dubbing in background music is used for from predetermined a plurality of melodies, selects the melody that is complementary with the described first style school, as dubbing in background music of described image;
The broadcast unit of dubbing in background music is used to play described image the dubbing in background music that the unit selects of dubbing in background music.
Preferably, in the above-mentioned image playing device,
Described image analyzing unit comprises:
The tone analytic unit is used for according to the blue composition of image and the size of yellow composition, determines the tone changes in temperature characteristic of described image.
Preferably, in the above-mentioned image playing device,
Described image analyzing unit also comprises:
The acutance analytic unit is used for the brightness according to described image pixel, calculates the average acutance of described image;
The described characteristic determining unit of dubbing in background music also is used for determining first rhythm of described average acutance correspondence according to predetermined acutance and second corresponding relation between the rhythm;
The described selected cell of dubbing in background music is further used for selecting the melody that all mates with described first rhythm and the described first style school, as dubbing in background music of described image.
Preferably, in the above-mentioned image playing device,
The described characteristic determining unit of dubbing in background music also is used for the brightness according to the described image that obtains in advance, determines described pad value of dubbing in background music, and wherein, described pad value reduces with the increase of the brightness of described image;
The described broadcast unit of dubbing in background music comprises:
Playing control unit is used for according to described pad value described loudness of dubbing in background music being carried out overall attenuation when playing described dubbing in background music.
Preferably, in the above-mentioned image playing device,
The described characteristic determining unit of dubbing in background music, also be used for contrast and predetermined contrast reference value, determine loudness adjustment parameter, wherein according to the described image that obtains in advance, during greater than described contrast reference value, it is positive number that described loudness is adjusted parameter in the contrast of described image; During less than described contrast reference value, it is negative that described loudness is adjusted parameter in the contrast of described image;
Described playing control unit, also be used for when the dubbing in background music of playing image, the size of the initial loudness of more described frame signal of dubbing in background music and a predetermined mean loudness reference value: in the initial loudness of described frame signal of dubbing in background music during greater than described mean loudness reference value, adjust parameter with the initial loudness of described frame signal and described loudness with value be desired value, adjust the loudness of described frame signal; When the initial loudness of described frame signal of dubbing in background music was less than or equal to described mean loudness reference value, deducting described loudness with the initial loudness of described frame signal, to adjust the difference that parameter obtains be desired value, adjusts the loudness of described frame signal.
From the above as can be seen, the method that image provided by the invention is dubbed in background music, image dub in background music device and image playing device, utilize the information such as brightness, contrast, color harmony acutance of image, convert loudness, fluctuating, school and the rhythm of melody to, and then dubbing in background music of conforming to picture characteristics of selection, and the broadcast that can utilize these information Control to dub in background music, make it to coordinate more, thereby realized the function of dubbing in background music automatically for image with characteristics of image.
Embodiment
The present invention proposes method and device that a kind of image is dubbed in background music, come to dub in background music automatically according to the feature of image for image, its core concept is: the feature such as brightness, contrast, color harmony acutance of utilizing image, convert loudness, fluctuating, school and the rhythm of melody to, and then dubbing in background music of conforming to picture characteristics of selection, and can further utilize these information to obtain the parameter of signal processing algorithm, carry out signal Processing to dubbing in background music, make it to coordinate more with characteristics of image, thereby realized the function of dubbing in background music automatically, improved the impression of vision, the sense of hearing for image.Below with reference to accompanying drawing, the present invention is described further by specific embodiment.
The embodiment of the invention is that example describes with the image of yuv format.In the yuv format, the brightness of Y representation in components pixel, U, V component be the colourity of remarked pixel point then.The image of different-format can be changed according to certain rule usually, for example, in the image of rgb format, the R of each pixel, G, B representation in components redness, green and blue component, rgb format and yuv format can be changed mutually according to following formula:
Rgb format converts yuv format to:
Y=0.299R+0.587G+0.114B
U=-0.147R-0.289G+0.436B
V=0.615R-0.515G-0.100B
Yuv format converts rgb format to:
R=Y+1.14V
G=Y-0.39U-0.58V
B=Y+2.03U
<embodiment 1 〉
As shown in Figure 1, the method that the described image of present embodiment is dubbed in background music may further comprise the steps:
Step 11 according to the blue composition in the image and the size of yellow composition, is determined the tone changes in temperature characteristic of described image.
Usually, according to people's colour vision impression, therefore the yellow symbol sun thinks that yellow is a warm tones; And blueness is represented the sea, is considered to cool tone.Therefore, in the above-mentioned steps 11, judgment mode is determined the tone changes in temperature of image in such a way: the blue composition in described image judges that described image is a cool tone during greater than yellow composition; When the blue composition of pixel is less than yellow composition in described image, judge that described image is a warm tones; When the blue composition of pixel equals yellow composition in described image, judge that described image is a neutralc tint.
Certainly, in the above-mentioned steps 11, can also determine the tone changes in temperature characteristic of image in such a way: the mean value of the mean value of the yellow composition of all pixels and blue composition in the computed image, and according to the size of the mean value and the blue composition mean value of yellow composition, the cold and warm tone characteristic of decision image, wherein, when the absolute value of the difference of the mean value of the mean value of the yellow composition of all pixels and blue composition is no more than a default thresholding in image, judge that this image is a neutralc tint; When the difference of the mean value of the mean value of the yellow composition of all pixels and blue composition is greater than above-mentioned thresholding in image, judge that this image is a warm tones; When the difference of the mean value of the mean value of the blue composition of all pixels and yellow composition is greater than above-mentioned thresholding in image, judge that this image is a cool tone.If image is a yuv format, then can be converted to rgb format earlier, carry out the calculating of yellow composition and blue composition again, concrete computing formula is as follows:
In the following formula, the yellow composition of all pixels and the mean value of blue composition in Ylw, the Blu difference presentation video; R[i], G[i], B[i] respectively redness, green and the blue component of remarked pixel point i;
The yellow component of remarked pixel point i; The quantity of the pixel in the M*N presentation video.
If | Ylw-Blu|≤Threshold, judge that then image is a neutralc tint;
If Ylw-Blu>Threshold judges that then image is a warm tones;
If Blu-Ylw>Threshold judges that then image is a cool tone.
Certainly, in the step 11, also can directly obtain first and the value of blue composition of all pixels in the image and second and value of yellow composition,, determine the tone changes in temperature characteristic of described image according to first and value and second and the size of value.
Step 12 according to predetermined tone changes in temperature characteristic and first corresponding relation between the style school, is determined the first style school of the tone changes in temperature characteristic correspondence of described image.
Here, the tone changes in temperature characteristic of image is used for determining the style school of dubbing in background music.The warm tones symbol is cheerful and light-hearted; The melancholy of cool tone symbol, neutralc tint then signifies neutral emotion.Usually, from the style school of melody, rock and roll (rock) style, jazz (jazz) style are cheerful and light-hearted, and popular (pop) style and classics (classic) style are neutral, and Blues (blue) style is melancholy.In the present embodiment, can preestablish first corresponding relation between tone changes in temperature characteristic and the style school, in this first corresponding relation, the corresponding warm property style school of warm tones, the corresponding neutral style school of neutralc tint, the corresponding cold property style school of cool tone, wherein, described warm property style school comprises rock and roll (rock) style and jazz (jazz) style etc., described neutral style school comprises popular (pop) style and classics (classic) style etc., and described cold property style school comprises Blues (blue) style etc.So,, can determine the first style school of the tone changes in temperature characteristic correspondence of described image according to the tone changes in temperature characteristic of above-mentioned first corresponding relation and described image.
Step 13, from predetermined a plurality of melodies, the melody that selection and the described first style school are complementary is as dubbing in background music of described image.
Here, can in advance alternative a plurality of melodies be classified according to the style school, the melody of identical style school is classified as same classification, and then from the melody that the coupling classification that is complementary with the described first style school is comprised, select to dub in background music.If include the melody more than 2 in the coupling classification, then can select wherein arbitrary melody dubbing in background music at random as described image; If do not include any melody in the coupling classification as yet, then further from other classification, select any melody as dubbing in background music.
From the above as can be seen, present embodiment is by the changes in temperature characteristic of the tone of definite image, select melody that the cold and warm tone with image is complementary as the dubbing in background music of image, thereby make and dub in background music and image is complementary, can improve the auditory perception of spectators when appreciating image.
<embodiment 2 〉
Present embodiment in the sharpness information of selecting to further consider when dubbing in background music image, is determined the rhythm of dubbing in background music according to acutance on the basis of embodiment 1, making dubs in background music conforms to more with image.
As shown in Figure 2, the method that the described image of the embodiment of the invention is dubbed in background music may further comprise the steps:
Step 21, according to the brightness of pixel in the image, the average acutance of computed image, and, determine the tone changes in temperature characteristic of described image according to the blue composition in the image and the size of yellow composition.
Here, the tone changes in temperature characteristic of image is definite identical with embodiment 1 in the present embodiment, repeats no more.In the present embodiment, the calculating of the acutance of image can be adopted various existent method of the prior art.In the present embodiment, the calculating of the acutance of image can also be carried out in such a way:
By the mask of a 3*3, Filtering Processing is all carried out in the brightness of other pixel except that the edge pixel in first image, the edge pixel point in the described image then remains unchanged, and obtains second image after the sharpening; Again brightness value of averaging of all pixels in described second image is calculated, obtained the average acutance of described first image.That is, the average acutance of described first image is:
Wherein, the quantity of the pixel in the M*N presentation video, the brightness of each pixel in Y ' [i] expression second image.The brightness of a common pixel can represent that this moment, the span of average acutance was 0 to 255 with the binary number of 8 bits.
The mask of the 3*3 that adopts in the aforementioned calculation method, as follows:
??-1 |
??-1 |
??-1 |
??-1 |
??8 |
??-1 |
??-1 |
??-1 |
??-1 |
Utilize above-mentioned mask to remove each pixel of weighted, obtain the Filtering Processing result, that is, the result after the above-mentioned weighted of the process of certain pixel is: the value of this pixel and 8 product deduct the value of 8 neighbor pixels of this pixel periphery.
Step 22, according to predetermined tone changes in temperature characteristic and first corresponding relation between the style school, determine the first style school of the tone changes in temperature characteristic correspondence of described image, and, according to predetermined acutance and second corresponding relation between the rhythm, determine first rhythm of the acutance correspondence of described image.
Here, the first style school is definite identical with embodiment 1 in the present embodiment, repeats no more; The acutance of image is used for determining the rhythm of dubbing in background music in the present embodiment.Variations in detail on the big presentation video of acutance is big, and this image is fit to fast the dubbing in background music of rhythm; Acutance hour picture then is fit to slow the dubbing in background music of rhythm.In the present embodiment, can further preestablish second corresponding relation between acutance and the rhythm, in this second corresponding relation, the rhythm of the first acutance correspondence that acutance is bigger, the rhythm of the second acutance correspondence more less than acutance is fast.So,, can determine the rhythm of dubbing in background music according to the acutance of above-mentioned second corresponding relation and described image.
Step 23, from predetermined a plurality of melodies, the melody that selection and described first rhythm and the described first style school are complementary is as dubbing in background music of described image.
In the present embodiment, can in advance alternative a plurality of melodies be classified according to style school and rhythm, the melody of identical style school and identical rhythm is classified as the melody of same classification, and then from the coupling classification that is complementary with described first rhythm and the described first style school, selects melody.If include the melody more than 2 in the coupling classification, then can select wherein arbitrary melody dubbing in background music at random as described image; If do not include any melody in the coupling classification as yet, then further from contiguous classification (for example, identical, with the approaching classification of described first rhythm), select melody as dubbing in background music with the described first style school.
The classification of music can be passed through training and discriminator with the mode of signal Processing, also can utilize the information classification that comprises in some system formats, such as mp3 form music, has comprised the school kind of information of music in its label (tag) information.
Further, present embodiment can be specified the musical instrument accompaniment of dubbing in background music according to the tone changes in temperature characteristic of image.For example, in the musical instrument accompaniment, piano, violin etc. is a comparison neutrality; The blowing instrument great majority are more gloomy; And the percussion instrument great majority are more cheerful and more light-hearted.Therefore, in the present embodiment, after above-mentioned steps 23, can also specify described musical instrument accompaniment of dubbing in background music further according to the tone changes in temperature characteristic of described image, wherein, when described image was neutralc tint, specifying musical instrument accompaniment was piano or violin; When described image was cool tone, the appointment musical instrument accompaniment was a blowing instrument, as saxophone, flute, sheng, a reed pipe wind instrument etc.; When described image was warm tones, the appointment musical instrument accompaniment was a percussion instrument, as chiming gongs, ancient Chinese chime with 12 bells, clappers, watchman's clapper etc.
As can be seen, present embodiment is according to the changes in temperature characteristic and the acutance size of the tone of image, select melody the dubbing in background music that is complementary with image as image, mate mutually, bring out the best in each other with image thereby making dubs in background music, can improve the hearing enjoying of spectators when appreciating image, bring better look, the sense of hearing experiences.
<embodiment 3 〉
How above embodiment has illustrated and has selected to dub in background music for image.Present embodiment further on the basis of embodiment 1 or 2, according to the further feature of image, as brightness, contrast etc., is suitably adjusted the result of broadcast of dubbing in background music, and further makes result of broadcast and image be complementary, and improves spectators' audiovisual experience.
In the present embodiment, think that the brightness of image is corresponding proper with the loudness of audio frequency.When image became clear, the loudness of music should be bigger; And image is when dim, and the loudness of music should be less.And the contrast of image is proper corresponding to the loudness scope of audio frequency, and promptly the contrast of image is distinct more, and it is of flowing rhythm more then to dub in background music, otherwise then should be mild.Above-mentioned fit system meets the artistic conception of image, can improve spectators' audiovisual impression.So in the present embodiment, be further processed dubbing in background music by following two kinds of processing modes.
Described pad value of dubbing in background music is determined in the brightness of the described image that processing mode one, basis are obtained in advance, and wherein said pad value reduces with the increase of the brightness of described image; And when playing described dubbing in background music, described loudness of dubbing in background music is carried out overall attenuation according to described pad value.
In the aforesaid way one, the brightness of image is corresponding with the loudness of audio frequency, and the pad value of dubbing in background music of the image correspondence that brightness is bigger is less than the pad value of dubbing in background music of the less image correspondence of brightness.Usually, the loudness peak value of music has all reached the full width of cloth, therefore, only considers here to decay to dubbing in background music.The brightness of described image can represent that promptly the brightness Yavg of described image is with the mean value of the brightness of all pixels of image:
Wherein, Y[i] brightness of remarked pixel point i, suppose that this image has M*N pixel.
The described corresponding pad value Loud (unit is dB) that dubs in background music of described calculating, specifically can calculate according to following formula:
□Loud=(Yavg/10-25.5)dB
Above-mentioned formula makes that about 0dB decays when Yavg is maximum brightness value 255 (corresponding to 8 bits); And be 0 when (image is black entirely) as Yavg, decay is 25dB to the maximum, thereby can realize when image becomes clear, the overall loudness of dubbing in background music automatically greatly by accent, and image is when dim, the overall loudness of dubbing in background music is turned down automatically.
In the formula of aforementioned calculation pad value Loud, the funtcional relationship between the brightness of pad value and image is a linear relationship, certainly, also can other function, be arranged to nonlinear relationship, only need satisfy pad value and reduce along with the increase of brightness to get final product.
Processing mode two, according to the contrast of the described image that obtains in advance and predetermined contrast reference value, determine that a loudness adjusts parameter, wherein, during greater than described contrast reference value, it is positive number that described loudness is adjusted parameter in the contrast of described image; During less than described contrast reference value, it is negative that described loudness is adjusted parameter in the contrast of described image; Then, when the dubbing in background music of playing image, the size of the initial loudness of more described frame signal of dubbing in background music and a predetermined mean loudness reference value:
In the initial loudness of described frame signal of dubbing in background music during greater than described mean loudness reference value, adjust parameter with the initial loudness of described frame signal and described loudness with value be desired value, adjust the loudness of described frame signal;
When the initial loudness of described frame signal of dubbing in background music was less than or equal to described mean loudness reference value, deducting described loudness with the initial loudness of described frame signal, to adjust the difference that parameter obtains be desired value, adjusts the loudness of described frame signal.
In the above-mentioned processing mode two, when the contrast of described image equaled described contrast reference value, it was 0 that described loudness is adjusted parameter, promptly no longer adjusts the loudness of described frame signal of dubbing in background music.
The contrast D of described image can determine according to following formula:
In the aforesaid way two, that the contrast of image is corresponding with the loudness scope of audio frequency.The variation range of contrast generally between 0~100, therefore is provided with a contrast reference value (as 50), specifically can determine loudness adjustment parameter PL according to following formula.Certainly, also can adopt other funtcional relationship, calculate loudness and adjust parameter PL according to concrete playing environment:
PL=(D-50)/5dB。
As can be seen, if the contrast of image is bigger, promptly D was greater than 50 o'clock, and PL is a positive number; And if picture contrast is less, promptly D was less than 50 o'clock, and PL is a negative.
In order to increase the dynamic range of music loudness, and do not produce noise, present embodiment can utilize automatic gain control (AGC) device will to adjust step by step the loudness of the frame signal of current broadcast, so that its progressively near and reach the described desired value that calculates, adjust less that step-length can be provided with, to reduce noise.
As can be seen, when adjusting according to above-mentioned processing mode two, when loudness is adjusted parameter PL and is positive number, if the initial loudness of frame signal greater than the mean loudness reference value, then present embodiment can further improve the gain of this frame signal; Otherwise, then reduce its gain, thereby strengthen the loudness variation range of music, make it more of flowing rhythm.And when PL is negative, if the initial loudness of frame signal greater than the mean loudness reference value, then present embodiment can further reduce the gain of this frame signal; Otherwise, then increase its gain, thereby will reduce the loudness variation range of music, it is milder to make it to become.
When the dubbing in background music of playing image, can be by the way one or two pairs of modes dub in background music and handle, also can adopt two pairs of aforesaid way one and modes to dub in background music simultaneously and handle.When adopting aforesaid way one and mode two simultaneously, utilize a pair of loudness of dubbing in background music of mode to carry out overall attenuation earlier, when broadcast is dubbed in background music, adjust then according to the loudness of two pairs of frame signals of dubbing in background music of mode.
More than each embodiment, utilize the information such as brightness, contrast, color harmony acutance of image, convert loudness, fluctuating, school and the rhythm of melody to, and then dubbing in background music of conforming to picture characteristics of selection, and the parameter that can utilize these information to obtain, when broadcast is dubbed in background music, carry out signal Processing, make it to coordinate more, thereby realized the function of dubbing in background music automatically for image with characteristics of image to dubbing in background music.
<embodiment 4 〉
At last, based on the described image of above each embodiment method of dubbing in background music, present embodiment provides a kind of image device of dubbing in background music, and as shown in Figure 3, this image device of dubbing in background music comprises:
Image analyzing unit is used for according to the blue composition of image and the size of yellow composition, determines the tone changes in temperature characteristic of described image;
The characteristic of dubbing in background music determining unit is used for determining the first style school of the tone changes in temperature characteristic correspondence of described image according to predetermined tone changes in temperature characteristic and first corresponding relation between the style school;
The selected cell of dubbing in background music is used for from predetermined a plurality of melodies, selects the melody that is complementary with the described first style school, as dubbing in background music of described image.
Corresponding relation between the rhythm that further contemplates the acutance of image and dub in background music, image shown in Figure 3 are dubbed in background music in the device:
Described image analyzing unit also is used for the brightness according to described image pixel, calculates the average acutance of described image;
The described characteristic determining unit of dubbing in background music also is used for determining first rhythm of described average acutance correspondence according to predetermined acutance and second corresponding relation between the rhythm;
The described selected cell of dubbing in background music is further used for selecting the melody that all mates with described first rhythm and the described first style school, as dubbing in background music of described image.
Corresponding relation between the decay of the loudness that further contemplates the brightness of image and dub in background music, image shown in Figure 3 are dubbed in background music and can also be comprised a playing control unit in the device, at this moment,
The described characteristic determining unit of dubbing in background music also is used for the brightness according to the described image that obtains in advance, determines described pad value of dubbing in background music, and wherein, described pad value reduces with the increase of the brightness of described image;
Described playing control unit is used for according to described pad value described loudness of dubbing in background music being carried out overall attenuation when playing described dubbing in background music.
Corresponding relation between the loudness variation range that further contemplates the contrast of image and dub in background music, image shown in Figure 3 are dubbed in background music in the device:
The described characteristic determining unit of dubbing in background music, also be used for contrast and predetermined contrast reference value, determine loudness adjustment parameter, wherein according to the described image that obtains in advance, during greater than described contrast reference value, it is positive number that described loudness is adjusted parameter in the contrast of described image; During less than described contrast reference value, it is negative that described loudness is adjusted parameter in the contrast of described image;
Described playing control unit, also be used for when the dubbing in background music of playing image, the size of the initial loudness of more described frame signal of dubbing in background music and a predetermined mean loudness reference value: in the initial loudness of described frame signal of dubbing in background music during greater than described mean loudness reference value, adjust parameter with the initial loudness of described frame signal and described loudness with value be desired value, adjust the loudness of described frame signal; When the initial loudness of described frame signal of dubbing in background music was less than or equal to described mean loudness reference value, deducting described loudness with the initial loudness of described frame signal, to adjust the difference that parameter obtains be desired value, adjusts the loudness of described frame signal.
In addition, image shown in Figure 3 is dubbed in background music in the device, can also comprise:
The musical instrument accompaniment designating unit is used for the tone changes in temperature characteristic according to described image, specifies described musical instrument accompaniment of dubbing in background music.
<embodiment 5 〉
At last, present embodiment provides a kind of image playing device, and this image playing device can be a digital album (digital photo frame) or MP4 player, and this image playing device specifically comprises:
The image broadcast unit is used to play predetermined picture;
Image analyzing unit is used for determining the tone changes in temperature characteristic of described image;
The characteristic of dubbing in background music determining unit is used for determining the first style school of the tone changes in temperature characteristic correspondence of described image according to predetermined tone changes in temperature characteristic and first corresponding relation between the style school;
The selected cell of dubbing in background music is used for from predetermined a plurality of melodies, selects the melody that is complementary with the described first style school, as dubbing in background music of described image;
The broadcast unit of dubbing in background music is used to play described image the dubbing in background music that the unit selects of dubbing in background music.
Wherein, described image analyzing unit comprises:
One tone analytic unit is used for according to the blue composition of image and the size of yellow composition, determines the tone changes in temperature characteristic of described image;
One acutance analytic unit is used for the brightness according to described image pixel, calculates the average acutance of described image;
The described characteristic determining unit of dubbing in background music also is used for determining first rhythm of described average acutance correspondence according to predetermined acutance and second corresponding relation between the rhythm;
The described selected cell of dubbing in background music is further used for selecting the melody that all mates with described first rhythm and the described first style school, as dubbing in background music of described image.
Preferably, in the above-mentioned image playing device, the described characteristic determining unit of dubbing in background music also is used for the brightness according to the described image that obtains in advance, determines described pad value of dubbing in background music, and wherein, described pad value reduces with the increase of the brightness of described image;
The described broadcast unit of dubbing in background music comprises: playing control unit is used for according to described pad value described loudness of dubbing in background music being carried out overall attenuation when playing described dubbing in background music.
Preferably, in the above-mentioned image playing device,
The described characteristic determining unit of dubbing in background music, also be used for contrast and predetermined contrast reference value, determine loudness adjustment parameter, wherein according to the described image that obtains in advance, during greater than described contrast reference value, it is positive number that described loudness is adjusted parameter in the contrast of described image; During less than described contrast reference value, it is negative that described loudness is adjusted parameter in the contrast of described image;
Described playing control unit, also be used for when the dubbing in background music of playing image, the size of the initial loudness of more described frame signal of dubbing in background music and a predetermined mean loudness reference value: in the initial loudness of described frame signal of dubbing in background music during greater than described mean loudness reference value, adjust parameter with the initial loudness of described frame signal and described loudness with value be desired value, adjust the loudness of described frame signal; When the initial loudness of described frame signal of dubbing in background music was less than or equal to described mean loudness reference value, deducting described loudness with the initial loudness of described frame signal, to adjust the difference that parameter obtains be desired value, adjusts the loudness of described frame signal.
In sum, the image that the embodiment of the invention provides dub in background music method, image dub in background music device and image playing device, utilize the information such as brightness, contrast, color harmony acutance of image, convert loudness, fluctuating, school and the rhythm of melody to, and then dubbing in background music of conforming to picture characteristics of selection, and the parameter that can utilize these information to obtain is carried out signal Processing to dubbing in background music when broadcast is dubbed in background music, make it to coordinate more, thereby realized the function of dubbing in background music automatically for image with characteristics of image.
The above only is embodiments of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.