CN108335292B - Method for inserting picture in scene switching - Google Patents

Method for inserting picture in scene switching Download PDF

Info

Publication number
CN108335292B
CN108335292B CN201810085403.9A CN201810085403A CN108335292B CN 108335292 B CN108335292 B CN 108335292B CN 201810085403 A CN201810085403 A CN 201810085403A CN 108335292 B CN108335292 B CN 108335292B
Authority
CN
China
Prior art keywords
picture
value
information
difference
color
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810085403.9A
Other languages
Chinese (zh)
Other versions
CN108335292A (en
Inventor
高同庆
王新志
李志强
余春雨
宋虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Co Ltd
Original Assignee
Hisense Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Co Ltd filed Critical Hisense Co Ltd
Priority to CN201810085403.9A priority Critical patent/CN108335292B/en
Publication of CN108335292A publication Critical patent/CN108335292A/en
Application granted granted Critical
Publication of CN108335292B publication Critical patent/CN108335292B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The embodiment of the invention relates to the field of intelligent electronic equipment, in particular to a method and equipment for inserting pictures in scene switching, which are used for solving the problem that the smooth switching of front and back scene pictures in color cannot be realized in the scene switching in the prior art. Determining color difference information of a last picture in a current scene picture and a first picture in a target scene picture; determining color change information according to the time interval of the inserted pictures and the color difference information; and selecting the picture inserted at the time point according to the dominant color information and the color change information of the last picture in the current scene picture aiming at the time point of the picture to be inserted in the scene switching process, and inserting the picture after the time point is reached. In the embodiment of the invention, the color of the inserted picture is gradually changed in the scene switching process, so that the problem that the smooth switching of the front and rear scene pictures in the color aspect cannot be realized in the scene switching process in the prior art is solved.

Description

Method for inserting picture in scene switching
The present application is a divisional application of chinese patent application 201510497429.0 entitled "a method and apparatus for inserting pictures in scene cut" filed on 13/08/2015.
Technical Field
The present invention relates to the field of intelligent electronic devices, and in particular, to a method and device for inserting pictures during scene switching.
Background
With the wide application of intelligent electronic devices, the intelligent electronic devices become more and more complex, besides supporting basic functions, have various complex intelligent applications and games, and an inevitable problem in the use process of the intelligent electronic devices is the switching of application scenes.
In the prior art, for scene switching of intelligent electronic devices, the optimization of switching speed and switching time of inserting pictures and the optimization of modes of inserting screen shot pictures or inserting external setting pictures are mostly focused. For an intelligent electronic device with an audio-visual function, image quality is one of important features of the intelligent electronic device, if pictures of front and rear scenes are not analyzed before scene switching, when the difference of the colors of the pictures of the scenes before and after switching is large, a user has a visual impact feeling before and after the scene switching, and smooth switching in color cannot be realized during the scene switching.
Disclosure of Invention
The invention provides a method and equipment for inserting pictures in scene switching, which are used for solving the problem that smooth switching of front and rear scene pictures in color cannot be realized if the picture color difference between a scene before switching and a scene after switching is large in the prior art.
Based on the above problem, an embodiment of the present invention provides a method for inserting a picture in scene switching, including:
determining color difference information of the last picture in the current scene picture and the first picture in the target scene picture;
determining color change information according to the time interval for inserting the picture between the last picture in the current scene picture and the first picture in the target scene picture and the color difference information, wherein the time interval is the time length between adjacent time points needing to insert the picture;
selecting a picture to be inserted at a time point according to first dominant color information and the color change information of the last picture in a current scene picture aiming at the time point of the picture to be inserted in the scene switching process, and inserting the picture after the time point is reached; or selecting the picture to be inserted at the time point according to the second dominant color information of the first picture in the target scene picture and the color change information, and inserting the picture after the time point is reached.
In the embodiment of the invention, the picture is inserted in the scene switching process, the color change information of the inserted adjacent pictures is determined according to the color difference information of the last picture in the current scene picture and the first picture in the target scene picture and the time interval of the inserted picture, and the picture is selected according to the determined color information, so that the color of the picture is gradually changed in the scene switching process, and the problem that the smooth switching of the front and rear scene pictures in the color aspect cannot be realized if the picture color difference between the scene before switching and the scene after switching is large at present is solved.
Optionally, the determining the color difference information between the last picture in the current scene picture and the first picture in the target scene picture includes:
respectively determining first dominant color information of the last picture in the current scene picture and second dominant color information of the first picture in the target scene picture;
and determining the color difference information according to the first dominant color information and the second dominant color information.
The embodiment of the invention determines the color difference information of the last picture in the current scene picture and the first picture in the target scene picture, and selects the picture inserted in the scene switching process according to the color difference information, so that the dominant color information of the picture to be selected can be more accurately determined, and the color change in the scene switching process is smoother.
Optionally, the determining the first dominant color information of the last picture in the current scene picture includes:
dividing all pixels in the last picture into a plurality of sets, wherein each type of color parameter value corresponding to the pixels in each set is in the same numerical value range;
determining a set with the largest number of pixels in a plurality of sets, and averaging the same type of color parameter values of each pixel in the determined set to obtain an average value of each type of color parameter;
and taking the average value of each type of color parameter as the first dominant color information of the last picture in the current scene picture.
The embodiment of the invention provides the method for calculating the first dominant color information of the last picture in the current scene picture, and the method is also suitable for calculating the dominant color information of the selected picture to be inserted.
Optionally, the determining second dominant color information of the first picture in the target scene picture includes:
if dominant color information of a first picture in the target scene picture stored for the last time exists, taking the dominant color information of the first picture in the target scene picture stored for the last time as second dominant color information of the first picture in the target scene picture;
and if the dominant color information of the first picture in the target scene picture which is stored for the last time does not exist, taking preset information as second dominant color information of the first picture in the target scene picture.
According to the embodiment of the invention, the second dominant color information directly adopts the most recently stored dominant color information of the first picture in the target scene picture, and if the target scene enters for the first time and the stored dominant color information of the first picture does not exist, the second dominant color information directly adopts the preset information, so that the determining mode is simple and rapid, and the second dominant color information of the first picture in the target scene picture can be obtained rapidly.
Optionally, the first dominant color information includes a first brightness value and a first saturation value; the second dominant color information comprises a second luminance value and a second saturation value;
the determining the color difference information according to the first dominant color information and the second dominant color information specifically includes:
determining a brightness difference value according to a first brightness value of the first dominant color information and a second brightness value of the second dominant color information, and determining a saturation difference value according to a first saturation value of the first dominant color information and a second saturation value of the second dominant color information;
if the absolute value of the saturation difference is larger than a set first threshold value and the absolute value of the brightness difference is smaller than a set second threshold value, taking the saturation difference as color difference information;
if the absolute value of the saturation difference is smaller than a set first threshold value and the absolute value of the brightness difference is larger than a set second threshold value, taking the brightness difference as color difference information;
and if the absolute value of the saturation difference is greater than a set first threshold and the absolute value of the brightness difference is greater than a set second threshold, or the absolute value of the saturation difference is less than the set first threshold and the absolute value of the brightness difference is less than the set second threshold, taking a comprehensive difference as the color difference information, wherein the comprehensive difference is equal to the sum of the saturation difference multiplied by a first weight and the brightness difference multiplied by a second weight.
According to the embodiment of the invention, the absolute value of the saturation difference value is compared with the first threshold value, the absolute value of the brightness difference value is compared with the second threshold value, and the color difference information according to the image selection is determined, so that the color of the image selected in the scene switching process is more accurate, and the color switching in the scene switching process is smoother.
Optionally, the color change information is determined according to the following formula:
Idelta=Iscope*Δt/Tscope
wherein, IdeltaIs color change information; i isscopeIs color difference information; Δ t is the time interval for inserting the picture; t isscopeThe duration is switched for the scene.
The embodiment of the invention provides an accurate calculation method of the color change information, so that the accurate color change information can be obtained.
Optionally, selecting an inserted picture according to the first dominant color information and the color change information of the last picture in the current scene picture includes:
if the color difference information is a saturation difference value, the saturation value range of the selected picture is [ S ] for the nth time point needing to be inserted into the pictureorig+(n-1)*Idelta,Sorig+n*Idelta]The brightness value of the selected picture is smaller than a third threshold, the absolute value of the difference between the brightness value of the picture and the first brightness value of the last picture in the current scene picture is not larger than a fourth threshold, and the absolute value of the difference between the brightness value of the selected picture and the second brightness value of the first picture in the target scene picture is not larger than the fourth threshold;
if the color difference information is a brightness difference value, selecting the brightness value range of the picture as [ L ] for the nth time point needing to be inserted into the pictureorig+(n-1)*Idelta,Lorig+n*Idelta](ii) a The saturation value of the picture is smaller than a fifth threshold, the absolute value of the difference value between the saturation value of the picture and the first saturation value of the last picture in the current scene picture is not larger than a sixth threshold, and the absolute value of the difference value between the saturation value of the picture and the second saturation value of the first picture in the target scene picture is not larger than the sixth threshold;
if the color difference information is a comprehensive difference value, selecting an index value I of the picture for the nth time point needing to be inserted into the picturexIn the range of [ Iorig+(n-1)*Idelta,Iorig+n*Idelta]And I isx=Sx*A+Lx*B;
Wherein, Iorig=Sorig*A+Lorig*B;SxThe saturation value of the selected picture is obtained; l isxThe brightness value of the selected picture is obtained; i isdeltaIs color change information; sorigA first saturation value of the last picture in the current scene picture; l isorigA first brightness value of the last picture in the current scene picture; i isorigA first index value of the last picture in the current scene picture; a is a first weight; b is a second weight.
According to the embodiment of the invention, the principle of selecting the picture is defined in three conditions according to different color difference information, a calculation method of the dominant color value range of the picture inserted at each time point is given in each condition, and the picture is selected according to the dominant color value range of the picture inserted at each time point, so that the color of the selected picture meets the requirements better, and the smooth switching of the front and rear scene pictures in the aspect of color is realized.
Optionally, if the picture inserted at the time point is not selected and the time point of the last picture is present, selecting the inserted picture according to the first dominant color information and the color change information of the last picture in the current scene picture aiming at the time point of the last picture; taking the selected picture as a picture to be inserted at the time point of the unselected picture, wherein the selected picture is different from the picture inserted at the previous time point;
and if the picture inserted at the time point is not selected and the time point of the last picture to be inserted does not exist, taking the set picture as the picture to be inserted at the time point of the unselected picture.
The embodiment of the invention provides other modes for selecting the pictures at the time point aiming at the time point when the inserted pictures are not selected, thereby ensuring that the pictures can be selected at each time point when the pictures are inserted, and further improving the reliability of the selected pictures.
On the other hand, an apparatus for inserting a picture in scene switching provided by an embodiment of the present invention includes:
the determining module is used for determining the color difference information of the last picture in the current scene picture and the first picture in the target scene picture;
the processing module is used for determining color change information according to the time interval for inserting the picture between the last picture in the current scene picture and the first picture in the target scene picture and the color difference information, wherein the time interval is the duration between adjacent time points needing to insert the picture;
the selecting module is used for selecting the picture to be inserted at the time point according to the first leading color information and the color change information of the last picture in the current scene picture aiming at the time point of the picture to be inserted in the scene switching process, and inserting the picture after the time point is reached; or selecting the picture to be inserted at the time point according to the second dominant color information of the first picture in the target scene picture and the color change information, and inserting the picture after the time point is reached; or selecting the picture to be inserted at the time point according to the second dominant color information of the first picture in the target scene picture and the color change information, and inserting the picture after the time point is reached.
Optionally, the determining module is specifically configured to:
respectively determining first dominant color information of the last picture in the current scene picture and second dominant color information of the first picture in the target scene picture; and determining the color difference information according to the first dominant color information and the second dominant color information.
Drawings
Fig. 1 is a first flowchart illustrating a method for inserting a picture during scene change according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating pixel classification in a picture according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a method for inserting a picture according to an embodiment of the present invention;
fig. 4 is a schematic flowchart illustrating a second method for inserting a picture during scene change according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a device for inserting pictures during scene switching according to an embodiment of the present invention.
Detailed Description
The method comprises the steps of determining color difference information of a last picture in a current scene picture and a first picture in a target scene picture; determining color change information according to the time interval for inserting the picture between the last picture in the current scene picture and the first picture in the target scene picture and the color difference information, wherein the time interval is the time length between adjacent time points needing to insert the picture; aiming at a time point needing to be inserted into a picture in a scene switching process, selecting the picture needing to be inserted at the time point according to first leading color information and color change information of the last picture in a current scene picture, and inserting the picture after the time point is reached; or selecting the picture to be inserted at the time point according to the second dominant color information of the first picture in the target scene picture and the color change information, and inserting the picture after the time point is reached. According to the embodiment of the invention, the color change information of the inserted picture at each time point is determined according to the color difference information of the last picture in the current scene picture and the first picture in the target scene picture, and the picture inserted in the scene switching process is selected according to the dominant color information of the selected picture, so that the smooth switching of the front and rear scene pictures in the scene switching process in the color aspect is realized.
The embodiments of the present application will be described in further detail with reference to the drawings attached hereto.
As shown in fig. 1, a method for inserting a picture in scene change according to an embodiment of the present invention includes:
step 101, determining color difference information of a last picture in a current scene picture and a first picture in a target scene picture;
102, determining color change information according to a time interval for inserting pictures between the last picture in the current scene picture and the first picture in the target scene picture and the color difference information, wherein the time interval is the duration between adjacent time points needing to insert the pictures;
103, aiming at a time point of a picture needing to be inserted in the scene switching process, selecting the picture needing to be inserted at the time point according to the first dominant color information and the color change information of the last picture in the current scene picture, and inserting the picture after the time point is reached; or selecting the picture to be inserted at the time point according to the second dominant color information of the first picture in the target scene picture and the color change information, and inserting the picture after the time point is reached.
The execution main bodies of the embodiment of the invention include but are not limited to: televisions, computers, cell phones, etc.
The dominant color information in the embodiment of the invention represents the color parameter value influencing the color of the picture, and is the color parameter value which plays a role in determining the color of the picture. Wherein the dominant color information includes, but is not limited to, some or all of the following parameter values:
hue value, saturation value and brightness value.
Optionally, when color difference information of the last picture in the current scene picture and the first picture in the target scene picture is determined, first dominant color information of the last picture in the current scene picture and second dominant color information of the first picture in the target scene picture are respectively determined, and the color difference information is determined according to the first dominant color information and the second dominant color information.
In the embodiment of the invention, the current scene is the scene used by the user before switching, and the last picture in the current scene picture is the picture displayed by the equipment when the user determines to switch the scene; the target scene is a scene which a user needs to enter, and a first picture in a target scene picture is a picture which is firstly displayed when the user enters the target scene.
Optionally, the first dominant color information of the last picture in the current scene picture is determined according to the following manner.
Dividing all pixels in the last picture into a plurality of sets, wherein each type of color parameter value corresponding to the pixels in each set is in the same numerical value range; determining a set with the largest number of pixels in a plurality of sets, and averaging the same type of color parameter values of each pixel in the determined set to obtain an average value of each type of color parameter; and taking the average value of each type of color parameter as the first dominant color information of the last picture in the current scene picture.
The manner of determining the first dominant color information is exemplified below with hue, saturation and brightness as color parameters.
First, what can be supported based on the display screen and the display contentThe method comprises the following steps of (1) intercepting the last picture in the current scene, solving a corresponding HSL (hue, saturation and brightness) value of each pixel of the picture according to the RGB value of each pixel in the picture, and dividing colors into six categories C1-C6 according to the range of the saturation and the brightness, wherein as shown in FIG. 2, the range of the saturation and the brightness is 0-1.0, and the brightness is divided into three categories, namely low brightness (0-0.33), medium brightness (0.33-0.66) and high brightness (0.66-1.0) due to the fact that the brightness has a larger influence on the whole color field; the saturation is divided into two categories, low saturation (0-0.5), high saturation (0.5-1.0), wherein C1Indicating high brightness and high saturation, C2Indicating medium brightness high saturation, C3Indicating low brightness and high saturation, C4Indicating high brightness and low saturation, C5Indicating medium brightness low saturation, C6Indicating low brightness and low saturation.
The specific calculation method of the first dominant color information is as follows:
1. the saturation value (S) and the brightness value (L) corresponding to each pixel RGB in the picture are calculated, and the pixel is classified into C according to the saturation value and the brightness value1~C6Performing the following steps;
2. determination of C1~C6The class with the largest number of middle pixels is taken as the dominant color class C of the picturedom
3. Calculating dominant color class CdomAverage value of color parameters of all pixels in the image
Figure BDA0001562264100000091
And will be
Figure BDA0001562264100000092
As dominant color information for the picture.
Calculating dominant color class CdomAverage value of color parameters of all pixels in the image
Figure BDA0001562264100000093
Including calculation of
Figure BDA0001562264100000094
And
Figure BDA0001562264100000095
hypothesis CdomWith N pixels, then:
Figure BDA0001562264100000096
Figure BDA0001562264100000097
Figure BDA0001562264100000098
Figure BDA0001562264100000099
average value of color parameter
Figure BDA00015622641000000910
Namely the first dominant color information of the last picture in the current scene picture.
The above calculation method is only an example, and in the implementation, if some color parameters are not needed, no calculation may be performed in the calculation process, for example, if the color parameters based on only saturation and brightness in the process of selecting a picture, the value related to the hue parameter may not be calculated in the calculation of the dominant color information.
In the embodiment of the invention, in the process of selecting the picture, the dominant color information of the selected picture is also obtained according to the calculation mode.
In implementation, the first dominant color information of the last picture in the current scene picture obtained by each calculation is stored and updated in time.
Optionally, when determining the second dominant color information of the first picture in the target scene picture, if the target scene is not the first entry, there is the dominant color information of the first picture in the target scene picture that is stored last time, and if the target scene is the first entry, there is no dominant color information of the first picture in the target scene picture that is stored last time.
And then determining second dominant color information of the first picture in the target scene picture according to two different conditions according to whether the dominant color information of the first picture in the target scene picture stored for the last time exists.
The first condition is as follows: and when the dominant color information corresponding to the first picture in the target scene picture is stored for the last time, taking the dominant color information corresponding to the picture as second dominant color information of the first picture in the target scene picture.
Case two: and if the dominant color information corresponding to the first picture in the target scene picture which is stored for the last time does not exist, taking the preset information as the second dominant color information of the first picture in the target scene picture.
In the embodiment of the invention, the preset information is the first dominant color information of the last picture in the current scene picture obtained by calculation and is used as the second dominant color information of the first picture in the target scene picture, so that the color difference information between the last picture in the current scene picture and the first picture in the target scene picture is ensured to be 0.
Optionally, the first dominant color information includes a first brightness value and a first saturation value, the second dominant color information includes a second brightness value and a second saturation value, and after determining the first brightness value and the first saturation value of the last picture in the current scene picture and the second brightness value and the second saturation value of the first picture in the target scene picture, the saturation difference value and the brightness difference value of the last picture in the current scene picture and the first picture in the target scene picture are respectively calculated; different color difference information can be obtained according to the absolute value of the saturation difference value and the absolute value of the brightness difference value, and different rules for selecting pictures are different according to the color difference information.
Wherein, according to the absolute value of the saturation difference and the absolute value of the brightness difference, the color difference information can be determined in the following way:
if the absolute value of the saturation difference is larger than a set first threshold value and the absolute value of the brightness difference is smaller than a set second threshold value, taking the saturation difference as color difference information; if the absolute value of the saturation difference is smaller than a set first threshold value and the absolute value of the brightness difference is larger than a set second threshold value, taking the brightness difference as color difference information; if the absolute value of the saturation difference is larger than a set first threshold and the absolute value of the brightness difference is larger than a set second threshold, or the absolute value of the saturation difference is smaller than the set first threshold and the absolute value of the brightness difference is smaller than the set second threshold, taking the comprehensive difference as the color difference information; wherein the integrated difference is equal to a sum of the saturation difference multiplied by the first weight and the brightness difference multiplied by the second weight.
And selecting pictures according to different color difference information under three different conditions.
The first condition is as follows: the color difference information is a saturation difference.
Determining color change information according to the following formula:
Idelta=Iscope*Δt/Tscope(ii) a Wherein, IdeltaIs color change information; i isscopeIs color difference information; Δ t is the time interval for inserting the picture; t isscopeSwitching the duration for the scene;
for the nth time point needing to insert the picture, the saturation value range of the selected picture is Sorig+(n-1)*Idelta,Sorig+n*Idelta]And the brightness value of the selected picture is smaller than a third threshold, the absolute value of the difference between the brightness value of the selected picture and the first brightness value of the last picture in the current scene picture is not larger than a fourth threshold, and the absolute value of the difference between the brightness value of the selected picture and the second brightness value of the first picture in the target scene picture is not larger than the fourth threshold.
In the embodiment of the invention, the color difference information is marked as IscopeThe saturation value of the picture to be selected is SxA brightness value of LxThe first saturation value of the last picture in the current scene picture is SorigThe first brightness of the last picture in the current scene picture is LorigThe second saturation value of the first picture in the target scene picture is SdestThe second brightness value of the first picture in the target scene picture is Ldest
Taking the first threshold, the second threshold, the third threshold and the fourth threshold as 0.6, and taking the time interval Δ t of inserting the picture as 2s as an example, the method for selecting the picture when the color difference information is the saturation difference will be described.
The first threshold value, the second threshold value, the third threshold value and the fourth threshold value are all 0.6, namely | Sdest-Sorig︱>0.6 and | Ldest-Lorig︱<0.6, at this time, the color difference information is:
Iscope=Sdest-Sorigl, |x-Ldest︱<0.6,︱Lx-Lorig︱<0.6。
IscopeThe scene switching time length is T for the saturation difference value from the last picture in the current scene picture to the first picture in the target scene picturescopeInserting a picture every 2s, wherein the saturation change information in 2s is IdeltaAnd then:
Idelta=Iscope*2/Tscope
as shown in fig. 3, the schematic diagram of pictures inserted in the scene switching process is that when the current scene ends, the current scene is the time point of the first picture inserted, the first picture is inserted at the time point, and the saturation S of the first picturexIn [ S ]orig,Sorig+Idelta]Within range and brightness L of the first picturex<0.6; at an interval of 2S, a second picture is inserted at a second time point, wherein the saturation S of the second picture isxIs to be in [ Sorig+Idelta,Sorig+2Idelta]Within the range and the brightness L of the second picturex<0.6; inserting the nth picture at the nth time point, wherein the saturation S of the nth picturexIs to be in [ Sorig+(n-1)*Idelta,Sorig+n*Idelta]Within the range, and the brightness L of the nth picturex<0.6。
Case two: the color difference information is a luminance difference value.
Determining color change information according to the following formula:
Idelta=Iscope*Δt/Tscope(ii) a Wherein, IdeltaIs color change information; i isscopeIs color difference information; Δ t is the time interval for inserting the picture; t isscopeSwitching the duration for the scene;
for the nth time point needing to be inserted into the picture, the brightness value range of the picture is selected as [ L ]orig+(n-1)*Idelta,Lorig+n*Idelta](ii) a The saturation value of the picture is smaller than a fifth threshold, the absolute value of the difference value between the saturation value of the picture and the first saturation value of the last picture in the current scene picture is not larger than a sixth threshold, and the absolute value of the difference value between the saturation value of the picture and the second saturation value of the first picture in the target scene picture is not larger than the sixth threshold;
in the embodiment of the invention, the color difference information is marked as IscopeThe saturation value of the picture to be selected is SxA brightness value of LxThe first saturation value of the last picture in the current scene picture is SorigThe first brightness of the last picture in the current scene picture is LorigThe second saturation value of the first picture in the target scene picture is SdestThe second brightness value of the first picture in the target scene picture is Ldest
Taking the first threshold, the second threshold, the fifth threshold and the sixth threshold as 0.6, and taking the time interval Δ t of inserting the picture as 2s as an example, the method for selecting the picture when the color difference information is the luminance difference value will be described.
The first threshold value, the second threshold value, the fifth threshold value and the sixth threshold value are all 0.6, namely | Sdest-Sorig︱<0.6 and | Ldest-Lorig︱>0.6, at this time, the color difference information is:
Iscope=Ldest-Lorigand | Sx-Sdest︱<0.6,︱Sx-Sorig︱<0.6。
IscopeThe scene switching time length is T for the brightness difference value from the last picture in the current scene picture to the first picture in the target scene picturescopeInserting a picture every 2s, the brightness change information in 2s is IdeltaAnd then:
Idelta=Iscope*2/Tscope
as shown in fig. 3, the schematic diagram of pictures inserted in the scene switching process is that when the current scene ends, the current scene is the time point of the first picture inserted, and the first picture is inserted at the time point, and the brightness L of the first picturexIn [ L ]orig,Lorig+Idelta]Within range, and saturation S of the first picturex<0.6; at an interval of 2s, a second picture is inserted at a second time point, wherein the brightness L of the second picturexIs to be in [ Lorig+Idelta,Lorig+2Idelta]Within the range and the saturation S of the second picturex<0.6; inserting the nth picture at the nth time point, wherein the brightness L of the nth picturexIs to be in [ Lorig+(n-1)*Idelta,Lorig+n*Idelta]Within the range, and the saturation S of the nth picturex<0.6。
Case three: the color difference information is a composite difference value.
Determining color change information according to the following formula:
Idelta=Iscope*Δt/Tscope(ii) a Wherein, IdeltaIs color change information; i isscopeIs color difference information; Δ t is the time interval for inserting the picture; t isscopeSwitching the duration for the scene;
selecting an index value I of the picture for the nth time point needing to be inserted into the picturexIn the range of [ Iorig+(n-1)*Idelta,Iorig+n*Idelta]And I isx=Sx*A+Lx*B;
Wherein, Iorig=Sorig*A+Lorig*B;SxThe saturation value of the selected picture is obtained; l isxThe brightness value of the selected picture is obtained; i isdeltaIs color change information; sorigA first saturation value of the last picture in the current scene picture; l isorigA first brightness value of the last picture in the current scene picture; i isorigA first index value of the last picture in the current scene picture; a is a first weight; b is a second weight.
Taking the first threshold and the second threshold as 0.6, the first weight as 0.4, the second weight as 0.6, and the time interval Δ t of inserting the picture as 2s as an example, the method for selecting the picture when the color difference information is the integrated difference value will be described.
The first threshold and the second threshold are both 0.6, the first weight is 0.4, the second weight is 0.6, namely | Sdest-Sorig︱>0.6 and | Ldest-Lorig︱>0.6, or, | Sdest-Sorig︱<0.6 and | Ldest-Lorig︱<0.6, at this time, the color difference information is:
Iscope=(Sdest-Sorig)*0.4+(Ldest-Lorig)*0.6;
Iscopethe scene switching time length is T for the comprehensive difference value of the saturation and the brightness from the last picture in the current scene picture to the first picture in the target scene picturescopeInserting a picture every 2s, the brightness change information in 2s is IdeltaAnd then:
Idelta=Iscope*2/Tscope
in practice, for each picture to be selected, its index value I is calculated according to the following formulax
Ix=Sx*0.4+Lx*0.6;
Meanwhile, the index value I of the last picture in the current scene pictureorig=Sorig*0.4+Lorig*0.6。
As shown in fig. 3, the diagram of pictures inserted during the scene switching process is that the current scene ends at the time point of the first picture inserted, the first picture is inserted at the time point, and the index value I of the first picture isxIn [ I ]orig,Iorig+Idelta]Within the range, inserting a second picture at a second time point at intervals of 2s, wherein the index value I of the second picture isxIn [ I ]orig+Idelta,Iorig+2Idelta]Within the range, inserting the nth picture at the nth time point, wherein the index value I of the nth picturexIs to be inorig+(n-1)*Idelta,Iorig+n*Idelta]Within the range.
In the embodiment of the present invention, if the picture inserted at the time point is not selected according to the above picture selection method, the picture inserted at the time point may be selected in the following two methods.
The first method is as follows: if the time point of the last inserted picture exists at the time point, selecting the inserted picture according to the first dominant color information and the color change information of the last picture in the current scene picture aiming at the time point of the last inserted picture; and taking the selected picture as a picture to be inserted at the time point of the unselected picture, wherein the selected picture is different from the picture inserted at the last time point.
For example, as shown in fig. 3, if a picture meeting the requirement is not selected at the time point of the second inserted picture, a picture is selected for the time point of the second inserted picture according to the principle that a picture is selected at the time point of the first inserted picture, and the picture selected at the time point is different from the picture selected at the first time point.
The second method comprises the following steps: and if the time point of the last picture to be inserted does not exist at the time point, taking the set picture as the picture to be inserted at the time point of the unselected picture.
For example, as shown in fig. 3, if a picture meeting the requirement is not selected at the time point of the first picture insertion, the default picture is used as the picture inserted at the first time point.
When the picture is selected, in order to improve the efficiency of selecting the picture, the picture is preferentially selected from the stored pictures, the picture is not selected from the stored pictures, and the range of the selected picture can be a network or an inserted external device.
Optionally, when each picture is stored, the dominant color information HSL of each picture is calculated according to the calculation mode of the dominant color information of the picturex(Hx,Sx,Lx) And index value I corresponding to the picturex=Sx*A+LxB, and taking the obtained result as Sx、Lx、IxFor key values, three hash tables are established.
The embodiment of the invention records the S of each storage picture in a way of establishing the hash tablex、Lx、IxThe picture selecting method and the device are convenient to select the picture, and the picture selecting efficiency is improved.
The method for inserting pictures according to the embodiments of the present invention includes, but is not limited to, the following two methods.
The first method is as follows: selecting pictures to be inserted at all time points, and inserting the corresponding pictures after the time points are reached.
In the embodiment of the invention, at the initial stage of scene switching, all the pictures corresponding to the time points of the pictures to be inserted in the scene switching process are selected according to the dominant color information of the last picture in the current scene picture and the first picture in the target scene picture and the determined time interval, and in the switching process, after the time point of each inserted picture is reached, the corresponding selected pictures are inserted, for example, as shown in fig. 3, when the current scene is ended, the pictures of the first time point, the second time point, the third time point and the fourth time point are selected according to the picture selecting principle, and then the pictures corresponding to the time points are inserted every 2s in the scene switching process.
The second method comprises the following steps: and after the time point arrives, selecting the picture to be inserted at the time point, and inserting the picture.
In the embodiment of the present invention, for each time point, the picture is selected and inserted according to the above principle of selecting the picture, for example, as shown in fig. 3, when the current scene is ended, the picture is selected and inserted for the first time point, and after an interval of 2s, the picture is selected and inserted according to the second time point.
It should be noted that, in the embodiment of the present invention, for a time point when a picture is inserted, one or a group of pictures may be inserted at the time point, and when a group of pictures is inserted, the group of pictures is reduced to enable the group of pictures to be displayed on the same screen. And if a plurality of pictures inserted at the time point are selected according to the picture selection mode, randomly selecting one or one group of pictures from the plurality of pictures as the pictures inserted at the time point.
Fig. 4 is a flowchart illustrating an overall method for inserting pictures during a scene change process according to an embodiment of the present invention.
Step 401, calculating first dominant color information of a last picture in a current scene picture;
step 402, judging whether dominant color information of a first picture in a stored target scene picture exists, if so, executing step 403, and if not, executing step 404;
step 403, taking the dominant color information of the first picture in the target scene picture stored for the last time as the second dominant color information of the first picture in the target scene picture;
step 404, using preset information as second dominant color information of the first picture in the target scene picture;
step 405, determining color difference information according to the first dominant color information and the second dominant color information;
step 406, determining color change information according to the color difference information, the time interval of inserting the picture and the scene switching duration;
step 407, selecting a picture inserted at a time point according to the first dominant color information and the color change information for the time point at which the picture is inserted;
step 408, judging whether a picture meeting the condition is selected, if so, executing step 412, and if not, executing step 409;
step 409, determining whether the time point is the first time point of the inserted picture, if so, executing step 410, and if not, executing step 411;
step 410, selecting a set picture as a picture to be inserted at the time point;
step 411, selecting a picture at a previous time point, and taking the selected picture as a picture to be inserted at the time point, wherein the selected picture is different from the picture inserted at the previous time point;
at step 412, the picture is inserted after the time point is reached.
Based on the same inventive concept, the embodiment of the present application further provides a device for inserting pictures in scene switching, and as the principle of solving the problem of the device is similar to the method for inserting pictures in scene switching in the embodiment of the present application, the implementation of the device may refer to the implementation of the method, and repeated parts are not described again.
As shown in fig. 5, an apparatus for inserting a picture in scene change includes:
a determining module 501, configured to determine color difference information between a last picture in a current scene picture and a first picture in a target scene picture;
a processing module 502, configured to determine color change information according to a time interval between insertion of a last picture in a current scene picture and a first picture in a target scene picture, and the color difference information;
a selecting module 503, configured to select, according to first dominant color information and the color change information of a last picture in a current scene picture, a picture to be inserted at a time point when a picture needs to be inserted in a scene switching process, and insert the picture after the time point arrives; or selecting the picture to be inserted at the time point according to the second dominant color information of the first picture in the target scene picture and the color change information, and inserting the picture after the time point is reached.
Optionally, the determining module 501 is specifically configured to:
respectively determining first dominant color information of the last picture in the current scene picture and second dominant color information of the first picture in the target scene picture; and determining the color difference information according to the first dominant color information and the second dominant color information.
The present application is described above with reference to block diagrams and/or flowchart illustrations of methods, apparatus (systems) and/or computer program products according to embodiments of the application. It will be understood that one block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, and/or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer and/or other programmable data processing apparatus, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks.
Accordingly, the subject application may also be embodied in hardware and/or in software (including firmware, resident software, micro-code, etc.). Furthermore, the present application may take the form of a computer program product on a computer-usable or computer-readable storage medium having computer-usable or computer-readable program code embodied in the medium for use by or in connection with an instruction execution system. In the context of this application, a computer-usable or computer-readable medium may be any medium that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (8)

1. A method for inserting pictures in scene change, the method comprising:
determining color difference information of the last picture in the current scene picture and the first picture in the target scene picture;
determining color change information according to the time interval for inserting the picture between the last picture in the current scene picture and the first picture in the target scene picture and the color difference information, wherein the time interval is the time length between adjacent time points needing to insert the picture;
selecting a picture to be inserted at a time point according to first dominant color information and the color change information of the last picture in a current scene picture aiming at the time point of the picture to be inserted in the scene switching process, and inserting the picture after the time point is reached; or selecting the picture to be inserted at the time point according to the second dominant color information of the first picture in the target scene picture and the color change information, and inserting the picture after the time point is reached;
wherein the first dominant color information is a color parameter value that determines a color of the last picture, and the first dominant color information includes some or all of the following parameter values: hue value, saturation value and brightness value;
the second dominant color information is a color parameter value that determines a color of the first picture, and the second dominant color information includes some or all of the following parameter values: hue value, saturation value and brightness value;
for a time point of inserting a picture, one or a group of pictures can be inserted at the time point, and when a group of pictures is inserted, the group of pictures is reduced to enable the group of pictures to be displayed on the same picture.
2. The method of claim 1, wherein determining color difference information for a last picture in the current scene picture and a first picture in the target scene picture comprises:
respectively determining first dominant color information of the last picture in the current scene picture and second dominant color information of the first picture in the target scene picture;
and determining the color difference information according to the first dominant color information and the second dominant color information.
3. The method of claim 2, wherein determining the first dominant color information for the last picture in the current scene picture comprises:
dividing all pixels in the last picture into a plurality of sets, wherein each type of color parameter value corresponding to the pixels in each set is in the same numerical value range;
determining a set with the largest number of pixels in a plurality of sets, and averaging the same type of color parameter values of each pixel in the determined set to obtain an average value of each type of color parameter;
and taking the average value of each type of color parameter as the first dominant color information of the last picture in the current scene picture.
4. The method of claim 2, wherein determining the second dominant color information for the first picture in the target scene picture comprises:
if dominant color information of a first picture in the target scene picture stored for the last time exists, taking the dominant color information of the first picture in the target scene picture stored for the last time as second dominant color information of the first picture in the target scene picture;
and if the dominant color information of the first picture in the target scene picture which is stored for the last time does not exist, taking preset information as second dominant color information of the first picture in the target scene picture.
5. The method of claim 2, wherein the first dominant color information comprises a first luminance value and a first saturation value; the second dominant color information comprises a second luminance value and a second saturation value;
the determining the color difference information according to the first dominant color information and the second dominant color information specifically includes:
determining a brightness difference value according to a first brightness value of the first dominant color information and a second brightness value of the second dominant color information, and determining a saturation difference value according to a first saturation value of the first dominant color information and a second saturation value of the second dominant color information;
if the absolute value of the saturation difference is larger than a set first threshold value and the absolute value of the brightness difference is smaller than a set second threshold value, taking the saturation difference as color difference information;
if the absolute value of the saturation difference is smaller than a set first threshold value and the absolute value of the brightness difference is larger than a set second threshold value, taking the brightness difference as color difference information;
and if the absolute value of the saturation difference is greater than a set first threshold and the absolute value of the brightness difference is greater than a set second threshold, or the absolute value of the saturation difference is less than the set first threshold and the absolute value of the brightness difference is less than the set second threshold, taking a comprehensive difference as the color difference information, wherein the comprehensive difference is equal to the sum of the saturation difference multiplied by a first weight and the brightness difference multiplied by a second weight.
6. The method of claim 5, wherein the color change information is determined according to the following formula:
Idelta=Iscope*Δt/Tscope
wherein, IdeltaIs color change information;
Iscopeis color difference information;
Δ t is the time interval for inserting the picture;
Tscopethe duration is switched for the scene.
7. The method of claim 6, wherein selecting the inserted picture according to the first dominant color information and the color change information of the last picture in the current scene picture comprises:
if the color difference information is a saturation difference value, the saturation value range of the selected picture is [ S ] for the nth time point needing to be inserted into the pictureorig+(n-1)*Idelta,Sorig+n*Idelta]The brightness value of the selected picture is smaller than a third threshold, the absolute value of the difference between the brightness value of the picture and the first brightness value of the last picture in the current scene picture is not larger than a fourth threshold, and the absolute value of the difference between the brightness value of the selected picture and the second brightness value of the first picture in the target scene picture is not larger than the fourth threshold;
if the color difference information is a brightness difference value, selecting the brightness value range of the picture as [ L ] for the nth time point needing to be inserted into the pictureorig+(n-1)*Idelta,Lorig+n*Idelta](ii) a The saturation value of the picture is smaller than a fifth threshold, the absolute value of the difference value between the saturation value of the picture and the first saturation value of the last picture in the current scene picture is not larger than a sixth threshold, and the absolute value of the difference value between the saturation value of the picture and the second saturation value of the first picture in the target scene picture is not larger than the sixth threshold;
if the color difference information is a comprehensive difference value, selecting an index value I of the picture for the nth time point needing to be inserted into the picturexIn the range of [ Iorig+(n-1)*Idelta,Iorig+n*Idelta]And I isx=Sx*A+Lx*B;
Wherein, Iorig=Sorig*A+Lorig*B;
SxThe saturation value of the selected picture is obtained;
Lxthe brightness value of the selected picture is obtained;
Ideltais color change information;
Sorigfor last picture in current sceneA first saturation value;
Loriga first brightness value of the last picture in the current scene picture;
Ioriga first index value of the last picture in the current scene picture;
a is a first weight;
b is a second weight.
8. The method of claim 7, further comprising:
if the picture inserted at the time point is not selected and the time point of the last picture is existed, selecting the inserted picture according to the first dominant color information and the color change information of the last picture in the current scene picture aiming at the time point of the last picture; taking the selected picture as a picture to be inserted at the time point of the unselected picture, wherein the selected picture is different from the picture inserted at the previous time point;
and if the picture inserted at the time point is not selected and the time point of the last picture to be inserted does not exist, taking the set picture as the picture to be inserted at the time point of the unselected picture.
CN201810085403.9A 2015-08-13 2015-08-13 Method for inserting picture in scene switching Active CN108335292B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810085403.9A CN108335292B (en) 2015-08-13 2015-08-13 Method for inserting picture in scene switching

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810085403.9A CN108335292B (en) 2015-08-13 2015-08-13 Method for inserting picture in scene switching
CN201510497429.0A CN105184773B (en) 2015-08-13 2015-08-13 The method and apparatus of insert pictures in a kind of scene switching

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201510497429.0A Division CN105184773B (en) 2015-08-13 2015-08-13 The method and apparatus of insert pictures in a kind of scene switching

Publications (2)

Publication Number Publication Date
CN108335292A CN108335292A (en) 2018-07-27
CN108335292B true CN108335292B (en) 2021-07-30

Family

ID=54906826

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201510497429.0A Active CN105184773B (en) 2015-08-13 2015-08-13 The method and apparatus of insert pictures in a kind of scene switching
CN201810085403.9A Active CN108335292B (en) 2015-08-13 2015-08-13 Method for inserting picture in scene switching

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201510497429.0A Active CN105184773B (en) 2015-08-13 2015-08-13 The method and apparatus of insert pictures in a kind of scene switching

Country Status (1)

Country Link
CN (2) CN105184773B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110706666B (en) * 2019-09-16 2021-08-24 深圳市华星光电半导体显示技术有限公司 Picture transition method, device, controller and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1980331A (en) * 2005-12-05 2007-06-13 株式会社日立制作所 Characteristic image detection method and apparatus, image difference detection method and apparatus
CN101686402A (en) * 2008-09-23 2010-03-31 美国博通公司 Video dataprocessing method and system
CN102360490A (en) * 2011-09-30 2012-02-22 北京航空航天大学 Color conversion and editing propagation-based method for enhancing seasonal feature of image
JP2014110020A (en) * 2012-12-04 2014-06-12 Samsung R&D Institute Japan Co Ltd Image processor, image processing method and image processing program
CN103946871A (en) * 2011-12-02 2014-07-23 索尼公司 Image processing device, image recognition device, image recognition method, and program
CN104299252A (en) * 2014-10-17 2015-01-21 惠州Tcl移动通信有限公司 Picture display switching transition method and system thereof

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7319493B2 (en) * 2003-03-25 2008-01-15 Yamaha Corporation Apparatus and program for setting video processing parameters
JP4285287B2 (en) * 2004-03-17 2009-06-24 セイコーエプソン株式会社 Image processing apparatus, image processing method and program, and recording medium
CN101594471A (en) * 2008-05-30 2009-12-02 新奥特(北京)视频技术有限公司 A kind of method for changing scenes
JP5434231B2 (en) * 2009-04-24 2014-03-05 ソニー株式会社 Image information processing apparatus, imaging apparatus, image information processing method, and program
GB2483433A (en) * 2010-08-31 2012-03-14 Sony Corp 3D image adjustment based on differences in colour properties between stereo pair

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1980331A (en) * 2005-12-05 2007-06-13 株式会社日立制作所 Characteristic image detection method and apparatus, image difference detection method and apparatus
CN101686402A (en) * 2008-09-23 2010-03-31 美国博通公司 Video dataprocessing method and system
CN102360490A (en) * 2011-09-30 2012-02-22 北京航空航天大学 Color conversion and editing propagation-based method for enhancing seasonal feature of image
CN103946871A (en) * 2011-12-02 2014-07-23 索尼公司 Image processing device, image recognition device, image recognition method, and program
JP2014110020A (en) * 2012-12-04 2014-06-12 Samsung R&D Institute Japan Co Ltd Image processor, image processing method and image processing program
CN104299252A (en) * 2014-10-17 2015-01-21 惠州Tcl移动通信有限公司 Picture display switching transition method and system thereof

Also Published As

Publication number Publication date
CN105184773B (en) 2018-05-01
CN108335292A (en) 2018-07-27
CN105184773A (en) 2015-12-23

Similar Documents

Publication Publication Date Title
TWI435287B (en) Depth map generation for a video conversion system
CN107680056B (en) Image processing method and device
CN109686342B (en) Image processing method and device
CN107526504B (en) Image display method and device, terminal and storage medium
CN109791695A (en) Motion vector image block based determines described piece of variance
CN108009997B (en) Method and device for adjusting image contrast
CN111835982B (en) Image acquisition method, image acquisition device, electronic device, and storage medium
WO2022042754A1 (en) Image processing method and apparatus, and device
US20140125836A1 (en) Robust selection and weighting for gray patch automatic white balancing
TW200823802A (en) Methods and apparatuses for motion detection
CN105681775A (en) White balance method and device
US7657115B2 (en) Image edge enhancement apparatus and method thereof
CN112907457A (en) Image processing method, image processing device and computer equipment
US20170161875A1 (en) Video resolution method and apparatus
WO2017152822A1 (en) Image processing method and device
CN108335292B (en) Method for inserting picture in scene switching
US8958640B1 (en) Image color cast correction using groups of pixels
EP3206387B1 (en) Image dynamic range adjustment method, terminal, and storage media
CN112449115B (en) Shooting method and device and electronic equipment
CN111097169B (en) Game image processing method, device, equipment and storage medium
US8977043B2 (en) Method of image depth estimation and apparatus thereof
CN105893578B (en) A kind of method and device of photo selection
CN115439386A (en) Image fusion method and device, electronic equipment and storage medium
US20170310942A1 (en) Method and apparatus for processing three-dimensional (3d) pseudoscopic images
KR102215607B1 (en) Electronic device capable of correction to improve the brightness of dark images and operating method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant