TW201328316A - Method for auto-detect image format and playing method applying the same - Google Patents

Method for auto-detect image format and playing method applying the same Download PDF

Info

Publication number
TW201328316A
TW201328316A TW100148693A TW100148693A TW201328316A TW 201328316 A TW201328316 A TW 201328316A TW 100148693 A TW100148693 A TW 100148693A TW 100148693 A TW100148693 A TW 100148693A TW 201328316 A TW201328316 A TW 201328316A
Authority
TW
Taiwan
Prior art keywords
image
frame image
format
sub
mean
Prior art date
Application number
TW100148693A
Other languages
Chinese (zh)
Inventor
Lei Zhou
Heng Yu
Chun Wang
Original Assignee
Novatek Microelectronics Corp
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 Novatek Microelectronics Corp filed Critical Novatek Microelectronics Corp
Priority to TW100148693A priority Critical patent/TW201328316A/en
Publication of TW201328316A publication Critical patent/TW201328316A/en

Links

Abstract

An single-frame image format auto-detection method includes: dividing an single-frame image into a plurality of macro-blocks; dividing each of the macro-blocks into a plurality of sub-blocks; generating a meta-block in each of the sub-blocks; calculating a respective pixel luminance sum characteristic value of each of the meta-blocks; based on the pixel luminance sum characteristic values, calculating a first confidence between a left half and a right half of the single-frame image; based on the pixel luminance sum characteristic values, calculating a second confidence between a top half and a bottom half of the single-frame image; and based on the pixel luminance sum characteristic values, the first confidence and the second confidence, identifying a format of the single-frame image.

Description

自動偵測影像格式的方法與應用其之播放方法Method for automatically detecting image format and playing method thereof

本案有關於一種自動偵測影像/影片格式的方法與應用其之播放方法。This case is about a method for automatically detecting an image/movie format and a method for playing the same.

目前,三維(3D)顯示器(如電視、電腦螢幕等)已逐漸普及。3D顯示器不僅僅可以顯示3D內容,還可以顯示2D內容,然而,3D顯示器要針對不同的內容採用不同的播放模式。以目前而言,單幀(single frame)3D格式分成左右並排(SBS,Side-by-Side)與上下並排(TB,Top-and-Bottom)。因此,顯示器需要區分出影像屬於2D內容、3D格式的SBS和3D格式的TB這三種模式。Currently, three-dimensional (3D) displays (such as televisions, computer screens, etc.) have become popular. 3D displays can not only display 3D content, but also display 2D content. However, 3D displays use different playback modes for different content. At present, the single frame 3D format is divided into left and right side by side (SBS, Side-by-Side) and side by side (TB, Top-and-Bottom). Therefore, the display needs to distinguish three modes in which the image belongs to 2D content, 3D format SBS, and 3D format TB.

SBS影像中,左右眼的圖乃是左右並排在一起。左右眼的圖在水平方向都為一半的解析度,所以左右眼的圖合起來大小等於正常解析度。比如,如果解析度為1920x1080的影像,SBS 3D影像中,左右眼的圖的解析度都為960x1080。In the SBS image, the pictures of the left and right eyes are arranged side by side. The graphs of the left and right eyes are half resolution in the horizontal direction, so the sum of the left and right eyes is equal to the normal resolution. For example, if the resolution is 1920x1080, the resolution of the left and right eyes in the SBS 3D image is 960x1080.

TB 3D影像中,左右眼的圖的垂直解析度只有正常解析度的一半。比如,如果解析度為1920x1080的影像,則左右眼的圖的解析度都為1920x540。In the TB 3D image, the vertical resolution of the left and right eyes is only half of the normal resolution. For example, if the resolution is 1920x1080, the resolution of the left and right eyes is 1920x540.

在播放3D影像/影片時,3D顯示器要將其播放模式切換成3D播放模式,否則只能將3D影片播放成2D影片,且其播放品質甚差。比如,在播放SBS的3D影片時,如果未能正確切換至3D播放模式的話,則觀賞者可能會看到影片被分成左半邊與右半邊。When playing 3D images/movies, the 3D display should switch its playback mode to 3D playback mode. Otherwise, the 3D movie can only be played as a 2D movie, and its playback quality is very poor. For example, when playing a 3D movie of SBS, if it fails to switch to 3D playback mode correctly, the viewer may see that the movie is divided into the left half and the right half.

故而,本案提出一種自動偵測影像格式的方法與應用其之播放方法,其能自動偵測單幀影像格式,以切換至正確的播放模式。Therefore, the present invention proposes a method for automatically detecting an image format and a method for playing the same, which can automatically detect a single frame image format to switch to the correct playback mode.

本揭露實施例係有關於一種自動偵測影像/影片格式的方法,其藉由偵測單幀影像的左半邊與右半邊的相似度,來檢測此影像格式是否為SBS。The disclosure relates to a method for automatically detecting an image/movie format, which detects whether the image format is SBS by detecting the similarity between the left half and the right half of the single frame image.

本揭露實施例係有關於一種自動偵測影像/影片格式的方法,其藉由偵測單幀影像的上半邊與下半邊的相似度,來檢測此影像格式是否為TB。The disclosure relates to a method for automatically detecting an image/movie format, which detects whether the image format is TB by detecting the similarity between the upper and lower sides of a single frame image.

本揭露實施例係有關於一種自動偵測影像/影片格式的方法,其對於單幀影像確定不是SBS格式也不是TB格式的,確定其為2D格式。The disclosure relates to a method for automatically detecting an image/movie format, which is determined not to be in SBS format or TB format for a single frame image, and is determined to be a 2D format.

根據本案之一示範性實施例,提出一種自動單幀影像格式偵測方法,包括:將一單幀影像分割為複數個巨塊;將每一該些巨塊分割為複數個子塊;在每一該些子塊內設置一原塊;計算每一該些原塊之一畫素亮度總和特徵值;根據該些畫素亮度總和特徵值,計算該單幀影像之一左半邊與一右半邊間之一第一信任度;根據該些畫素亮度總和特徵值,計算該單幀影像之一上半邊與一下半邊間之一第二信任度;以及根據該些畫素亮度總和特徵值、該單幀影像之該第一信任度與該第二信任度,偵測該單幀影像之一格式。According to an exemplary embodiment of the present disclosure, an automatic single-frame image format detection method is provided, including: dividing a single-frame image into a plurality of macroblocks; and dividing each of the giant blocks into a plurality of sub-blocks; Arranging an original block in the sub-blocks; calculating a sum of luminance values of the pixels of each of the original blocks; and calculating a left half and a right half of the single-frame image according to the sum of the luminance values of the pixels a first trust degree; calculating a second trust degree between one of the upper half and the lower half of the single frame image according to the sum of the pixel brightness sum; and summing the feature value according to the pixel brightness sum The first trust degree of the frame image and the second trust degree, detecting one format of the single frame image.

根據本案之另一示範性實施例,提出一種單幀影像播放方法,包括:將一單幀影像分割為複數個巨塊;將每一該些巨塊分割為複數個子塊;在每一該些子塊內設置一原塊;計算每一該些原塊之一畫素亮度總和特徵值;根據該些畫素亮度總和特徵值,判斷該單幀影像之一第一半邊是否相似於一第二半邊,如果是,則判斷該單幀影像為一三維格式;以及根據所判斷的影像格式,播放該單幀影像。According to another exemplary embodiment of the present disclosure, a single-frame video playback method is provided, including: dividing a single-frame image into a plurality of macroblocks; and dividing each of the macroblocks into a plurality of sub-blocks; Setting a primitive block in the sub-block; calculating a sum of luminance values of the pixels of each of the original blocks; determining, according to the sum of the luminance values of the pixels, whether the first half of the single-frame image is similar to a first The second half, if yes, determines that the single frame image is in a three-dimensional format; and plays the single frame image according to the determined image format.

為了對本案之上述及其他方面有更佳的瞭解,下文特舉實施例,並配合所附圖式,作詳細說明如下:In order to better understand the above and other aspects of the present invention, the following specific embodiments, together with the drawings, are described in detail below:

因為景深的關係,SBS格式影像的左半邊與右半邊雖然相似,但不會完全相同。相似地,因為景深的關係,TB格式影像的上半邊與下半邊雖然相似,但不會完全相同。故而,在本案實施例中,依此原則來判斷影像為2D格式或3D格式,並依此原則來判斷3D影像格式為SBS格式或是TB格式。Because of the depth of field, the left and right sides of the SBS format image are similar, but not identical. Similarly, because of the depth of field, the top and bottom half of the TB format image are similar, but not identical. Therefore, in the embodiment of the present invention, the image is determined to be a 2D format or a 3D format according to the principle, and the 3D image format is determined to be an SBS format or a TB format according to the principle.

現請參考第1圖,其顯示根據本案實施例之自動偵測影像格式方法之流程圖。Referring now to FIG. 1, a flow chart of a method for automatically detecting an image format according to an embodiment of the present invention is shown.

於步驟110中,將整張單幀影像分割為多個巨塊(macro-block)。如第2圖所示,將整張影像分割為N Marco 個巨塊。為方便說明,各巨塊之編號1、2、…、N Marco 。更進一步說,舉例來說,整張影像水平分割為個部份,並垂直分割為個部份。In step 110, the entire single frame image is segmented into a plurality of macro-blocks. As shown in Figure 2, the entire image is divided into N Marco chunks. For convenience of explanation, the numbers of the giant blocks 1, 2, ..., N Marco . Furthermore, for example, the entire image is horizontally split into Part and vertically split into Part. .

更進一步地,在本實施例中,將整張影像水平平均分割為個部份,並垂直平均分割為個部份。但當知本案並不受限於此,在本案其他可能實施例中,可將整張影像進行水平不平均分割。在本案其他可能實施例中,可將整張影像進行垂直不平均分割。Further, in this embodiment, the entire image is horizontally divided into Part and vertical division into Part. However, it is not limited to this case. In other possible embodiments of the present case, the entire image can be horizontally unevenly segmented. In other possible embodiments of the present invention, the entire image can be vertically unevenly segmented.

更進一步地,在本案其他可能實施例中,對整張影像水平分割的個數未必要為2的冪次方。在本案其他可能實施例中,對整張影像垂直分割的個數未必要為2的冪次方。此皆在本案精神範圍內。不過,如果分割個數為2的冪次方的話,比較方便進行記憶體位址定址。Further, in other possible embodiments of the present invention, the number of horizontal divisions of the entire image is not necessarily a power of two. In other possible embodiments of the present invention, the number of vertical divisions of the entire image is not necessarily a power of two. This is within the spirit of the case. However, if the number of partitions is a power of 2, it is convenient to address the memory address.

在步驟120中,將每個巨塊分割為多個子塊(sub-block)。如第2圖所示,每個巨塊分割為N Sub 個子塊。為方便說明,各子塊之編號1、2、…、N Sub 。更進一步說,一個巨塊水平分割為個部份,並垂直分割為個部份。In step 120, each chunk is divided into a plurality of sub-blocks. As shown in Fig. 2, each chunk is divided into N Sub subblocks. For convenience of explanation, the number of each sub-block 1, 2, ..., N Sub . Going a step further, a giant block is split horizontally into Part and vertically split into Part. .

更進一步地,在本實施例中,將一個巨塊水平平均分割為個部份,並垂直平均分割為個部份。但當知本案並不受限於此,在本案其他可能實施例中,可將一個巨塊進行水平不平均分割。在本案其他可能實施例中,可將一個巨塊進行垂直不平均分割。Further, in the present embodiment, the average level of one block is divided into Part and vertical division into Part. However, it is not limited to this case. In other possible embodiments of the present case, a large block can be horizontally unevenly divided. In other possible embodiments of the present invention, a giant block may be vertically unevenly segmented.

更進一步地,在本案其他可能實施例中,對一個巨塊水平分割的個數未必要為2的冪次方。在本案其他可能實施例中,對一個巨塊垂直分割的個數未必要為2的冪次方。此皆在本案精神範圍內。Further, in other possible embodiments of the present invention, the number of horizontal splits for one macroblock is not necessarily a power of two. In other possible embodiments of the present case, the number of vertical divisions of one giant block is not necessarily a power of two. This is within the spirit of the case.

於步驟130中,在每個子塊內設置一個原塊(meta-block)。在本實施例中,原塊之左上角對齊於子塊的左上角。原塊之寬度W_ME介於1與子塊寬度W_SB之間;以及原塊之高度H_ME介於1與子塊高度H_SB之間。原塊之寬度與高度未必為2的冪次方,可由設計者自行設計之。In step 130, a meta-block is set in each sub-block. In this embodiment, the upper left corner of the original block is aligned with the upper left corner of the sub-block. The width W_ME of the original block is between 1 and the sub-block width W_SB; and the height H_ME of the original block is between 1 and the sub-block height H_SB. The width and height of the original block are not necessarily the power of 2 and can be designed by the designer.

如果以第2圖為例的話,整張影像200被分割成16(N Marco =16)個巨塊210,其中,影像200水平分割為4(N mac-H =2)個部份,並垂直分割為4(N mac-V =2)個部份。一個巨塊210被分為32(N Sub =32)個子塊220,其中,巨塊210被水平分割為2(N sub-H =1)個部份;巨塊被垂直分割為16(N sub-V =4)個部份。原塊230設置於子塊220內。If the second image is taken as an example, the entire image 200 is divided into 16 ( N Marco = 16) giant blocks 210, wherein the image 200 is horizontally divided into 4 ( N mac-H = 2) portions and is vertically Split into 4 ( N mac-V = 2) parts. A macroblock 210 is divided into 32 ( N Sub = 32) sub-blocks 220, wherein the macroblock 210 is horizontally divided into 2 ( N sub-H =1) parts; the macroblock is vertically divided into 16 ( N sub -V = 4) parts. The original block 230 is disposed within the sub-block 220.

請再次參考第2圖。於本案實施例中,第1個巨塊之左上角畫素之位址定址為(x,y)=(0,0)。第2個巨塊之左上角畫素之位址定址為(x,y)=(W_MB,0),其中,W_MB代表巨塊之寬度(以畫素為單位)。第5個巨塊之左上角畫素之位址定址為(x,y)=(H_MB,0),其中,H_MB代表巨塊之高度(以畫素為單位)。其他巨塊之左上角畫素之位址可依此類推。Please refer to Figure 2 again. In the embodiment of the present invention, the address of the upper left pixel of the first macroblock is addressed as (x, y) = (0, 0). The address of the upper left corner of the second block is addressed as (x, y) = (W_MB, 0), where W_MB represents the width of the block (in pixels). The address of the upper left corner of the fifth block is addressed as (x, y) = (H_MB, 0), where H_MB represents the height of the block (in pixels). The address of the upper left corner of other giant blocks can be deduced by analogy.

於步驟140中,計算各原塊之投影和(SOP,Sum of Projection)。在此,投影和SOP之定義如下:In step 140, the projection sum (SOP, Sum of Projection) of each original block is calculated. Here, the definition of projection and SOP is as follows:

其中,Luma代表畫素亮度,i為巨塊之標號;而j則為第i個巨塊內之子塊之標號。亦即,SOP i , j 代表第i個巨塊內的第j個子塊內的所有畫素亮度之總和。Where Luma represents the pixel brightness, i is the label of the giant block; and j is the label of the sub-block within the i-th block. That is, SOP i , j represents the sum of all pixel luminances in the jth sub-block within the i-th macroblock.

於步驟150,根據各原塊之SOP,計算此單幀影像之SBS信任度(SBS confidence)與TB信任度(TB confidence)。約略地說,SBS信任度代表影像之左半邊與右半邊之相似度:而TB信任度代表影像之上半邊與下半邊之相似度。In step 150, the SBS confidence and the TB confidence of the single frame image are calculated according to the SOP of each original block. Roughly speaking, SBS trust represents the similarity between the left and right halves of the image: and TB trust represents the similarity between the upper and lower half of the image.

詳細地說,SBS信任度之算法如下:In detail, the algorithm of SBS trust degree is as follows:

其中,在上式中,abs代表取絕對值。第3A圖顯示根據本實施例之SBS信任度之示意圖。在第3A圖中,箭頭兩端代表兩個原塊之SOP之相減。Among them, in the above formula, abs represents the absolute value. Fig. 3A shows a schematic diagram of the SBS trust degree according to the present embodiment. In Figure 3A, the two ends of the arrow represent the subtraction of the SOPs of the two original blocks.

以第2圖為例:Take Figure 2 as an example:

Diff_SBS 1=abs(SOP1-SOP3)+abs(SOP2-SOP4) Diff _ SBS 1 = abs (SOP1-SOP3) + abs (SOP2-SOP4)

Diff_SBS 2=abs(SOP5-SOP7)+abs(SOP6-SOP8)。 Diff _ SBS 2 = abs (SOP5-SOP7) + abs (SOP6-SOP8).

Diff_SBS 3=abs(SOP9-SOP11)+abs(SOP10-SOP12)。 Diff _ SBS 3 = abs (SOP9-SOP11) + abs (SOP10-SOP12).

Diff_SBS 4=abs(SOP13-SOP15)+abs(SOP14-SOP16)。 Diff _ SBS 4 = abs (SOP13-SOP15) + abs (SOP14-SOP16).

其中,SOP1代表第1個巨塊的所有原塊之SOP之總和,其餘意思可類推。故而,可知,在本實施例中,SBS信任度乃是影像左半邊之某一直行中之一原塊之畫素亮度總和與影像右半邊之相對直行中之一原塊之畫素亮度總和間之差異(絕對值),並將這些差異加總而得。SBS信任度可反映影像之上半邊與下半邊之相似度。總的來說,如果影像格式為3D的SBS格式的話,則其SBS信任度小:反之,如果影像格式不為3D的SBS格式的話,則其SBS信任度大。Among them, SOP1 represents the sum of the SOPs of all the original blocks of the first giant block, and the rest can be analogized. Therefore, in the present embodiment, the SBS trust degree is the sum of the pixel brightness of one of the original blocks in the left half of the image and the sum of the pixel brightness of one of the relative straight lines of the right half of the image. The difference (absolute value) and the sum of these differences. SBS trust can reflect the similarity between the upper and lower half of the image. In general, if the image format is 3D SBS format, the SBS trust degree is small: conversely, if the image format is not the 3D SBS format, the SBS trust degree is large.

詳細地說,TB信任度之算法如下:In detail, the algorithm for TB trust is as follows:

第3B圖顯示根據本實施例之TB信任度之示意圖。Fig. 3B is a diagram showing the TB trust degree according to the present embodiment.

以第2圖為例:Take Figure 2 as an example:

Diff_TB 1=abs(SOP1-SOP9)+abs(SOP2-SOP10)+abs(SOP3-SOP11)+abs(SOP4-SOP12) Diff _ TB 1 = abs (SOP1-SOP9) + abs (SOP2-SOP10) + abs (SOP3-SOP11) + abs (SOP4-SOP12)

Diff_TB 2=abs(SOP5-SOP13)+abs(SOP6-SOP14)+abs(SOP7-SOP15)+abs(SOP8-SOP16) Diff _ TB 2 = abs (SOP5-SOP13) + abs (SOP6-SOP14) + abs (SOP7-SOP15) + abs (SOP8-SOP16)

故而,可知,在本實施例中,TB信任度乃是影像上半邊之某一橫列中之一原塊之畫素亮度總和與影像下半邊之相對橫列中之一原塊之畫素亮度總和間之差異(絕對值),並將這些差異加總而得。TB信任度可反映影像之上半邊與下半邊之相似度。總的來說,如果影像格式為3D的TB格式的話,則其TB信任度小;反之,如果影像格式不為3D的TB格式的話,則其TB信任度大。Therefore, it can be seen that, in this embodiment, the TB trust degree is the pixel brightness of one of the original blocks of one of the upper half of the image and the pixel of the original block of the lower half of the image. The difference between the sums (absolute values) and the sum of these differences. The TB trust reflects the similarity between the upper and lower half of the image. In general, if the image format is 3D TB format, its TB trust is small; conversely, if the image format is not 3D TB format, its TB trust is large.

於步驟160中,根據影像平均亮度、SBS信任度與TB信任度,偵測此單幀影像之格式。步驟160之細節如第3B圖所示。第4圖顯示於本實施例中,如何根據影像平均亮度、SBS信任度與TB信任度,偵測影像格式之詳細流程圖。In step 160, the format of the single frame image is detected according to the average brightness of the image, the SBS trust degree, and the TB trust degree. The details of step 160 are as shown in Figure 3B. FIG. 4 shows a detailed flowchart of detecting an image format according to the average brightness of the image, the SBS trust degree, and the TB trust degree in the embodiment.

在此,先定義幾種參數如下:Here, first define several parameters as follows:

在上式中,參數width與height分別代表影像的寬度與高度。參數Mean則是影像平均亮度。在本實施例中,導入參數Mean可以抵消影像亮度的影響,以避免影像格式判斷結果受到影像亮度的影響。參數Mean_SBS代表平均SBS信任度。參數Mean_TB代表平均TB信任度。In the above formula, the parameters width and height represent the width and height of the image, respectively. The parameter Mean is the average brightness of the image. In this embodiment, the introduction parameter Mean can offset the influence of the image brightness to prevent the image format judgment result from being affected by the image brightness. The parameter Mean_SBS represents the average SBS trust. The parameter Mean_TB represents the average TB trust.

於步驟410中,判斷參數Mean_SBS與Mean_TB間的大小關係。如果參數Mean_TB大於Mean_SBS的話,則判斷任一個SBS信號度Diff_SBSi是否大於T1*mean(步驟415)。T1是第一門檻值。如果此影像中有任一個SBS信號度Diff_SBSi大於T1*Mean的話,則此張影像被判斷為2D影像,如步驟425所示。如果判斷為2D影像的話,則以2D播放模式來播放之。In step 410, the size relationship between the parameters Mean_SBS and Mean_TB is determined. If the parameter Mean_TB is greater than Mean_SBS, it is determined whether any of the SBS signal degrees Diff_SBS i is greater than T1*mean (step 415). T1 is the first threshold. If any of the SBS semaphores Diff_SBS i in the image is greater than T1*Mean, the image is determined to be a 2D image, as shown in step 425. If it is judged to be a 2D image, it is played in the 2D playback mode.

如果參數Mean_TB小於Mean_SBS的話,則判斷任一個TB信號度Diff_TBi是否大於T1*Mean(步驟420)。如果此影像中有任一個TB信號度Diff_TBi大於T1*Mean的話,則此張影像被判斷為2D影像,如步驟425所示。If the parameter Mean_TB is less than Mean_SBS, it is determined whether any of the TB signal degrees Diff_TB i is greater than T1*Mean (step 420). If any of the TB signal degrees Diff_TB i in the image is greater than T1*Mean, the image is determined to be a 2D image, as shown in step 425.

如果此張影像的所有SBS信號度Diff_SBSi都小於T1*Mean的話,則判斷(T2*(Mean_TB)2)是否小於(Mean_SBS)2(步驟430)。如果是的話,則代表此張影像格式無法判斷,屬於未知格式(步驟440)。舉例來說,如果此張影像是純字幕的話(通常字幕只佔螢幕的下方的一小部份且螢幕大部份為黑底),則此張影像的SBS信任度與TB信任度間之差異可能不大,在此實施例將,將字幕影像視為無法判斷的未知格式。在播放此類未知格式影像時,會將判斷結果捨棄(比如,依預設播放模式來播放此類未知格式影像,或是依先前播放模式來播放此類未知格式影像)。If all of the SBS semaphores Diff_SBS i of the image are less than T1*Mean, it is determined whether (T2*(Mean_TB) 2 ) is less than (Mean_SBS) 2 (step 430). If so, it means that the image format cannot be judged and belongs to an unknown format (step 440). For example, if the image is a pure subtitle (usually the subtitle only occupies a small portion of the bottom of the screen and most of the screen is black), then the difference between the SBS trust and the TB trust of the image is It may not be large, and in this embodiment, the subtitle image is regarded as an unknown format that cannot be judged. When playing such an unknown format image, the judgment result will be discarded (for example, such an unknown format image is played according to the preset play mode, or such an unknown format image is played according to the previous play mode).

相反地,如果判斷(T2*(Mean_TB)2)不小於(Mean_SBS)2的話,代表此張影像的SBS信任度小,故而將此張影像判斷為3D格式的SBS格式。如果判斷為SBS影像(3D影像)的話,則以SBS播放模式來播放之。Conversely, if it is judged that (T2*(Mean_TB) 2 ) is not less than (Mean_SBS) 2 , the SBS representing the image has a small degree of trust, and thus this image is judged to be the SBS format of the 3D format. If it is judged to be an SBS image (3D image), it is played in the SBS playback mode.

如果此張影像的所有TB信號度Diff_TBi都小於T1*Mean的話,則判斷(T2*(Mean_SBS)2)是否小於(Mean_TB)2(步驟435)。如果是的話,則代表此張影像格式無法判斷,屬於未知格式(步驟440)。相反地,如果判斷(T2*(Mean_SBS)2)不小於(Mean_TB)2的話,代表此張影像的TB信任度小,故而將此張影像判斷為3D格式的TB格式。如果判斷為TB影像(3D影像)的話,則以TB播放模式來播放之。If all of the TB semaphores Diff_TB i of the image are less than T1*Mean, it is determined whether (T2*(Mean_SBS) 2 ) is less than (Mean_TB) 2 (step 435). If so, it means that the image format cannot be judged and belongs to an unknown format (step 440). Conversely, if it is judged that (T2*(Mean_SBS) 2 ) is not less than (Mean_TB) 2 , the TB trustworthiness representing the image is small, and thus the image is judged to be the TB format of the 3D format. If it is judged to be a TB image (3D image), it is played in the TB playback mode.

綜上所述可知,在本實施例中,利用SOP、SBS信任度、TB信任度、影像平均亮度等來自動偵測影像格式,故而其偵測準確度高。此外,本實施例之硬體實施成本亦低,故極具市場潛力。In summary, in this embodiment, the SOP, the SBS trust degree, the TB trust degree, the image average brightness, and the like are used to automatically detect the image format, so the detection accuracy is high. In addition, the hardware implementation cost of the embodiment is also low, so it has great market potential.

綜上所述,雖然本案已以實施例揭露如上,然其並非用以限定本案。本案所屬技術領域中具有通常知識者,在不脫離本案之精神和範圍內,當可作各種之更動與潤飾。因此,本案之保護範圍當視後附之申請專利範圍所界定者為準。In summary, although the present invention has been disclosed above by way of example, it is not intended to limit the present invention. Those who have ordinary knowledge in the technical field of the present invention can make various changes and refinements without departing from the spirit and scope of the present case. Therefore, the scope of protection of this case is subject to the definition of the scope of the patent application attached.

110~160...步驟110~160. . . step

410~450...步驟410~450. . . step

200...影像200. . . image

210...巨塊210. . . Giant block

220...子塊220. . . Subblock

230...原塊230. . . Original block

第1圖顯示根據本案實施例之自動偵測影像格式方法之流程圖。FIG. 1 is a flow chart showing a method for automatically detecting an image format according to an embodiment of the present invention.

第2圖顯示根據本案實施例之巨塊、子塊與原塊之示意圖。Fig. 2 is a view showing a block, a sub-block and a original block according to an embodiment of the present invention.

第3A圖顯示根據本實施例之SBS信任度之示意圖。Fig. 3A shows a schematic diagram of the SBS trust degree according to the present embodiment.

第3B圖顯示根據本實施例之TB信任度之示意圖。Fig. 3B is a diagram showing the TB trust degree according to the present embodiment.

第4圖顯示於本實施例中,如何根據影像平均亮度、SBS信任度與TB信任度,偵測影像格式之詳細流程圖。FIG. 4 shows a detailed flowchart of detecting an image format according to the average brightness of the image, the SBS trust degree, and the TB trust degree in the embodiment.

110~160...步驟110~160. . . step

Claims (22)

一種自動單幀影像格式偵測方法,包括:將一單幀影像分割為複數個巨塊;將每一該些巨塊分割為複數個子塊;在每一該些子塊內設置一原塊;計算每一該些原塊之一畫素亮度總和特徵值;根據該些畫素亮度總和特徵值,計算該單幀影像之一左半邊與一右半邊間之一第一信任度;根據該些畫素亮度總和特徵值,計算該單幀影像之一上半邊與一下半邊間之一第二信任度;以及根據該些畫素亮度總和特徵值、該單幀影像之該第一信任度與該第二信任度,偵測該單幀影像之一格式。An automatic single-frame image format detection method includes: dividing a single-frame image into a plurality of macroblocks; dividing each of the macroblocks into a plurality of sub-blocks; and setting an original block in each of the sub-blocks; Calculating a sum of luminance values of one of the pixels of each of the original blocks; and calculating, according to the sum of the luminance values of the pixels, a first trust degree between one of the left half and the right half of the single frame image; a luminance sum total feature value, calculating a second trust degree between one of the upper half and the lower half of the single frame image; and the first trust degree of the single frame image according to the pixel luminance sum feature value and the pixel The second degree of trust detects a format of the single frame image. 如申請專利範圍第1項所述之方法,其中,將該單幀影像分割為複數個巨塊之該步驟包括:將該單幀影像水平分割與垂直分割。The method of claim 1, wherein the step of dividing the single-frame image into a plurality of macroblocks comprises: dividing the single-frame image horizontally and vertically. 如申請專利範圍第1項所述之方法,其中,將每一該些巨塊分割為複數個子塊之該步驟包括:將每一該些巨塊水平分割與垂直分割。The method of claim 1, wherein the step of dividing each of the plurality of chunks into a plurality of sub-blocks comprises: dividing each of the chunks horizontally and vertically. 如申請專利範圍第1項所述之方法,其中,該原塊之一左上角對齊於該子塊的一左上角。The method of claim 1, wherein an upper left corner of one of the original blocks is aligned with an upper left corner of the sub-block. 如申請專利範圍第1項所述之方法,其中:該原塊之一寬度介於1與該子塊之一寬度之間;以及該原塊之一高度介於1與該子塊之一高度之間。The method of claim 1, wherein: one of the original blocks has a width between 1 and a width of the sub-block; and a height of the original block is between 1 and a height of the sub-block between. 如申請專利範圍第1項所述之方法,其中,該畫素亮度總和特徵值表示為: 其中,Luma代表一畫素亮度,i代表第i個巨塊之一標號,j代表第i個巨塊內之第j個子塊之標號,N Marco 代表該些巨塊之總數量,N Sub 代表在各巨塊中之該些子塊之總數量,SOP i , j 代表第i個巨塊的第j個子塊的所有畫素之亮度總和。The method of claim 1, wherein the pixel luminance sum characteristic value is expressed as: Where Luma represents a pixel brightness, i represents a label of the i-th macro block, j represents the number of the j-th sub-block within the i-th macro block, N Marco represents the total number of the macro blocks, and N Sub represents The total number of the sub-blocks in each chunk, SOP i , j represents the sum of the luminances of all the pixels of the j-th sub-block of the i-th chunk. 如申請專利範圍第6項所述之方法,其中,計算該影像之該第一信任度Diff_SBS m 之步驟包括: 其中,abs代表取絕對值。The application method of claim 6 patentable scope of the item, wherein the calculating the first trust Diff image of the SBS m _ step comprises: Among them, abs represents the absolute value. 如申請專利範圍第7項所述之方法,其中,計算該影像之該第二信任度Diff_TB m 之步驟包括: The application method of claim 7 patentable scope item, wherein calculating the second image of the trust Diff TB m _ steps of comprising: . 如申請專利範圍第8項所述之方法,其中,偵測該單幀影像之該格式之該步驟包括:比較該單幀影像之該第一信任度之一第一平均值與該第二信任度之一第二平均值;如果該第一平均值小於該第二平均值,且該第一信任度大於一第一門檻值與一影像平均亮度特徵值之一乘積,則判斷該單幀影像為一二維影像;如果該第一平均值大於該第二平均值,且該第二信任度大於該第一門檻值與該影像平均亮度特徵值之該乘積,則判斷該單幀影像為一二維影像;如果該第一平均值小於該第二平均值,該單幀影像之所有第一信任度都小於該第一門檻值與該影像平均亮度特徵值之該乘積,且T2*(Mean_TB)2小於(Mean_SBS)2,則判斷該單幀影像之格式為未知,其中,T2代表一第二門檻值,Mean_SBS代表該第一平均值,Mean_TB代表該第二平均值;如果該第一平均值小於該第二平均值,該單幀影像之所有第一信任度都小於該第一門檻值與該影像平均亮度特徵值之該乘積,且T2*(Mean_TB)2大於(Mean_SBS)2,則判斷該單幀影像之格式為三維格式的左右並排格式;如果該第一平均值大於該第二平均值,該單幀影像之所有第二信任度都小於該第一門檻值與該影像平均亮度特徵值之該乘積,且T2*(Mean_SBS)2小於(Mean_TB)2,則判斷該單幀影像之格式為未知;以及如果該第一平均值大於該第二平均值,該單幀影像之所有第二信任度都小於該第一門檻值與該影像平均亮度特徵值之該乘積,且T2*(Mean_SBS)2大於(Mean_TB)2,則判斷該單幀影像之格式為三維格式的上下並排格式。The method of claim 8, wherein the step of detecting the format of the single frame image comprises: comparing a first average of the first trust degree of the single frame image with the second trust a second average value; if the first average value is less than the second average value, and the first trust level is greater than a product of a first threshold value and an image average brightness characteristic value, determining the single frame image Is a two-dimensional image; if the first average value is greater than the second average value, and the second trust level is greater than the product of the first threshold value and the image average brightness characteristic value, determining that the single frame image is one a two-dimensional image; if the first average value is smaller than the second average value, all first trust degrees of the single-frame image are smaller than the product of the first threshold value and the image average brightness characteristic value, and T2*(Mean_TB 2 is less than (Mean_SBS) 2 , it is determined that the format of the single frame image is unknown, wherein T2 represents a second threshold, Mean_SBS represents the first average, and Mean_TB represents the second average; if the first average The value is less than the second average All the first image of a single frame of confidence is less than the first threshold value with the product of the average luminance characteristic of the image, and T2 * (Mean_TB) 2 is greater than (Mean_SBS) 2, it is determined that the format of the image of a single frame a left and right side-by-side format of the three-dimensional format; if the first average value is greater than the second average value, all second trust degrees of the single-frame image are smaller than the product of the first threshold value and the image average brightness characteristic value, and T2 *(Mean_SBS) 2 is less than (Mean_TB) 2 , it is determined that the format of the single frame image is unknown; and if the first average value is greater than the second average value, all second trust degrees of the single frame image are smaller than the first A product of the threshold value and the average brightness characteristic value of the image, and T2*(Mean_SBS) 2 is greater than (Mean_TB) 2 , determining that the format of the single-frame image is a top-down side-by-side format of the three-dimensional format. 一種單幀影像播放方法,包括:將一單幀影像分割為複數個巨塊;將每一該些巨塊分割為複數個子塊;在每一該些子塊內設置一原塊;計算每一該些原塊之一畫素亮度總和特徵值;根據該些畫素亮度總和特徵值,判斷該單幀影像之一第一半邊是否相似於一第二半邊,如果是,則判斷該單幀影像為一三維格式;以及根據所判斷的影像格式,播放該單幀影像。A single-frame video playback method includes: dividing a single-frame image into a plurality of macroblocks; dividing each of the macroblocks into a plurality of sub-blocks; and setting an original block in each of the sub-blocks; And determining, according to the sum of the pixel brightness, a first half of the single frame image is similar to a second half, and if yes, determining the single frame The image is in a three-dimensional format; and the single-frame image is played according to the determined image format. 如申請專利範圍第10項所述之方法,其中,將該單幀影像分割為複數個巨塊之該步驟包括:將該影像水平分割與垂直分割。The method of claim 10, wherein the step of dividing the single-frame image into a plurality of macroblocks comprises: dividing the image horizontally and vertically. 如申請專利範圍第10項所述之方法,其中,將每一該些巨塊分割為複數個子塊之該步驟包括:將每一該些巨塊水平分割與垂直分割。The method of claim 10, wherein the step of dividing each of the plurality of chunks into a plurality of sub-blocks comprises: dividing each of the chunks horizontally and vertically. 如申請專利範圍第10項所述之方法,其中,該原塊之一左上角對齊於該子塊的一左上角。The method of claim 10, wherein an upper left corner of one of the original blocks is aligned with an upper left corner of the sub-block. 如申請專利範圍第10項所述之方法,其中:該原塊之一寬度介於1與該子塊之一寬度之間;以及該原塊之一高度介於1與該子塊之一高度之間。The method of claim 10, wherein: one of the original blocks has a width between 1 and a width of the sub-block; and a height of the original block is between 1 and a height of the sub-block between. 如申請專利範圍第10項所述之方法,其中,根據該些畫素亮度總和特徵值,判斷該單幀影像之一左半邊是否相似於一右半邊,如果是,則判斷該單幀影像為一三維格式的左右並排格式。The method of claim 10, wherein determining whether the left half of the single-frame image is similar to a right half according to the sum of the luminance values of the pixels, and if so, determining that the single-frame image is A side-by-side format of a three-dimensional format. 如申請專利範圍第15項所述之方法,其中,根據該些畫素亮度總和特徵值,判斷該單幀影像之一上半邊是否相似於一下半邊,如果是,則判斷該單幀影像為一三維格式的上下並排格式。The method of claim 15, wherein determining whether the upper half of the single frame image is similar to the lower half according to the sum of the luminance characteristic values of the pixels, if yes, determining that the single frame image is one The top and bottom side format of the 3D format. 如申請專利範圍第16項所述之方法,其中,該畫素亮度總和特徵值表示為: 其中,Luma代表一畫素亮度,i代表第i個巨塊之一標號,j代表第i個巨塊內之第j個子塊之標號,N Marco 代表該些巨塊之總數量,N Sub 代表在各巨塊中之該些子塊之總數量,SOP i , j 代表第i個巨塊的第j個子塊的所有畫素之亮度總和。The method of claim 16, wherein the pixel luminance sum characteristic value is expressed as: Where Luma represents a pixel brightness, i represents a label of the i-th macro block, j represents the number of the j-th sub-block within the i-th macro block, N Marco represents the total number of the macro blocks, and N Sub represents The total number of the sub-blocks in each chunk, SOP i , j represents the sum of the luminances of all the pixels of the j-th sub-block of the i-th chunk. 如申請專利範圍第17項所述之方法,更包括:計算該影像之一第一信任度Diff_SBS m Diff_SBS m = abs代表取絕對值;以及計算該影像之一第二信任度Diff_TB m The method of claim 17, further comprising: calculating a first trust degree of the image Diff _ SBS m , Diff _ SBS m = Abs represents an absolute value; and calculates a second trust degree Diff _ TB m of the image, 如申請專利範圍第18項所述之方法,其中,判斷該單幀影像為該左右並排格式之該步驟包括:如果該單幀影像之該第一信任度之一第一平均值小於該第二信任度之一第二平均值,該單幀影像之所有第一信任度都小於一第一門檻值與一影像平均亮度特徵值之一乘積,且T2*(Mean_TB)2大於(Mean_SBS)2,則判斷該單幀影像之格式為三維格式中的左右並排格式,其中,T2代表一第二門檻值,Mean_SBS代表該第一平均值,Mean_TB代表該第二平均值。The method of claim 18, wherein the step of determining that the single frame image is the left and right side-by-side format comprises: if the first average value of the first trust degree of the single frame image is smaller than the second a second average value of the trust, all first trust degrees of the single frame image are less than a product of a first threshold value and an image average brightness characteristic value, and T2*(Mean_TB) 2 is greater than (Mean_SBS) 2 , Then, the format of the single-frame image is determined to be a left-right side-by-side format in a three-dimensional format, where T2 represents a second threshold value, Mean_SBS represents the first average value, and Mean_TB represents the second average value. 如申請專利範圍第19項所述之方法,其中,判斷該單幀影像為該上下並排格式之該步驟包括:如果該第一平均值大於該第二平均值,該單幀影像之所有第二信任度都小於該第一門檻值與該影像平均亮度特徵值之該乘積,且T2*(Mean_SBS)2大於(Mean_TB)2,則判斷該單幀影像之格式為三維格式的該上下並排格式。The method of claim 19, wherein the step of determining that the single frame image is in the up and down side by side format comprises: if the first average value is greater than the second average value, all second of the single frame image The trust degree is less than the product of the first threshold value and the average brightness characteristic value of the image, and T2*(Mean_SBS) 2 is greater than (Mean_TB) 2 , and the format of the single frame image is determined to be the upper and lower side-by-side format of the three-dimensional format. 如申請專利範圍第20項所述之方法,更包括:如果該第一平均值小於該第二平均值,且該第一信任度大於該第一門檻值與該影像平均亮度特徵值之該乘積,則判斷該單幀影像為一二維影像;以及如果該第一平均值大於該第二平均值,且該第二信任度大於該第一門檻值與該影像平均亮度特徵值之該乘積,則判斷該單幀影像為一二維影像。The method of claim 20, further comprising: if the first average value is less than the second average value, and the first trust level is greater than the product of the first threshold value and the image average brightness characteristic value And determining, the single frame image is a two-dimensional image; and if the first average value is greater than the second average value, and the second trust level is greater than the product of the first threshold value and the image average brightness characteristic value, Then, the single frame image is determined to be a two-dimensional image. 如申請專利範圍第21項所述之方法,更包括:如果該第一平均值小於該第二平均值,該單幀影像之所有第一信任度都小於該第一門檻值與該影像平均亮度特徵值之該乘積,且T2*(Mean_TB)2小於(Mean_SBS)2,則判斷該單幀影像之格式為未知;以及如果該第一平均值大於該第二平均值,該單幀影像之所有第二信任度都小於該第一門檻值與該影像平均亮度特徵值之該乘積,且T2*(Mean_SBS)2小於(Mean_TB)2,則判斷該單幀影像之格式為未知。The method of claim 21, further comprising: if the first average value is less than the second average value, all first trust degrees of the single frame image are less than the first threshold value and the average brightness of the image a product of the feature values, and T2*(Mean_TB) 2 is less than (Mean_SBS) 2 , determining that the format of the single frame image is unknown; and if the first average value is greater than the second average value, all of the single frame image The second trust degree is less than the product of the first threshold value and the image average brightness characteristic value, and T2*(Mean_SBS) 2 is less than (Mean_TB) 2 , and the format of the single frame image is determined to be unknown.
TW100148693A 2011-12-26 2011-12-26 Method for auto-detect image format and playing method applying the same TW201328316A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW100148693A TW201328316A (en) 2011-12-26 2011-12-26 Method for auto-detect image format and playing method applying the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW100148693A TW201328316A (en) 2011-12-26 2011-12-26 Method for auto-detect image format and playing method applying the same

Publications (1)

Publication Number Publication Date
TW201328316A true TW201328316A (en) 2013-07-01

Family

ID=49225370

Family Applications (1)

Application Number Title Priority Date Filing Date
TW100148693A TW201328316A (en) 2011-12-26 2011-12-26 Method for auto-detect image format and playing method applying the same

Country Status (1)

Country Link
TW (1) TW201328316A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106028019A (en) * 2016-05-31 2016-10-12 上海易维视科技股份有限公司 Method for rapidly detecting three-dimensional format of video

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106028019A (en) * 2016-05-31 2016-10-12 上海易维视科技股份有限公司 Method for rapidly detecting three-dimensional format of video
CN106028019B (en) * 2016-05-31 2017-12-29 上海易维视科技股份有限公司 Video 3 dimensional format quick determination method

Similar Documents

Publication Publication Date Title
US9049336B2 (en) Auto-detect method for detecting image format and playback method applying the same
Battisti et al. Objective image quality assessment of 3D synthesized views
CN102187680B (en) Method and apparatus for determining two- or three-dimensional display mode of image sequence
TWI536801B (en) 3d video format detection
US20120169724A1 (en) Apparatus and method for adaptively rendering subpixel
CN104144334B (en) Local-caption extraction for stereoscopic video content
US10560681B2 (en) Stereo logo insertion
US8891856B2 (en) Method of automatically detecting image format and device thereof
TW201325204A (en) Stereoscopic image pickup and display quality estimation system and method applicable thereto
CN105049824A (en) Method for automatically detecting three-dimensional video format
US8884951B2 (en) Depth estimation data generating apparatus, depth estimation data generating method, and depth estimation data generating program, and pseudo three-dimensional image generating apparatus, pseudo three-dimensional image generating method, and pseudo three-dimensional image generating program
JP6170631B2 (en) Method and apparatus for normalizing content size in multi-screen theater and computer-readable recording medium
KR20140074238A (en) Method and apparatus for color transfer between images
CN103139583A (en) Method and device for compressing depth map of three-dimensional video
US9270979B2 (en) Apparatus and method for measuring 3-dimensional interocular crosstalk
CN104767985A (en) Method of using region distribution analysis to automatically detect 3D image format
TW201328316A (en) Method for auto-detect image format and playing method applying the same
Zhang et al. Stereoscopic learning for disparity estimation
CN106028019B (en) Video 3 dimensional format quick determination method
TWI502545B (en) Method of storing a content of a three-dimensional image
Kim et al. A study on the possibility of implementing a real-time stereoscopic 3D rendering TV system
KR101479435B1 (en) 3d moving image creation device, and 3d moving image creation method
Lin et al. A stereoscopic video conversion scheme based on spatio-temporal analysis of MPEG videos
CN106658022B (en) A kind of Watermarking for Integrity insertion and detection method based on MPEG video compression domain
Liao et al. Stereo matching and viewpoint synthesis FPGA implementation