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 to dub in background music with image is complementary.
For solving the problems of the technologies described above, the present invention provides scheme following:
The method that a kind of image is dubbed in background music comprises:
Steps A is confirmed 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, confirms the first corresponding style school of tone changes in temperature characteristic of said image;
Step C, from predetermined a plurality of melodies, the melody that selection and the said first style school are complementary is as dubbing in background music of said image.
Preferably, in the method that above-mentioned image is dubbed in background music, in the said steps A,, confirm the tone changes in temperature characteristic of said 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 said steps A:, calculate the average acutance of said image according to the brightness of pixel in the said image;
Also comprise among the said step B:, confirm the first corresponding rhythm of said average acutance according to predetermined acutance and second corresponding relation between the rhythm;
Among the said step C, further select the melody that all matees with said first rhythm and the said first style school, as dubbing in background music of said image.
Preferably, in the method that above-mentioned image is dubbed in background music, also comprise after the said step C:
According to the brightness of the said image that obtains in advance, confirm said pad value of dubbing in background music, wherein, said pad value reduces with the increase of the brightness of said image; And when playing said dubbing in background music, said loudness of dubbing in background music is carried out overall attenuation according to said pad value.
Preferably, in the method that above-mentioned image is dubbed in background music, also comprise after the said step C:
According to the contrast of the said image that obtains in advance and predetermined contrast reference value, confirm loudness adjustment parameter, wherein, during greater than said contrast reference value, said loudness adjustment parameter is a positive number in the contrast of said image; During less than said contrast reference value, said loudness adjustment parameter is a negative in the contrast of said image;
When the dubbing in background music of playing image; The size of the initial loudness of more said frame signal of dubbing in background music and a predetermined mean loudness reference value: in the initial loudness of said frame signal of dubbing in background music during greater than said mean loudness reference value; With the initial loudness of said frame signal and said loudness adjustment parameter with value be desired value, adjust the loudness of said frame signal; When the initial loudness of said frame signal of dubbing in background music was less than or equal to said mean loudness reference value, deducting the difference that said loudness adjustment parameter obtains with the initial loudness of said frame signal was desired value, adjusts the loudness of said frame signal.
Preferably, in the method that above-mentioned image is dubbed in background music, also comprise after the said step C:
According to the tone changes in temperature characteristic of said image, specify said 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 confirming the tone changes in temperature characteristic of said image;
The characteristic of dubbing in background music is confirmed the unit, is used for according to predetermined tone changes in temperature characteristic and first corresponding relation between the style school, confirms the first corresponding style school of tone changes in temperature characteristic of said image;
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 said first style school, as dubbing in background music of said image.
Preferably, above-mentioned image is dubbed in background music in the device,
Said image analyzing unit comprises:
The tone analytic unit is used for according to the blue composition of image and the size of yellow composition, confirms the tone changes in temperature characteristic of said image.
Preferably, above-mentioned image is dubbed in background music in the device,
Said image analyzing unit also comprises:
The acutance analytic unit is used for the brightness according to said image pixel, calculates the average acutance of said image;
The said characteristic of dubbing in background music is confirmed the unit, also is used for according to predetermined acutance and second corresponding relation between the rhythm, confirms the first corresponding rhythm of said average acutance;
The said selected cell of dubbing in background music is further used for selecting the melody that all matees with said first rhythm and the said first style school, as dubbing in background music of said image.
Preferably, above-mentioned image is dubbed in background music in the device,
The said characteristic of dubbing in background music is confirmed the unit, also is used for the brightness according to the said image that obtains in advance, confirms said pad value of dubbing in background music, and wherein, said pad value reduces with the increase of the brightness of said image;
The said image device of dubbing in background music also comprises:
Playing control unit is used for when playing said dubbing in background music, according to said pad value said loudness of dubbing in background music being carried out overall attenuation.
Preferably, above-mentioned image is dubbed in background music in the device,
The said characteristic of dubbing in background music is confirmed the unit; Also be used for contrast and predetermined contrast reference value, confirm loudness adjustment parameter, wherein according to the said image that obtains in advance; During greater than said contrast reference value, said loudness adjustment parameter is a positive number in the contrast of said image; During less than said contrast reference value, said loudness adjustment parameter is a negative in the contrast of said image;
Said playing control unit; Also be used for when the dubbing in background music of playing image; The size of the initial loudness of more said frame signal of dubbing in background music and a predetermined mean loudness reference value: in the initial loudness of said frame signal of dubbing in background music during greater than said mean loudness reference value; With the initial loudness of said frame signal and said loudness adjustment parameter with value be desired value, adjust the loudness of said frame signal; When the initial loudness of said frame signal of dubbing in background music was less than or equal to said mean loudness reference value, deducting the difference that said loudness adjustment parameter obtains with the initial loudness of said frame signal was desired value, adjusts the loudness of said 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 confirming the tone changes in temperature characteristic of said image;
The characteristic of dubbing in background music is confirmed the unit, is used for according to predetermined tone changes in temperature characteristic and first corresponding relation between the style school, confirms the first corresponding style school of tone changes in temperature characteristic of said image;
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 said first style school, as dubbing in background music of said image;
The broadcast unit of dubbing in background music is used to play said image the dubbing in background music that the unit selects of dubbing in background music.
Preferably, in the above-mentioned image playing device,
Said image analyzing unit comprises:
The tone analytic unit is used for according to the blue composition of image and the size of yellow composition, confirms the tone changes in temperature characteristic of said image.
Preferably, in the above-mentioned image playing device,
Said image analyzing unit also comprises:
The acutance analytic unit is used for the brightness according to said image pixel, calculates the average acutance of said image;
The said characteristic of dubbing in background music is confirmed the unit, also is used for according to predetermined acutance and second corresponding relation between the rhythm, confirms the first corresponding rhythm of said average acutance;
The said selected cell of dubbing in background music is further used for selecting the melody that all matees with said first rhythm and the said first style school, as dubbing in background music of said image.
Preferably, in the above-mentioned image playing device,
The said characteristic of dubbing in background music is confirmed the unit, also is used for the brightness according to the said image that obtains in advance, confirms said pad value of dubbing in background music, and wherein, said pad value reduces with the increase of the brightness of said image;
The said broadcast unit of dubbing in background music comprises:
Playing control unit is used for when playing said dubbing in background music, according to said pad value said loudness of dubbing in background music being carried out overall attenuation.
Preferably, in the above-mentioned image playing device,
The said characteristic of dubbing in background music is confirmed the unit; Also be used for contrast and predetermined contrast reference value, confirm loudness adjustment parameter, wherein according to the said image that obtains in advance; During greater than said contrast reference value, said loudness adjustment parameter is a positive number in the contrast of said image; During less than said contrast reference value, said loudness adjustment parameter is a negative in the contrast of said image;
Said playing control unit; Also be used for when the dubbing in background music of playing image; The size of the initial loudness of more said frame signal of dubbing in background music and a predetermined mean loudness reference value: in the initial loudness of said frame signal of dubbing in background music during greater than said mean loudness reference value; With the initial loudness of said frame signal and said loudness adjustment parameter with value be desired value, adjust the loudness of said frame signal; When the initial loudness of said frame signal of dubbing in background music was less than or equal to said mean loudness reference value, deducting the difference that said loudness adjustment parameter obtains with the initial loudness of said frame signal was desired value, adjusts the loudness of said frame signal.
Can find out from the above; 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 for image according to the characteristic of image, its core concept is: utilize the characteristic 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 can further utilize these information to obtain the parameter of signal processing algorithm, and 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 will combine accompanying drawing, the present invention done further explanation through 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 according to following formula each other:
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 >
Method as shown in Figure 1, that the said 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 confirmed the tone changes in temperature characteristic of said 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 confirmed the tone changes in temperature of image in such a way: the blue composition in said image judges that said image is a cool tone during greater than yellow composition; When the blue composition of pixel is less than yellow composition in said image, judge that said image is a warm tones; When the blue composition of pixel equals yellow composition in said image, judge that said image is a neutralc tint.
Certainly; In the above-mentioned steps 11; Can also confirm 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 preset 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 convert rgb format earlier into, carry out the calculating of yellow composition and blue composition again, concrete computing formula is following:
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] be redness, green and the blue component of remarked pixel point i respectively; 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 all pixels in the image blue composition first with second and value of value and yellow composition, according to first with value with second with the size that is worth, confirm the tone changes in temperature characteristic of said image.
Step 12 according to predetermined tone changes in temperature characteristic and first corresponding relation between the style school, is confirmed the first corresponding style school of tone changes in temperature characteristic of said image.
Here, the tone changes in temperature characteristic of image is used for confirming 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, said warm property style school comprises rock and roll (rock) style and jazz (jazz) style etc.; Said neutral style school comprises popular (pop) style and classics (classic) style etc., and said cold property style school comprises Blues (blue) style etc.So,, can confirm the first corresponding style school of tone changes in temperature characteristic of said image according to the tone changes in temperature characteristic of above-mentioned first corresponding relation and said image.
Step 13, from predetermined a plurality of melodies, the melody that selection and the said first style school are complementary is as dubbing in background music of said 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 said 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 said 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.
Can find out from the above; Present embodiment is through 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 confirmed the rhythm of dubbing in background music according to acutance on the basis of embodiment 1, making dubs in background music conforms to image more.
Method as shown in Figure 2, that the said 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, confirm the tone changes in temperature characteristic of said 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:
Through 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 said image then remains unchanged, and obtains second image after the sharpening; Again brightness value of averaging of all pixels in said second image is calculated, obtained the average acutance of said first image.That is, the average acutance of said 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; Confirm the first corresponding style school of tone changes in temperature characteristic of said image; And, according to predetermined acutance and second corresponding relation between the rhythm, confirm the first corresponding rhythm of acutance of said 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 confirming 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 corresponding rhythm of first acutance that acutance is bigger, the rhythm of the second acutance correspondence more less than acutance is fast.So,, can confirm the rhythm of dubbing in background music according to the acutance of above-mentioned second corresponding relation and said image.
Step 23, from predetermined a plurality of melodies, the melody that selection and said first rhythm and the said first style school are complementary is as dubbing in background music of said 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 said first rhythm and the said 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 said 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 said first rhythm), select melody as dubbing in background music with the said first style school.
The classification of music can use the mode of signal Processing through training and discriminator, 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 that comparison is neutral; 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 said musical instrument accompaniment of dubbing in background music further according to the tone changes in temperature characteristic of said image, wherein, when said image was neutralc tint, specifying musical instrument accompaniment was piano or violin; When said image was cool tone, the appointment musical instrument accompaniment was a blowing instrument, like saxophone, flute, sheng, a reed pipe wind instrument etc.; When said image was warm tones, the appointment musical instrument accompaniment was a percussion instrument, like chiming gongs, ancient Chinese chime with 12 bells, clappers, watchman's clapper etc.
Can find out; 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 each other, 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 explained 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, like 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 distincter, 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, further handle dubbing in background music through following two kinds of processing modes.
Said pad value of dubbing in background music is confirmed in the brightness of the said image that processing mode one, basis are obtained in advance, and wherein said pad value reduces with the increase of the brightness of said image; And when playing said dubbing in background music, said loudness of dubbing in background music is carried out overall attenuation according to said pad value.
In the aforesaid way one, the brightness of image is corresponding with the loudness of audio frequency, and the corresponding pad value of dubbing in background music of image that brightness is bigger is less than the less corresponding pad value of dubbing in background music of image 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 said image can represent that promptly the brightness Yavg of said image is with the mean value of the brightness of all pixels of image:
Wherein, the brightness of Y [i] remarked pixel point i supposes that this image has M*N pixel.
The said corresponding pad value Loud (unit is dB) that dubs in background music of said 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 said image that obtains in advance and predetermined contrast reference value, confirm loudness adjustment parameter, wherein, during greater than said contrast reference value, said loudness adjustment parameter is a positive number in the contrast of said image; During less than said contrast reference value, said loudness adjustment parameter is a negative in the contrast of said image; Then, when the dubbing in background music of playing image, the size of the initial loudness of more said frame signal of dubbing in background music and a predetermined mean loudness reference value:
In the initial loudness of said frame signal of dubbing in background music during greater than said mean loudness reference value, with the initial loudness of said frame signal and said loudness adjustment parameter with value be desired value, adjust the loudness of said frame signal;
When the initial loudness of said frame signal of dubbing in background music was less than or equal to said mean loudness reference value, deducting the difference that said loudness adjustment parameter obtains with the initial loudness of said frame signal was desired value, adjusts the loudness of said frame signal.
In the above-mentioned processing mode two, when the contrast of said image equaled said contrast reference value, said loudness adjustment parameter was 0, promptly no longer adjusts the loudness of said frame signal of dubbing in background music.
The contrast D of said image can confirm 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 confirm loudness adjustment parameter PL according to following formula.Certainly, also can adopt other funtcional relationship, calculate loudness adjustment parameter PL according to concrete playing environment:
PL=(D-50)/5dB。
Can find out that if the contrast of image is bigger, promptly D was greater than 50 o'clock, 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 said desired value that calculates, it is less that the adjustment step-length can be provided with, to reduce noise.
Can find out, when adjusting according to above-mentioned processing mode two, when loudness adjustment parameter PL 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 aforesaid way one and two pairs of modes to dub in background music simultaneously and handle.When adopting aforesaid way one 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 with mode two.
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 is as shown in Figure 3, and 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, confirms the tone changes in temperature characteristic of said image;
The characteristic of dubbing in background music is confirmed the unit, is used for according to predetermined tone changes in temperature characteristic and first corresponding relation between the style school, confirms the first corresponding style school of tone changes in temperature characteristic of said image;
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 said first style school, as dubbing in background music of said 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:
Said image analyzing unit also is used for the brightness according to said image pixel, calculates the average acutance of said image;
The said characteristic of dubbing in background music is confirmed the unit, also is used for according to predetermined acutance and second corresponding relation between the rhythm, confirms the first corresponding rhythm of said average acutance;
The said selected cell of dubbing in background music is further used for selecting the melody that all matees with said first rhythm and the said first style school, as dubbing in background music of said 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 said characteristic of dubbing in background music is confirmed the unit, also is used for the brightness according to the said image that obtains in advance, confirms said pad value of dubbing in background music, and wherein, said pad value reduces with the increase of the brightness of said image;
Said playing control unit is used for when playing said dubbing in background music, according to said pad value said loudness of dubbing in background music being carried out overall attenuation.
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 said characteristic of dubbing in background music is confirmed the unit; Also be used for contrast and predetermined contrast reference value, confirm loudness adjustment parameter, wherein according to the said image that obtains in advance; During greater than said contrast reference value, said loudness adjustment parameter is a positive number in the contrast of said image; During less than said contrast reference value, said loudness adjustment parameter is a negative in the contrast of said image;
Said playing control unit; Also be used for when the dubbing in background music of playing image; The size of the initial loudness of more said frame signal of dubbing in background music and a predetermined mean loudness reference value: in the initial loudness of said frame signal of dubbing in background music during greater than said mean loudness reference value; With the initial loudness of said frame signal and said loudness adjustment parameter with value be desired value, adjust the loudness of said frame signal; When the initial loudness of said frame signal of dubbing in background music was less than or equal to said mean loudness reference value, deducting the difference that said loudness adjustment parameter obtains with the initial loudness of said frame signal was desired value, adjusts the loudness of said 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 said image, specifies said 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 DPF 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 confirming the tone changes in temperature characteristic of said image;
The characteristic of dubbing in background music is confirmed the unit, is used for according to predetermined tone changes in temperature characteristic and first corresponding relation between the style school, confirms the first corresponding style school of tone changes in temperature characteristic of said image;
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 said first style school, as dubbing in background music of said image;
The broadcast unit of dubbing in background music is used to play said image the dubbing in background music that the unit selects of dubbing in background music.
Wherein, said image analyzing unit comprises:
One tone analytic unit is used for according to the blue composition of image and the size of yellow composition, confirms the tone changes in temperature characteristic of said image;
One acutance analytic unit is used for the brightness according to said image pixel, calculates the average acutance of said image;
The said characteristic of dubbing in background music is confirmed the unit, also is used for according to predetermined acutance and second corresponding relation between the rhythm, confirms the first corresponding rhythm of said average acutance;
The said selected cell of dubbing in background music is further used for selecting the melody that all matees with said first rhythm and the said first style school, as dubbing in background music of said image.
Preferably, in the above-mentioned image playing device, the said characteristic of dubbing in background music is confirmed the unit, also is used for the brightness according to the said image that obtains in advance, confirms said pad value of dubbing in background music, and wherein, said pad value reduces with the increase of the brightness of said image;
The said broadcast unit of dubbing in background music comprises: playing control unit is used for when playing said dubbing in background music, according to said pad value said loudness of dubbing in background music being carried out overall attenuation.
Preferably, in the above-mentioned image playing device,
The said characteristic of dubbing in background music is confirmed the unit; Also be used for contrast and predetermined contrast reference value, confirm loudness adjustment parameter, wherein according to the said image that obtains in advance; During greater than said contrast reference value, said loudness adjustment parameter is a positive number in the contrast of said image; During less than said contrast reference value, said loudness adjustment parameter is a negative in the contrast of said image;
Said playing control unit; Also be used for when the dubbing in background music of playing image; The size of the initial loudness of more said frame signal of dubbing in background music and a predetermined mean loudness reference value: in the initial loudness of said frame signal of dubbing in background music during greater than said mean loudness reference value; With the initial loudness of said frame signal and said loudness adjustment parameter with value be desired value, adjust the loudness of said frame signal; When the initial loudness of said frame signal of dubbing in background music was less than or equal to said mean loudness reference value, deducting the difference that said loudness adjustment parameter obtains with the initial loudness of said frame signal was desired value, adjusts the loudness of said 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 an embodiment 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 improvement and retouching, these improvement and retouching also should be regarded as protection scope of the present invention.