1284291 九、發明說明: 【發明所屬之技術領域】 本發明係關於-種字幕文字顯示方法’特別是—種藉由取得 字幕文字_區巾數娜數點之平均亮度值來轉字幕^字之顏 色’並料_色的字幕文字位移之字幕文字顯村法及其装置。 【先前技術】 隨著科技的發展,使用電子裝置進行播放多媒體影音時,播 放的畫面包含有爾資訊、字幕_容(例如文字舰、英 母等)及音樂聲音,醉幕_容及音_音_示係以影像資 訊作為背景。細,料_放,雜f簡顏色千變萬化、, 所以背景亦會出現各種色彩,此時若字幕内容巾的文字顏色相同 於背景顏色時,則觀察者便看不到文字,是故為了解 β 物技術被; 用。 例如’將字幕上的文字加上高對比色的物,亦是 或是黑字白框,但要採用有外框的字型或在操作時即時出正 確的文字外框,並且顯示於顯示螢幕上,對於小 音來說有相當的_度,不是每—字所需要的點數較大 体及螢紐大的_,就是料增加額相轉量 _ 顯示文字之前,預先計算背景顏色,以改變 次者於 顏色與所呈現的背景顏色呈現對比。 > ,使得文字 但是,當背景顏色過於複雜時,則不易取得最適合的文字顏1284291 IX. Description of the invention: [Technical field of the invention] The present invention relates to a method for displaying subtitle texts, in particular, by substituting the average brightness value of the number of subtitles The subtitle text of the color 'binding_color subtitle text displacement method and its device. [Prior Art] With the development of technology, when playing multimedia video and audio using electronic devices, the screens that are played include information, subtitles (such as text ships, English mothers, etc.) and music sounds, drunk screens and sounds _ The sound_shower uses image information as the background. Fine, material _ put, miscellaneous f simple color is ever-changing, so the background will also appear in various colors. At this time, if the text color of the subtitle content towel is the same as the background color, the observer will not see the text, so it is to understand β Material technology is used; For example, 'add the text on the subtitles to the high contrast color, or the black and white frame, but use the font with the outer frame or the correct text frame at the time of operation, and display it on the display screen. For small sounds, there is a considerable degree of _, not the number of points required for each word and the large number of shinning _, which is to increase the amount of turnover _ before the text is displayed, the background color is pre-calculated to change the time. The color contrasts with the background color that is rendered. > , makes the text, but when the background color is too complicated, it is not easy to get the most suitable text
5 1284291 色,且每次顯示字幕時, 強大的計算能力才能達成 變時,對觀賞者的眼睛而 均需計算背景的顏色,則電子裝置需有 。再者,文字顏色隨著背景顏色不斷改 言是相當不舒服的事。 因此,如何糾-種簡纽錢的字幕顯衫式,以使文字 月匕有更明顯且清晰的呈現,成為研發人員待解決問題之一。 【發明内容】 馨於以上的_,本翻主要在於提供—種字幕文字顯示方 裝置係、藉由取知字幕文字顯示區中數個像素點之平均亮 度值來l擇子幕文子之顏色,為了使文字能有更棚且清晰的呈 現,更透過對文字字幕的移位處理,使用兩種不隨色分別來進 行文字字幕的顯示。 a本毛賊揭路之—種字幕文字顯示方法,係娜背景影像中 之字幕文字顯示輯對應之數個像素點,此些像素‘關以顯示字 幕檔内之待顯示文字,包括有下列步驟: 首先建立’^度表’此免度表儲存數個亮度準位區間,每一 個亮度準位區間均對應至第—顏色及第二顏色。接著,_字幕 文字顯示區情個像素點之亮鱗位,再根據每—個亮度準位取 得平均亮度準位。 自亮度表中取得平均亮度準位所屬之亮度準健域的第一 顏色及第二顏色。其中第-顏色與第二顏色係選自不同且高對比 度的顏色。 之後,待顯示文字依據已取得第―顏色、第二顏色進行合 1284291 成楚以產生第-顏色之待顯示文字及第二顏色之待顯示文字·顯 ==色之細示文字於第-位置;及顯示第二顏色之待顯示 子;一位置’其中第—位置與第二位置具有方向位移(例如 上方、下方、左上方、右上方、左下方或右下 本輪揭露-種嫩梅裝置,係綱景影像中之 :幕文子顯補輯狀數個像親,此些像素關峨示字幕 里 =之待=文字,_ : 、_元、崎單元及處 理早其中此單元中包括㈣測單元。 —貝料庫用财轉党度表,此亮度表儲存數個亮度準位區間, 母-個亮度準位區間均對應至第一顏色及第二顏色。 運算單元透過偵測單元來谓測字幕文字顯示 點之亮度準位後,計算此些像素點之平均亮度準位。 比對早謂自紐表巾轉平均亮度準 區域的第一顏色及第二顏色。 儿度旱位 處理單元將觸示文字依觀轉第—顏色、第二顏色進行 η產生第-顏色之待顯示文字及第二顏色之待顯示文字, 一顏色之待顯示文相示於第—位置,第二顏色之細示 ^子顯示於第二位置,其中第—位置與第二位置具有方向位移 如上方、下方、左上方、右上方、左下方或右下方..等等)。 以下在實施方式中詳細敘述本發明之詳細特徵以及優點,其 内容足以使任何熟習侧技藝者了解本發明之技_容並據以實 施,且根據本說明書所揭露之内容、巾請專利細及圖式,任何 1284291 热t相關技藝者可輕易地理解本發明相關之目的及優點。 【實施方式】 々一般而言’使用電子裝置(例如電腦、電視、手機、電子辭 點··等等)播放多媒體影音時,播放的畫面包含有影像資訊、字幕 =内谷(例如文字符號、英文字母等)及音樂聲音,而字幕的内 ,及音樂聲音的顯示係以影像資訊作為背景,然而,背景影像2 疋透過數個像素點來形成影像,字幕的内容則顯示於背景影像2 的最下方。舉例來說,當背景影像2可由1列至3〇〇列的像素點 來形成時’則字幕的内容係可顯示在彻列至·列的像素點位 置處’如「第1圖」所示,縣此說明書巾,字幕的内容顯示的 像素點處,係稱為字幕文字顯示區3。 、、以下舉出具體實施例以詳細說明本發明之内容,並以圖示作 為辅助說明。說明中提及之符號係參照圖式符號。 參閱「第2圖」及「第3圖」,資料庫1〇内有亮度表,亮度 表係儲存數個免度雜關,每個亮度準位區間似—預定範圍 内的平均亮鮮位為規範,且均有對應的第—顏色與第二顏色(步 驟100)。其中,第—顏色及第二顏色需為不同顏色,但不限定為 何種顏色,顏色的義包括有黑色、白色、灰色、紅色、藍色或 其他種類的顏色。 接著’運算單元30透過偵測單元2〇隨機取得字幕文字顯示 區3中背景影像之數個像數點’所呈現出來的亮度準位㉘驟 ⑽),以使單元3〇計算频餘點之悄統準位(轉 8 1284291 m)。之後比較單元4G依據運算單元3G所計算出來的平均亮度 準位,從資料庫10中的亮度表查詢,以取得對應此 的亮度準位區間,及此亮度準位區間對應的第一顏色及第b:顏色 (步驟120)。其中, / 接著,處理單兀50可再依據比較單元4〇所取得的第一顏色 及第二顏色,對待顯示於字幕文字顯示區3内的 成處理,以產生第-顏色的待顯示文字及第二顏色 (步驟130)。之後,將第一顏色的待顯示文字顯示於第一位置(步 驟140),第二顏色的待顯示文字顯示於第二位1 (步驟15〇),= 中第一位置與第二位置具有方向位移(例如上方、下方、左上方^ 右上方、左下方、右下方等等)。 參閱「第4圖」為本發明之實施例,錢,亮度表中包 括有第-亮解健間及第二亮度準位_。第 係代表平均亮度準位為「〇」至「127」,其對應之第—顏;^ 第了顏色為白色;第二亮度準祕_代表平均亮度準位為「128」 至255」,其對應之第一顏色為白色,第二顏色為黑色。 一當電子裝置於顯示單元(未顯示)撥放纽體影音時,偵測 早元20隨機_顯示單元所播放的背景影像2上之 音千 ^中數個像數點,所呈現出來的亮度準位後,藉由運算C3〇 像數點之平均亮度準位^如,細的三個像數點之亮 為”二」、「57」及「⑽」時,其平均亮度準位係為「57」。 比車又單元40依據運算單元30所計算的平均亮度準位「57」, 1284291 從亮度表查詢,來取得第一亮度準位區間所對應的黑色(第一顏 色)及白色(第二顏色)。 當子幕文字顯示區3内之待顯示的文字為「狗來旺」時,處 理單元50會產生「狗來旺」的黑色(第一顏色)與白色(第二顏 色)的待顯示文字後,則顯示黑色的「狗旺來」之待顯示文字至 第位置,白色的「狗旺來」之待顯示文字至第二位置。此實施 例係將第二位置位移在第—位置之右上方處,如「第5圖」所示 # 之顯示結果210。 倘右在字幕文字顯示區3中背景影像之亮度準位經計算後, 其平均亮度準位係處於第二亮度準位區間時所對應的第一顏色為 白色’第二顏色為黑色時,如r第6圖」所示之顯示結果22〇。 示結果240 另外,在字幕文字顯示區3中背景影像為其他顏色的背景 時,例如具有花紋或斜紋的或者是任何背景,可以經計算而 得到平均亮度縣決定落於第—亮鱗健間或是第二亮度準位 區間,其分別為如「第7圖」之顯示結果挪及「第8圖」之顯 本發明所提供之字幕文字_方法及其裝置,储由取 幕文字卿區中數轉數點之平均亮度值麵擇文字之顏色,更 透過對文村幕的移倾理,使文字能有更簡且清晰的呈現, 尤其是在誠距峨看時,其較尤其明顯。 雖然本發_前述之實關揭露如上,財 發明。在不脫離本發明之精神和範圍内,所為之更動與二ί 1284291 關於本發贿界定之賴棚請參考 屬本發明之專利保護範圍。 所附之申請專利範圍。 【圖式簡單說明】 第1圖為背景影像之像素點; 圖為域本發断提供之字幕文·示綠之流程圖; 第3圖為依據本發明提供之字幕文字顯示裝置之方塊圖; 第4圖為依據本發明提供之實施例的亮度表; 第5圖為依據本發明提供之實施例的字幕顯示結果; 第6圖為依據本發明提供之實施例的另一字幕顯示結果; 第7圖為依據本發明提供之花紋背景的字幕顯示結果;及 第8圖為依據本發明提供之斜紋背景的字幕顯示結果。 【主要元件符號說明】 2 背景影像 3 字幕文字顯示區 5 字幕檔 10 資料庫 20 ^[貞測單元 30 運算單元 40 比較單元 50 處理單元 200 亮度表 210、 220、230、240顯示結果 115 1284291 color, and each time the subtitles are displayed, the powerful computing power can achieve the change of time. For the viewer's eyes, the color of the background needs to be calculated, so the electronic device needs to be. Furthermore, the color of the text changes with the background color is quite uncomfortable. Therefore, how to correct and correct the subtitles of the new money, so that the text month has a more obvious and clear presentation, has become one of the problems that R & D personnel to solve. [Summary of the Invention] In addition to the above, the main purpose of this is to provide a subtitle text display device system, by knowing the average brightness value of a plurality of pixel points in the subtitle text display area to select the color of the subtitle. In order to make the text more sleek and clear, and through the shift processing of the text subtitles, two kinds of non-colors are used to display the text subtitles. a thief reveals the road - a subtitle text display method, which is a number of pixels corresponding to the subtitle text display in the background image of Na, the pixels are 'closed to display the text to be displayed in the subtitle file, including the following steps : Firstly, the '^ degree table' is created. This exemption table stores a plurality of brightness level intervals, and each brightness level interval corresponds to the first color and the second color. Then, the _ subtitle text shows the brightness scale of the pixel, and then the average brightness level is obtained according to each brightness level. The first color and the second color of the brightness quasi-health domain to which the average brightness level belongs are obtained from the brightness table. Wherein the first color and the second color are selected from different and high contrast colors. After that, the text to be displayed is based on the acquired first color and the second color, and the first color is displayed to generate the first color to be displayed and the second color to be displayed. And displaying a second color to be displayed; a position 'where the first position and the second position have a directional displacement (eg, upper, lower, upper left, upper right, lower left, or lower right) In the image of the outline scene: the screen text shows a number of images like the pro, these pixels are shown in the subtitles = waiting = text, _:, _ yuan, saki units and processing early including this unit (4) The measuring unit is used to calculate the brightness level table, and the brightness table stores a plurality of brightness level intervals, and the mother-level brightness level intervals correspond to the first color and the second color. After measuring the brightness level of the subtitle text display point, the average brightness level of the pixel points is calculated. The first color and the second color of the average brightness area of the button are said to be the first time and the second color. The unit will touch the text and follow the instructions. The color and the second color perform η to generate the first-color text to be displayed and the second color to display the text, the color to be displayed is displayed in the first position, and the second color is displayed in the second position. Where the first position and the second position have a directional displacement such as upper, lower, upper left, upper right, lower left or lower right.., etc.). The detailed features and advantages of the present invention are described in detail in the following detailed description of the embodiments of the present invention. The related objects and advantages of the present invention are readily understood by those skilled in the art. [Embodiment] In general, when playing multimedia videos using electronic devices (such as computers, TVs, mobile phones, electronic vocabulary, etc.), the screens that are played include image information, subtitles = inner valleys (for example, text symbols, English letters, etc.) and music sounds, while the inside of the subtitles and the display of the music sounds are based on the image information. However, the background image 2 疋 is formed by several pixels to form an image, and the content of the subtitle is displayed in the background image 2 the bottom. For example, when the background image 2 can be formed by pixels of 1 column to 3 columns, the content of the subtitle can be displayed at the pixel position of the column to column ' as shown in FIG. 1 The county's manual towel, the pixel point of the content display of the subtitle, is called the subtitle text display area 3. The specific embodiments are described below in order to explain the details of the present invention, and are illustrated by the accompanying drawings. The symbols mentioned in the description are referenced to the schematic symbols. Referring to "Pic 2" and "3", there is a brightness table in the database. The brightness table stores several exemptions. Each brightness level is like - the average brightness in the predetermined range is The specification has a corresponding first color and a second color (step 100). The first color and the second color need to be different colors, but are not limited to which color. The meaning of the color includes black, white, gray, red, blue or other kinds of colors. Then, the operation unit 30 randomly obtains the brightness level 28 (10) presented by the number of image points of the background image in the caption text display area 3 through the detecting unit 2, so that the unit 3〇 calculates the frequency point. Quiet level (transfer 8 1284291 m). The comparison unit 4G then queries the brightness table in the database 10 according to the average brightness level calculated by the operation unit 3G to obtain the brightness level interval corresponding to the brightness level, and the first color and the corresponding color brightness interval. b: color (step 120). Wherein, /, the processing unit 50 can further display the processing to be displayed in the subtitle text display area 3 according to the first color and the second color obtained by the comparing unit 4 to generate the first color to be displayed and The second color (step 130). Thereafter, the character to be displayed of the first color is displayed in the first position (step 140), the character to be displayed of the second color is displayed in the second position 1 (step 15〇), and the first position and the second position in the direction have the direction Displacement (eg upper, lower, upper left ^ upper right, lower left, lower right, etc.). Referring to Fig. 4, in the embodiment of the present invention, the money and brightness table includes a first-lighting solution and a second brightness level. The second system represents the average brightness level from "〇" to "127", which corresponds to the first color; ^ the first color is white; the second brightness threshold _ represents the average brightness level is "128" to 255", The corresponding first color is white and the second color is black. When the electronic device plays the button audio and video on the display unit (not shown), the brightness of the image is displayed on the background image 2 played by the random _ display unit in the early 20th. After the level is calculated, by calculating the average brightness level of the C3 image number, if the fine three image points are "2", "57" and "(10)", the average brightness level is "57". The unit 40 is queried from the brightness table according to the average brightness level "57" calculated by the operation unit 30, and is obtained from the brightness table to obtain the black (first color) and white (second color) corresponding to the first brightness level interval. . When the text to be displayed in the sub-screen text display area 3 is "dog to Wang", the processing unit 50 generates the black (first color) and white (second color) characters to be displayed after the "dog is coming". , the black "dog Wang Lai" is displayed to the position, and the white "dog Wang Lai" is to be displayed to the second position. In this embodiment, the second position is displaced to the upper right of the first position, as shown by the "figure 5". If the brightness level of the background image in the caption text display area 3 is calculated, the first color corresponding to the average brightness level is in the second brightness level interval, and the second color is black, such as The result shown in r Figure 6 shows 22〇. In addition, when the background image is a background of other colors in the caption text display area 3, for example, having a pattern or a twill or any background, the average brightness county can be calculated to fall within the first-light scale room or It is a second brightness level interval, which is a subtitle text method and a device provided by the invention according to the display result of "Fig. 7" and "Fig. 8", respectively. The average brightness value of several turns of several points selects the color of the text, and the text can be more simplified and clear through the movement of the Wencun screen, especially when it is seen from the distance. Although the present invention is disclosed above, the invention is as described above. Without departing from the spirit and scope of the present invention, the scope of the invention is defined by the scope of the invention. The scope of the attached patent application. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a pixel of a background image; FIG. 3 is a flow chart of a subtitle text and a green display provided by the domain; and FIG. 3 is a block diagram of a subtitle text display device according to the present invention; 4 is a brightness table according to an embodiment of the present invention; FIG. 5 is a result of displaying a caption according to an embodiment of the present invention; FIG. 6 is a view showing another caption according to an embodiment of the present invention; 7 is a subtitle display result of a tread background provided in accordance with the present invention; and FIG. 8 is a subtitle display result of a twill background provided in accordance with the present invention. [Main component symbol description] 2 Background image 3 Subtitle text display area 5 Subtitle file 10 Library 20 ^[Measure unit 30 Operation unit 40 Comparison unit 50 Processing unit 200 Brightness table 210, 220, 230, 240 Display results 11