Suche Bilder Maps Play YouTube News Gmail Drive Mehr »
Anmelden
Nutzer von Screenreadern: Klicke auf diesen Link, um die Bedienungshilfen zu aktivieren. Dieser Modus bietet die gleichen Grundfunktionen, funktioniert aber besser mit deinem Reader.

Patentsuche

  1. Erweiterte Patentsuche
VeröffentlichungsnummerCN104967922 A
PublikationstypAnmeldung
AnmeldenummerCN 201510375489
Veröffentlichungsdatum7. Okt. 2015
Eingetragen30. Juni 2015
Prioritätsdatum30. Juni 2015
Veröffentlichungsnummer201510375489.5, CN 104967922 A, CN 104967922A, CN 201510375489, CN-A-104967922, CN104967922 A, CN104967922A, CN201510375489, CN201510375489.5
Erfinder朱柏涛
Antragsteller北京奇艺世纪科技有限公司
Zitat exportierenBiBTeX, EndNote, RefMan
Externe Links:  SIPO, Espacenet
Subtitle adding position determining method and device
CN 104967922 A
Zusammenfassung
The invention provides a subtitle adding position determining method and device. The method comprises the steps that a subtitle covering pixel set is determined; a subtitle adding candidate region is selected in a screen; according to the subtitle covering pixel set, the subtitle adding candidate region is divided into at least two subtitle adding regions, wherein iteration pixel by pixel is carried out on each subtitle adding region; the pixel energy value of each subtitle adding region is calculated; and according to pixel energy values, a subtitle adding region is selected for subtitle adding. According to the method and the device, which are provided by the invention, according to the subtitle covering pixel set, the subtitle adding candidate region is divided into at least two subtitle adding regions; the pixel energy value of each subtitle adding region is calculated; a region with relatively minor vision is found in the video screen, and subtitles are added in the region; and less key elements are obscured by the added subtitles.
Ansprüche(10)  übersetzt aus folgender Sprache: Chinesisch
1. 一种确定字幕添加位置的方法,其特征在于,包括: 确定字幕覆盖像素的集合; 在画面中选取字幕添加候选区域; 依据所述字幕覆盖像素的集合将所述字幕添加候选区域划分成至少两个字幕添加区域,各个所述字幕添加区域之间逐像素迭代; 分别计算各个所述字幕添加区域的像素能量值; 依据所述像素能量值,选取所述字幕添加区域添加所述字幕。 1. A method for determining a location of captions, characterized by comprising: determining a set of pixels covering subtitle; select subtitles on the screen to add candidate region; set covering the subtitle pixels according to the captions candidate region is divided into subtitles add at least two regions, each of the pixel-by captions iteration between regions; add captions were calculated for each of the energy value of the pixel region; a pixel based on the energy value, select the area to add captions to add the subtitles.
2. 根据权利要求1所述的方法,其特征在于,所述确定字幕覆盖像素的集合,包括: 光栅化所述字幕,生成所述字幕的掩码图,所述掩码图中包括:空白像素和字幕颜色填充像素; 统计所述空白像素和所述字幕颜色填充像素的集合为所述字幕覆盖像素的集合。 2. A method according to claim 1, wherein said determining a set of pixels covering subtitles, comprising: rasterizing the caption, the caption generating FIG mask, said mask comprising diagram: Blank subtitles pixels and pixel color fill; the collection of statistics and the caption blank pixel color pixel is filled with a collection of pixels of the subtitle overlay.
3. 根据权利要求1所述的方法,其特征在于,所述分别计算各个所述字幕添加区域的像素能量值,包括: 计算所述字幕覆盖的各帧画面的所述字幕添加区域内各个像素的能量值的集合作为所述字幕添加区域的能量值; 其中,一帧画面的所述字幕添加区域中的一个像素I(x,y)的能量值为E(I(x,y)); 3. The method according to claim 1, wherein said calculating each pixel value of the energy of the subtitling area, respectively, comprising: calculating the caption of the caption overlay each frame pictures added each pixel region set as the energy value of the energy value of the area of captions; wherein one frame of said audio add energy region of one pixel I (x, y) value E (I (x, y));
Figure CN104967922AC00021
像素I(X,y)水平方向的坐标分量,y为像素I(X,y)垂直方向的坐标分量。 Pixel coordinate components I (X, y) in the horizontal direction, y is the pixel I (X, y) coordinates of the components in the vertical direction.
4. 根据权利要求1所述的方法,其特征在于,所述依据所述字幕覆盖像素的集合将所述字幕添加候选区域划分成至少两个字幕添加区域,各个所述字幕添加区域之间逐像素迭代,包括: 依据所述字幕覆盖像素的集合,按照从左到右,从上到下的顺序将所述字幕添加候选区域划分成至少两个字幕添加区域,各个所述字幕添加区域之间逐像素迭代。 4. The method according to claim 1, wherein the set of pixels covering the caption based on the captions candidate region is divided into at least two regions to add subtitles, captions added by each of the regions between Iterative pixels, comprising: based on the set of pixels covering subtitles, from left to right, top to bottom in order of the captions candidate region is divided into at least two regions add subtitles, captions between each of the regions pixel by pixel iteration.
5. 根据权利要求1所述的方法,其特征在于,所述在画面中选取字幕添加候选区域包括: 在所述画面的顶部和/或底部划分所述字幕添加候选区域,所述字幕添加候选区域与所述画面的高度比例为预设值。 5. The method according to claim 1, wherein said selected picture caption in addition candidate area comprises: at the top of the screen and / or bottom of the dividing subtitling candidate region, the candidate captions height ratio of the area of the screen is the default value.
6. -种确定字幕添加位置的装置,其特征在于,包括: 像素集合确定模块,用于确定字幕覆盖像素的集合; 候选区域选取模块,用于在画面中选取字幕添加候选区域; 区域划分模块,用于依据所述字幕覆盖像素的集合将所述字幕添加候选区域划分成至少两个字幕添加区域,各个所述字幕添加区域之间逐像素迭代; 像素能量值计算模块,用于分别计算各个所述字幕添加区域的像素能量值; 字幕添加模块,用于依据所述像素能量值,选取所述字幕添加区域添加所述字幕。 6. - kind of subtitling device location determination, characterized by comprising: a set of pixels determination module for determining the set of pixels covering subtitles; candidate region selected module, select subtitles on the screen for adding candidate areas; zoning module , according to the caption for the set of pixels covering the captions candidate region is divided into at least two regions to add subtitles, captions for each of the pixel-wise iterations between regions; pixel energy value calculation module that calculates for each the captions pixel energy value area; captions module for energy in accordance with the pixel values, select the area to add captions to add the subtitles.
7. 根据权利要求6所述的装置,其特征在于,所述像素集合确定模块包括: 掩码图生成单元,用于光栅化所述字幕,生成所述字幕的掩码图,所述掩码图中包括: 空白像素和字幕颜色填充像素; 像素集合统计单元,用于统计所述空白像素和所述字幕颜色填充像素的集合为所述字幕覆盖像素的集合。 7. The apparatus according to claim 6, wherein said set of pixels determining module comprises: FIG mask generating unit for rasterizing the caption, the caption generating FIG mask, said mask Figure includes: blank pixels and pixel color fill subtitles; pixel aggregate statistical unit for the collection of statistical blank pixels and pixel color fills the subtitle as a collection of pixels of the subtitle overlay.
8. 根据权利要求6所述的装置,其特征在于,所述像素能量值计算模块具体用于,计算所述字幕覆盖的各帧所述画面的所述字幕添加区域内各个像素的能量值的集合作为所述字幕添加区域的能量值; 其中,一帧画面的所述字幕添加区域中的一个像素I(x,y)的能量值为E(I(x,y)); 8. The apparatus according to claim 6, wherein said specific pixel energy value calculation module for calculating said cover Subtitle each frame of the picture area within each pixel to add the energy values collection as the subtitling area energy value; wherein, one frame of said audio add energy region of one pixel I (x, y) of the value of E (I (x, y));
Figure CN104967922AC00031
为像素I(X,y)水平方向的坐标分量,y为像素I(X,y)垂直方向的坐标分量。 Pixel I (X, y) coordinates of the horizontal component, y is the pixel coordinate components I (X, y) in the vertical direction.
9. 根据权利要求6所述的装置,其特征在于,所述区域划分模块具体用于,依据所述字幕覆盖像素的集合,按照从左到右,从上到下的顺序将所述字幕添加候选区域划分成至少两个字幕添加区域,各个所述字幕添加区域之间逐像素迭代。 9. The apparatus according to claim 6, wherein said region dividing module for specific, based on the set of pixels covering the subtitles, from left to right, top to bottom adding the caption candidate region is divided into at least two regions to add subtitles, captions added by each of the pixel area between iterations.
10. 根据权利要求6所述的装置,其特征在于,所述候选区域选取模块具体用于,在所述画面的顶部和/或底部划分所述字幕添加候选区域,所述字幕添加候选区域与所述画面的高度比例为预设值。 10. The apparatus according to claim 6, characterized in that the candidate region is used to select the particular module, adding a candidate area at the top of the screen and / or bottom of the dividing subtitles, captions for the candidate region and height ratio of the screen is the default value.
Beschreibung  übersetzt aus folgender Sprache: Chinesisch
一种确定字幕添加位置的方法及装置 A method of determining the position of subtitling method and apparatus

技术领域 TECHNICAL FIELD

[0001] 本发明涉及视频技术领域,特别是涉及一种确定字幕添加位置的方法及装置。 [0001] The present invention relates to the field of video technology, particularly to a method and apparatus for determining the position of captions.

背景技术 Background technique

[0002] 字幕(subtitlesofmotionpicture)是以文字形式显示视频对话内容,也是视频后期加工的文字,如演职员表、注释。 [0002] subtitles (subtitlesofmotionpicture) is displayed video text conversations, but also video post-processing of text, such as credits, notes.

[0003] 在中国,不同地区语言的发音差别很大,不能听懂普通话的人很多。 Many [0003] In China, the pronunciation of the language in different regions vary greatly, people can not understand Mandarin. 但是文字写法的差异并不大,人们大都能理解文字。 But the difference is not large spellings, big people can understand the text. 所以,对应普通话(或方言)的字幕被附加在视频中。 Therefore, the corresponding Putonghua (or dialect) is added subtitles in the video. 另外,在外语视频中添加字幕,可以使听不懂外语的观众也能欣赏外语原声的外语视频。 In addition, add subtitles in foreign language video, you can make the audience did not understand a foreign language can also enjoy Western Western video soundtrack.

[0004] 用户观看视频时,往往会被画面中最重要、最具代表性、最易引起注意的区域吸弓丨,这部分区域通常称为图像视觉显著性区域。 [0004] When users watch videos, pictures tend to be the most important, most representative, most likely to attract attention bow 丨 suction area, this part of the region is generally referred to as image saliency region. 传统方法将字幕固定添加在画面的底部中央,但是由于视频内容的丰富多样,字幕可能会遮挡住图像视觉显著性区域。 Traditional methods fixed subtitles added in the bottom center of the screen, but due to diverse video content, audio visual images may be obscured significant areas. 而且由于画面之间通常具有连贯性,而且这种遮挡往往会是持续性的,影响观赏体验。 And because typically have coherence between the screen, and this tends to be obscured persistent, affect the viewing experience.

[0005] 因此,本领域技术人员亟待解决的技术问题是:如何防止字幕遮挡住图像视觉显著性区域。 [0005] Thus, the technical problem to be solved skilled in the art is: how to prevent subtitles obscured image saliency region.

发明内容 SUMMARY

[0006] 本发明实施例提供了一种确定字幕添加位置的方法及装置,以解决字幕会遮挡住图像视觉显著性区域的技术问题。 [0006] embodiment of the invention provides a method and apparatus for determining the location to add subtitles, captions will be blocked in order to resolve technical problems image saliency region.

[0007] 为了解决上述问题,本发明实施例公开了一种确定字幕添加位置的方法,包括: [0007] In order to solve the above problems, the present embodiment of the invention discloses a method for determining the position of captions, comprising:

[0008] 确定字幕覆盖像素的集合; [0008] determining a set of pixels covering subtitles;

[0009] 在画面中选取字幕添加候选区域; [0009] Select Captions candidate region on the screen;

[0010] 依据所述字幕覆盖像素的集合将所述字幕添加候选区域划分成至少两个字幕添加区域,各个所述字幕添加区域之间逐像素迭代; [0010] based on the set of pixels of the subtitle overlay captions candidate region is divided into at least two regions to add subtitles, captions added by each of the pixel area between iterations;

[0011] 分别计算各个所述字幕添加区域的像素能量值; [0011] were calculated for each of the captions pixel energy value of an area;

[0012] 依据所述像素能量值,选取所述字幕添加区域添加所述字幕。 [0012] based on the pixel energy value, select the area to add captions to add the subtitles.

[0013] 优选地,所述确定字幕覆盖像素的集合,包括: [0013] Preferably, determining the pixel coverage subtitle set, comprising:

[0014] 光栅化所述字幕,生成所述字幕的掩码图,所述掩码图中包括:空白像素和字幕颜色填充像素; [0014] The rasterized subtitles, the subtitle generation mask view of a mask figure includes: blank pixels and pixel color fill subtitles;

[0015] 统计所述空白像素和所述字幕颜色填充像素的集合为所述字幕覆盖像素的集合。 [0015] The collection of statistics and the caption blank pixel color pixel is filled with a collection of pixels of the subtitle overlay.

[0016] 优选地,所述分别计算各个所述字幕添加区域的像素能量值,包括: [0016] Preferably, the captions are calculated for each pixel of the energy value of the area, including:

[0017] 计算所述字幕覆盖的各帧画面的所述字幕添加区域内各个像素的能量值的集合作为所述字幕添加区域的能量值; The caption [0017] calculation of the coverage of each caption frames to add energy value of each pixel within the region as a set region of the captions energy value;

[0018] 其中,一帧画面的所述字幕添加区域中的一个像素I(x,y)的能量值为E(I(x,y)); [0018] wherein, one frame of said audio add energy region of one pixel I (x, y) of the value of E (I (x, y));

Figure CN104967922AD00051

分,X为像素I(x,y)水平方向的坐标分量,y为像素I(x,y)垂直方向的坐标分量。 Points, X is the pixel I (x, y) coordinates of the horizontal component, y is the pixel I (x, y) coordinates of the components in the vertical direction.

[0021] 优选地,所述依据所述字幕覆盖像素的集合将所述字幕添加候选区域划分成至少两个字幕添加区域,各个所述字幕添加区域之间逐像素迭代,包括: [0021] Preferably, the subtitles will be added based on the set of pixels covering the caption candidate area is divided into at least two regions to add subtitles, captions added by each of the pixel area between iterations, including:

[0022] 依据所述字幕覆盖像素的集合,按照从左到右,从上到下的顺序将所述字幕添加候选区域划分成至少两个字幕添加区域,各个所述字幕添加区域之间逐像素迭代。 [0022] based on the set of pixels covering caption, from left to right, top to bottom in order of the captions candidate region is divided into at least two regions to add subtitles, captions added by each of the pixel area between iteration.

[0023] 优选地,所述在画面中选取字幕添加候选区域包括: [0023] Preferably, in the selected picture caption addition candidate region comprises:

[0024] 在所述画面的顶部和/或底部划分所述字幕添加候选区域,所述字幕添加候选区域与所述画面的高度比例为预设值。 [0024] Add the candidate area at the top of the screen and / or dividing the bottom of subtitles, captions height ratio of the region and the candidate picture preset value.

[0025] 本发明实施例还提供了一种确定字幕添加位置的装置,包括: [0025] Embodiments of the present invention also provides a means for determining the position of captions, including:

[0026] 像素集合确定模块,用于确定字幕覆盖像素的集合; [0026] a set of pixels determination module for determining a set of pixels covering subtitles;

[0027] 候选区域选取模块,用于在画面中选取字幕添加候选区域; [0027] candidate region selected module, select subtitles on the screen for adding candidate region;

[0028] 区域划分模块,用于依据所述字幕覆盖像素的集合将所述字幕添加候选区域划分成至少两个字幕添加区域,各个所述字幕添加区域之间逐像素迭代; [0028] zoning module, according to the caption for the set of pixels covering the captions candidate region is divided into at least two regions to add subtitles, captions for each of the pixel-wise iterations between regions;

[0029] 像素能量值计算模块,用于分别计算各个所述字幕添加区域的像素能量值; [0029] pixel energy value calculation module for each of the captions were calculated pixel values of the energy area;

[0030] 字幕添加模块,用于依据所述像素能量值,选取所述字幕添加区域添加所述字幕。 [0030] subtitling module for energy based on the pixel values, select the area to add captions to add the subtitles.

[0031] 优选地,所述像素集合确定模块包括: [0031] Preferably, the set of pixels determining module comprises:

[0032] 掩码图生成单元,用于光栅化所述字幕,生成所述字幕的掩码图,所述掩码图中包括:空白像素和字幕颜色填充像素; [0032] FIG mask generation unit for rasterizing the subtitles, the subtitle generation mask view of a mask figure includes: blank pixels and pixel color fill subtitles;

[0033] 像素集合统计单元,用于统计所述空白像素和所述字幕颜色填充像素的集合为所述字幕覆盖像素的集合。 [0033] pixel aggregate statistical unit, the collection of statistics for the subtitle color pixels and blank pixels is filled with a collection of the subtitle overlay pixel.

[0034] 优选地,所述像素能量值计算模块具体用于,计算所述字幕覆盖的各帧所述画面的所述字幕添加区域内各个像素的能量值的集合作为所述字幕添加区域的能量值; [0034] Preferably, the specific pixel energy value calculation module for calculating the coverage of the Subtitle each frame of the picture as an added set of regional energy value of each pixel of the region's energy captions value;

[0035] 其中,一帧画面的所述字幕添加区域中的一个像素I(x,y)的能量值为E(I(x,y)); [0035] wherein, one frame of said audio add energy region of one pixel I (x, y) of the value of E (I (x, y));

Figure CN104967922AD00052

分,X为像素I(X,y)水平方向的坐标分量,y为像素I(X,y)垂直方向的坐标分量。 Points, X coordinate components of the pixel I (X, y) in the horizontal direction, y is the pixel I (X, y) coordinates of the components in the vertical direction.

[0038] 优选地,所述区域划分模块具体用于,依据所述字幕覆盖像素的集合,按照从左到右,从上到下的顺序将所述字幕添加候选区域划分成至少两个字幕添加区域,各个所述字幕添加区域之间逐像素迭代。 [0038] Preferably, the zoning for specific modules, based on the set of pixels covering subtitles, from left to right, top to bottom in order of the captions candidate region is divided into at least two captions area, each of the pixel-by captions iterations between regions.

[0039] 优选地,所述候选区域选取模块具体用于,在所述画面的顶部和/或底部划分所述字幕添加候选区域,所述字幕添加候选区域与所述画面的高度比例为预设值。 [0039] Preferably, the candidate region for selecting particular module, adding a candidate area at the top of the screen and / or dividing the bottom of subtitles, captions height ratio of the region and the candidate for the default screen value.

[0040] 与现有技术相比,本发明实施例包括以下优点: [0040] Compared with the prior art, the embodiment of the invention comprises the following advantages:

[0041] 依据字幕覆盖像素的集合将字幕添加候选区域划分成至少两个字幕添加区域,分别计算各个字幕添加区域像素能量值;依据各个字幕添加区域像素能量值,找到视频画面中视觉相对次要的区域,并在此添加字幕,有效地减少添加字幕对关键内容的遮挡。 [0041] based on the set of pixels covering subtitles add subtitles candidate region is divided into at least two regions to add subtitles, captions are calculated for each region pixel energy value; add energy region pixel values based on various subtitles, video footage found relatively minor visual area, and in this add subtitles, add subtitles to effectively reduce the key elements of the cover.

附图说明 BRIEF DESCRIPTION

[0042] 为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。 [0042] In order to more clearly illustrate the embodiments or the prior art technical solutions embodiment of the present invention, it will implement the following figures for the cases described in the prior art or the need to use a simple introduction. Apparently, the following description the drawings are only some embodiments of the present invention, those of ordinary skill in speaking, without creative efforts of the premise, you can also obtain other drawings based on these drawings.

[0043] 图1是本发明实施例提供的一种确定字幕添加位置的方法的流程示意图; [0043] FIG. 1 is a method of determining the position of captions flow diagram according to an embodiment of the present invention;

[0044] 图2为本发明实施例提供的字幕添加候选区域示意图; [0044] FIG. 2 embodiment of the present invention provides a schematic view of captions candidate region;

[0045] 图3为本发明实施例提供的划分字幕添加区域示意图; [0045] FIG. 3 embodiment of the present invention is divided subtitles embodiment provides a schematic view of the area added;

[0046] 图4a为现有技术中的字幕效果示意图; [0046] Figure 4a is a schematic view of a prior art audio effect;

[0047] 图4b为本发明实施例提供的字幕效果示意图; [0047] FIG. 4b provides a schematic diagram of the effect of the implementation of subtitles;

[0048] 图5为本发明实施例提供的一种确定字幕覆盖像素的集合的方法的流程示意图; [0048] FIG. 5 is a schematic diagram of a method of covering the pixel set of the subtitle determined according to an embodiment of the process;

[0049] 图6为本发明实施例提供的字幕的掩码图; [0049] FIG. 6 of the present invention to provide a mask [FIG subtitles;

[0050] 图7为本发明实施例提供的一种确定字幕添加位置的装置的结构示意图; [0050] FIG. 7 is a schematic view of the structure of the invention a method of determining the position of captions apparatus according to an embodiment;

[0051] 图8为本发明实施例提供的像素集合确定模块结构示意图。 [0051] Figure 8 embodiment the present invention provides a pixel of embodiment set determination module structure diagram.

具体实施方式 detailed description

[0052] 下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。 [0052] The present invention will now be combined with the implementation of the accompanying drawings, were clear examples of technical solutions of the present invention, fully described, it is clear that the described embodiments are merely part of the embodiments of the present invention, but not all embodiments Example. 基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。 Based on the embodiments of the present invention, all other embodiments by those of ordinary skill in the creative work did not make the premise obtained, are within the scope of the present invention is protected.

[0053] 实施例一 [0053] Embodiment 1

[0054] 本发明实施例一提供了一种确定字幕添加位置的方法,如图1所示,可以包括以下步骤: [0054] One embodiment of the invention provides a method for determining the position of captions shown in Figure 1, you can include the following steps:

[0055] 步骤S101,确定字幕覆盖像素的集合。 [0055] step S101, determine a set of pixels covering subtitles.

[0056] 在本步骤中,字幕具有特定的颜色,与画面颜色具有一定反差度,从而用户可以看清楚字幕,一般字幕颜色为白色。 [0056] In this step, the subtitles have a specific color, and the color screen with a certain degree of contrast, so that the user can see subtitles, subtitles are generally white in color. 由于视频的画面具有连续性,字幕可以持续显示一定时间,因此字幕具有时间轴,该时间轴内播放的各帧画面都对应同一字幕。 As the video picture continuity, subtitles can continue to display a certain time, so has the subtitle timeline, the timeline within each frame playback screen corresponds to the same caption. 由于字幕颜色和字符数量固定,因此一条字幕在时间轴内各帧画面中的字幕覆盖像素数量是固定值。 Since a fixed number subtitle color and character, a caption for each picture frame caption overlay the number of pixels in the timeline is a fixed value. 该固定值可以称为字幕覆盖像素的集合,即一条字幕在一帧画面中字幕覆盖像素的数量。 The fixed value may be referred to a collection of subtitles cover the pixel, namely a subtitle in a frame picture captions cover the number of pixels.

[0057] 步骤S102,在画面中选取字幕添加候选区域。 [0057] step S102, the selected candidate region captions on the screen.

[0058] 在本步骤中,画面的中心位置往往是视觉效果显著区域,为了防止字幕遮挡视觉效果显著区域,一般选取画面的边缘区域作为字幕添加候选区域。 [0058] In this step, the center position of the picture is often visually salient region, in order to prevent visual effect is remarkable subtitles occlusion area, generally select the edge region of the screen as captions candidate region. 可以在画面的顶部和/ 或底部划分字幕添加候选区域,字幕添加候选区域与画面的高度比例为预设值。 You can add a candidate area at the top and / or bottom of the screen is divided into subtitles, captions height ratio and the picture of the candidate area as a preset value. 如图2所示,该画面中划分了两个字幕添加候选区域,分别位于画面的顶部和底部,两个字幕添加候选区域面积等大,画面中心区域与画面高度的比值为0.618,则每个字幕添加候选区域与画面的高度比例为0. 191。 2, the screen is divided two captions candidate area, which are located at the top and bottom of the screen, the two captions large regional center of the screen and the picture height ratio as the candidate area of 0.618 each subtitles add height ratio and the picture of the candidate region is 0.191.

[0059] 步骤S103,依据字幕覆盖像素的集合将字幕添加候选区域划分成至少两个字幕添加区域,各个字幕添加区域之间逐像素迭代。 [0059] step S103, based on a collection of pixels will cover the caption captions candidate region is divided into at least two regions to add subtitles, captions for each pixel-wise iterations between regions.

[0060] 在本步骤中,字幕添加区域可以容纳字幕覆盖像素的集合。 [0060] In this step, add captions subtitles coverage area can accommodate a collection of pixels. 依据字幕覆盖像素的集合,按照从左到右,从上到下的顺序将字幕添加候选区域划分成至少两个字幕添加区域, 各个字幕添加区域之间逐像素迭代。 Subtitles coverage based on a collection of pixels, from left to right, top to bottom will add caption candidate area is divided into at least two regions to add subtitles, captions for each pixel-wise iterations between regions. 图3为本发明实施例一提供的划分字幕添加区域示意图,1为划分字幕添加区域的起始位置,6为划分字幕添加区域的结束位置,6的位置不固定在右下角,可以按照1-2-3-4-5-6的顺序划分各个字幕添加区域。 Figure 3 embodiment of the present invention to provide an example of divided subtitle add area diagram 1 is divided into the starting position of the area to add subtitles, captions 6 is divided into the end position of the region, at position 6 is not fixed in the lower right corner, you can follow 1- 2-3-4-5-6 order to add captions for each division area. 划分字幕添加区域的起始位置和结束位置并不限定于左上角和右下角。 Divided subtitling area start position and end position is not limited to the upper left and lower right corner. 每次划分减去不再覆盖的像素,并加入新覆盖像素,从而实现各个字幕添加区域之间逐像素迭代。 Each division is no longer covered by subtracting pixels, and add a new overlay pixel, enabling each pixel-by captions iterations between regions.

[0061] 步骤S104,分别计算各个字幕添加区域的像素能量值。 [0061] step S104, calculates the energy value of each pixel captions region.

[0062] 在本步骤中,由于画面具有连贯性,可以计算字幕覆盖的各帧画面的字幕添加区域内各个像素的能量值的集合作为字幕添加区域的能量值5KE(I(X,y))。 [0062] In this step, since the coherent picture can be calculated for each caption overlay frame picture captions within the collection area of the energy value of each pixel region as captions energy value 5KE (I (X, y)) .

[0063] 其中,K为字幕覆盖像素的集合,E(I(x,y))为一帧画面的字幕添加区域中的一个像素I(x,y)的能量值; [0063] wherein the set of pixels covering subtitles K, E (I (x, y)) is a frame picture captions energy region of one pixel I (x, y) values;

Figure CN104967922AD00071

分,X为像素I(X,y)水平方向的坐标分量,y为像素I(X,y)垂直方向的坐标分量。 Points, X coordinate components of the pixel I (X, y) in the horizontal direction, y is the pixel I (X, y) coordinates of the components in the vertical direction.

[0066] 步骤S105,依据像素能量值,选取字幕添加区域添加字幕。 [0066] step S105, based on the pixel energy value, select the area to add captions to add captions.

[0067] 在本步骤中,像素能量值越高,视觉显著性越高,反之,像素能量值越低,视觉显著性越低,因此,像素能量值最小的字幕添加区域一般是整个画面中视觉效果最不显著的区域,在像素能量值较低的字幕添加区域内添加字幕,可以防止字幕遮挡视觉效果显著区域。 [0067] In this step, the higher the energy value of the pixel, the higher the visual significance, on the contrary, the lower the energy value of the pixel, the lower the visual significance, therefore, the pixel value of the minimum energy subtitles add the entire screen area is generally visually the most significant effect is not an area in the lower energy value of the pixel area to add captions to add captions, subtitles can be prevented from blocking the visual effect is remarkable region. 图4a为现有技术中的字幕效果示意图,图4b为本发明实施例一提供的字幕效果示意图,在图4a中可以看出字幕遮挡了部分动画人物,而图4b中动画人物显示完整。 Figure 4a is a schematic diagram of the prior art effect caption, Figure 4b provides a schematic diagram of one embodiment of captions effects, as can be seen in Fig. 4a subtitles block some animated characters, and Fig. 4b show the complete animated characters.

[0068] 通过本发明实施例一提供的一种确定字幕添加位置的方法,可以综合考虑了视频内容的重要性和视频画面之间的连贯性,找到视频画面中视觉相对次要的区域,并在此添加字幕,有效地减少添加字幕对关键内容的遮挡。 [0068] Examples of a method of determining caption at the position provided by the present invention may be considering the importance of video content and coherence between the video screen and find video footage relatively minor visual area, and in this add captions, add captions to effectively reduce the key elements of the cover.

[0069] 实施例二 [0069] Second Embodiment

[0070] 本发明实施例二提供了一种确定字幕覆盖像素的集合的方法,如图5所示,可以将本发明实施例一中的步骤S101,确定字幕覆盖像素的集合优化为以下步骤: [0070] The following steps embodiment of the invention provides a method of determining the second set of pixels of the subtitle overlay method, shown in Figure 5, can be implemented in one embodiment of the present invention, the step S101, determine a set of optimized pixel is covered with subtitles:

[0071] 步骤S1011,光栅化字幕,生成字幕的掩码图,字幕的掩码图中包括:空白像素和字幕颜色填充像素。 [0071] step S1011, rasterization subtitles, captions generated diagram mask, mask figure caption includes: blank pixels and pixel color fill subtitles.

[0072] 在本步骤中,字幕由至少一个字符组成,字幕"中"生成的字幕的掩码图,如图6所示,在图6中,标记为0的像素为空白像素,标记为1的像素为字幕颜色填充像素。 [0072] In this step, by at least one character subtitle, caption "in the" generation subtitle mask diagram shown in Figure 6, in FIG. 6, labeled 0 blank pixels pixels, labeled 1 pixel pixel color fill for the subtitles.

[0073] 步骤S1012,统计空白像素和字幕颜色填充像素的集合作为字幕覆盖像素的集合。 [0073] step S1012, a collection of statistics and subtitle color fills the blank pixel pixel pixel is set as the subtitle overlay.

[0074] 在本步骤中,字幕颜色填充像素的集合像素集合为Rmask,空白像素和字幕颜色填充像素的集合为Rsub,则K可以为Rsub或Rmask。 [0074] In this step, the set of pixels subtitle color set as a collection of pixels filled Rmask, subtitle color and fill the blank pixel pixel is Rsub, then K may be Rsub or Rmask.

[0075] 通过本发明实施例二提供的确定字幕添加位置的方法,光栅化字幕,生成字幕的掩码图,从而依据字幕的掩码图准确确定字幕覆盖像素的集合。 Method [0075] The present invention is determined by the subtitle added according to a second embodiment of the position, rasterization subtitles, captions generated diagram mask to accurately determine a set of pixels based subtitle subtitles coverage mask Fig.

[0076] 实施例三 [0076] Third Embodiment

[0077] 本发明实施例三提供了一种确定字幕添加位置的装置,可以执行本发明实施例一提供的确定字幕添加位置的方法,如图7所示,该装置包括以下模块:像素集合确定模块71、候选区域选取模块72、区域划分模块73、像素能量值计算模块74和字幕添加模块75。 [0077] Three embodiments of the invention provide a method for determining the location of a device to add subtitles, you can perform the present invention provides a method of determining caption cases at the position embodiment, shown in Figure 7, the apparatus includes the following modules: set of pixels is determined module 71, module 72 selected candidate area, zoning module 73, the pixel energy value calculation module 74 and module 75 to add subtitles.

[0078] 像素集合确定模块71,用于确定字幕覆盖像素的集合;候选区域选取模块72,用于在画面中选取字幕添加候选区域;区域划分模块73,用于依据字幕覆盖像素的集合将字幕添加候选区域划分成至少两个字幕添加区域,各个字幕添加区域之间逐像素迭代;像素能量值计算模块74,用于分别计算各个字幕添加区域的像素能量值;字幕添加模块75,用于依据像素能量值,选取字幕添加区域添加字幕。 [0078] set of pixels determining module 71 for determining the set of pixels covering subtitles; candidate region selected module 72 for selecting the subtitles on the screen to add candidate region; area dividing module 73 for covering the pixel based on a collection of subtitles subtitles Add candidate region is divided into at least two regions add subtitles, captions for each pixel by pixel between iterations area; pixel energy value calculation module 74, were calculated for each pixel region captions energy value; subtitling module 75 for basis pixel energy value, select the area to add captions to add captions.

[0079] 在像素集合确定模块71中,字幕具有特定的颜色,与画面颜色具有一定反差度, 从而用户可以看清楚字幕,一般字幕颜色为白色。 [0079] In the set of pixels determining module 71, the subtitles have a specific color, and the color screen with a certain degree of contrast, so that the user can see subtitles, subtitles are generally white in color. 由于视频的画面具有连续性,字幕可以持续显示一定时间,因此字幕具有时间轴,该时间轴内播放的各帧画面都对应同一字幕。 As the video picture continuity, subtitles can continue to display a certain time, so has the subtitle timeline, the timeline within each frame playback screen corresponds to the same caption. 由于字幕颜色和字符数量固定,因此一条字幕在时间轴内各帧画面中的字幕覆盖像素数量是固定值。 Since a fixed number subtitle color and character, a caption for each picture frame caption overlay the number of pixels in the timeline is a fixed value. 该固定值可以称为字幕覆盖像素的集合,即一条字幕在一帧画面中字幕覆盖像素的数量。 The fixed value may be referred to a collection of subtitles cover the pixel, namely a subtitle in a frame picture captions cover the number of pixels.

[0080] 在候选区域选取模块72中,画面的中心位置往往是视觉效果显著区域,为了防止字幕遮挡视觉效果显著区域,一般选取画面的边缘区域作为字幕添加候选区域。 [0080] In the selected candidate area module 72, the center position of the picture is often visually salient region, in order to prevent visual effect is remarkable subtitles block area, select the general area of the screen as captions edge candidate region. 可以在画面的顶部和/或底部划分字幕添加候选区域,字幕添加候选区域与画面的高度比例为预设值。 You can add a candidate area at the top and / or bottom of the screen is divided into subtitles, captions height ratio and the picture of the candidate area as a preset value.

[0081] 在区域划分模块73中,字幕添加区域可以容纳字幕覆盖像素的集合。 [0081] In the area dividing module 73, subtitling subtitles coverage area can accommodate a collection of pixels. 依据字幕覆盖像素的集合,按照从左到右,从上到下的顺序将字幕添加候选区域划分成至少两个字幕添加区域,各个字幕添加区域之间逐像素迭代。 Subtitles coverage based on a collection of pixels, from left to right, top to bottom will add caption candidate area is divided into at least two regions to add subtitles, captions for each pixel-wise iterations between regions.

[0082] 在像素能量值计算模块74中,由于画面具有连贯性,可以计算字幕覆盖的各帧画面的字幕添加区域内各个像素的能量值的集合作为字幕添加区域的能量值EKE(I(X,y))。 [0082] In the pixel energy value calculation module 74, since a coherent picture, you can calculate the energy within the set captions covering each frame picture captions regional energy value of each pixel of the region as a subtitle to add value EKE (I (X , y)).

[0083] 其中,K为字幕覆盖像素的集合,E(I(x,y))为一帧画面的字幕添加区域中的一个像素I(x,y)的能量值; [0083] wherein the set of pixels covering subtitles K, E (I (x, y)) is a frame picture captions energy region of one pixel I (x, y) values;

Figure CN104967922AD00081

分,X为像素I(X,y)水平方向的坐标分量,y为像素I(X,y)垂直方向的坐标分量。 Points, X coordinate components of the pixel I (X, y) in the horizontal direction, y is the pixel I (X, y) coordinates of the components in the vertical direction.

[0086] 在字幕添加模块75中,像素能量值越高,视觉显著性越高,反之,像素能量值越低,视觉显著性越低,因此,像素能量值最小的字幕添加区域一般是整个画面中视觉效果最不显著的区域,在像素能量值较低的字幕添加区域内添加字幕,可以防止字幕遮挡视觉效果显著区域。 [0086] In the captions module 75, the pixel value, the higher the energy, vision significantly higher, and vice versa, the lower the energy of the pixel values, vision significantly lower, and therefore, the pixel value of the minimum energy subtitles add the entire screen area is generally the visual effect is not the most significant area in the lower energy of the pixel values within the region captions add captions, subtitles can be prevented from blocking the visual effect is remarkable region.

[0087] 通过本发明实施例三提供的一种确定字幕添加位置的装置,可以综合考虑了视频内容的重要性和视频画面之间的连贯性,找到视频画面中视觉相对次要的区域,并在此添加字幕,有效地减少添加字幕对关键内容的遮挡。 [0087] A method of determining means provided in the third embodiment caption at the position by the present invention may be considering the importance of video content and coherence between the video screen and find video footage relatively minor visual area, and in this add captions, add captions to effectively reduce the key elements of the cover.

[0088] 上述像素集合确定模块71可以包括:掩码图生成单元711和像素集合统计单元712,如图8所示。 [0088] Determine the set of the pixel module 71 may include: a mask generation unit 711, and FIG pixel statistics collection unit 712, as shown in FIG.

[0089] 掩码图生成单元711,用于光栅化字幕,生成字幕的掩码图,字幕的掩码图中包括: 空白像素和字幕颜色填充像素;像素集合统计单元712,用于统计空白像素和字幕颜色填充像素的集合作为字幕覆盖像素的集合。 [0089] FIG mask generation unit 711, a mask of Figure subtitles for rasterization, generate subtitles, captions mask figure includes: blank pixels and pixel color fill subtitles; collection of statistical pixel unit 712, for statistical blank pixels and subtitle color set as a collection of pixels filled subtitles pixel coverage.

[0090] 在掩码图生成单元711中,字幕由至少一个字符组成,字幕"中"生成的字幕的掩码图如图6所示,在图6中,标记为0的像素为空白像素,标记为1的像素为字幕颜色填充像素。 [0090] In FIG mask generation unit 711, the audio by at least one character, as shown in FIG mask generated captions 6 Subtitle "in" in FIG. 6, the pixels labeled 0-blank pixel, marked 1 pixel color fill subtitles pixels.

[0091] 在像素集合统计单元712中,字幕颜色填充像素的集合像素集合为Rmask,空白像素和字幕颜色填充像素的集合为Rsub,则K可以为R^或RMSk。 [0091] In the pixel aggregate statistical unit 712, the set of pixels subtitle color set as a collection of pixels filled Rmask, subtitle color and fill the blank pixel pixel is Rsub, then K for R ^ or RMSk.

[0092] 通过本发明实施例提供的像素集合确定模块,光栅化字幕,生成字幕的掩码图,从而依据字幕的掩码图准确确定字幕覆盖像素的集合。 Pixel [0092] Example embodiment of the present invention by providing a set of modules is determined, the rasterization subtitles, captions generated mask diagram to accurately determine a set of subtitle pixel coverage mask based subtitle FIG.

[0093] 本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。 [0093] in this specification are used in various embodiments described by way of progressive, different from all the other embodiments of the highlights of each example embodiment, each part of the implementation of the same or similar between the cases can see each other.

[0094] 以上对本发明所提供的一种确定字幕添加位置的方法及装置,进行了详细介绍, 本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上,本说明书内容不应理解为对本发明的限制。 [0094] The above method and apparatus for a method of determining the subtitle of the present invention provides added position, described in detail in this article applies specifically a case of principle and embodiments of the present invention have been set forth, the above embodiment is described only by to help understanding of the method and its core idea of the invention; the same time, those of ordinary skill in the art, according to the idea of the present invention, in the specific embodiments and applications are subject to change place, summary, contents of this manual are not It should be construed as limiting the present invention.

Patentzitate
Zitiertes PatentEingetragen Veröffentlichungsdatum Antragsteller Titel
CN101102419A *10. Juli 20079. Jan. 2008北京大学A method for caption area of positioning video
CN101510299A *4. März 200919. Aug. 2009上海大学Image self-adapting method based on vision significance
CN101917557A *10. Aug. 201015. Dez. 2010浙江大学Method for dynamically adding subtitles based on video content
US20090276805 *1. Mai 20095. Nov. 2009Andrews Ii James KMethod and system for generation and playback of supplemented videos
Nichtpatentzitate
Referenz
1 *姜晓希,冯靖怡,冯结青: "视频内容敏感的动态字幕", 《计算机辅助设计与图形学学报》
Klassifizierungen
Internationale KlassifikationH04N21/488, H04N21/81, H04N21/431
UnternehmensklassifikationH04N21/4312, H04N21/4884, H04N21/8146
Juristische Ereignisse
DatumCodeEreignisBeschreibung
7. Okt. 2015C06Publication
11. Nov. 2015C10Entry into substantive examination