[go: up one dir, main page]

TW201322732A - Method for adjusting moving depths of video - Google Patents

Method for adjusting moving depths of video Download PDF

Info

Publication number
TW201322732A
TW201322732A TW100143735A TW100143735A TW201322732A TW 201322732 A TW201322732 A TW 201322732A TW 100143735 A TW100143735 A TW 100143735A TW 100143735 A TW100143735 A TW 100143735A TW 201322732 A TW201322732 A TW 201322732A
Authority
TW
Taiwan
Prior art keywords
characteristic data
relative movement
movement characteristic
pictures
gain value
Prior art date
Application number
TW100143735A
Other languages
Chinese (zh)
Inventor
guang-zhi Liu
Chun Wang
Jian-De Jiang
guo-qing Liu
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 TW100143735A priority Critical patent/TW201322732A/en
Publication of TW201322732A publication Critical patent/TW201322732A/en

Links

Landscapes

  • Image Analysis (AREA)

Abstract

A method for adjusting moving depths for a video is provided, which is adapted for 2D to 3D conversion. The method includes receiving a plurality of frames at a plurality time points and calculating a plurality of local motion vectors and a global motion vector in each of the frames. The method also includes determining a first difference degree between the local motion vectors and the global motion vector in the frames. The method further includes determining a second difference degree between a current frame and the other frames of the frames. The method also includes calculating a gain value according to the first difference degree and the second difference degree. The method further includes adjusting original depths of the current frame according to the gain value. Accordingly, a phenomenon of depth inversion could be avoided or reformed.

Description

調整影像之運動景深的方法Method of adjusting the moving depth of field of an image

本發明是有關於一種調整影像之運動景深的方法,且特別是有關於一種可避免或改善景深倒置現象的調整影像之運動景深的方法。The present invention relates to a method for adjusting the motion depth of field of an image, and more particularly to a method for adjusting the motion depth of field of an image that avoids or improves the depth of field inversion phenomenon.

隨著顯示技術的進步,可提供三維(3D)影像畫面的顯示器如雨後春筍般地湧現。此種立體顯示器所需的影像資訊包括二維(2D)影像畫面及其深度資訊。藉由二維影像畫面及其深度資訊,立體顯示器可重建對應的三維影像畫面。As display technology advances, displays that provide three-dimensional (3D) imagery have sprung up. The image information required for such a stereoscopic display includes a two-dimensional (2D) image and its depth information. The stereoscopic display can reconstruct the corresponding 3D image by the 2D image and its depth information.

傳統影像景深的估算方法之一是藉由物體運動程度來擷取其深度,此稱為「自運動獲取深度(depth-from-motion;DMP)」方法。其中,具較高運動程度的物體被賦予較小(較近)深度;反之,具較低運動程度的物體被賦予較大(較遠)深度。One of the methods for estimating the depth of field of a traditional image is to capture its depth by the degree of motion of the object. This is called the "depth-from-motion (DMP)" method. Among them, objects with a higher degree of motion are given a smaller (nearer) depth; conversely, objects with a lower degree of motion are given a larger (longer) depth.

對於一般的影像而言,藉由上述DMP方法所獲得的景深,不至發生景深倒置的現象。然而,倘若影像中具有視窗移動物件(windowed-moving object),藉由傳統的DMP方法就會發生景深倒置的現象。請參考圖1,圖1為一影像100包含有一視窗移動物件120的示意圖。影像100的拍攝場合為拍攝者本身處於移動狀態下,例如拍攝者坐在汽車或火車等正在進行中的交通工具並對著車窗外拍攝。視窗移動物件120呈現所拍攝的車窗外景況,而影像100中的背景110則呈現了車內的景況。在傳統的DMP方法中,因具較高運動程度的物體被賦予較小(較近)景深,故視窗移動物件120的景深會較背景110的景深小,而使得觀看者所看到的影像100中視窗移動物件120會較背景110還要近的景深倒置現象。For a general image, the depth of field obtained by the above DMP method does not cause the phenomenon of depth of field inversion. However, if the image has a windowed-moving object, the depth of field inversion occurs by the conventional DMP method. Please refer to FIG. 1. FIG. 1 is a schematic diagram of an image 100 including a window moving object 120. The image 100 is photographed in such a manner that the photographer himself is in a moving state, for example, the photographer is sitting in an ongoing vehicle such as a car or a train and photographing outside the window. The window moving object 120 presents the captured scene outside the window, while the background 110 in the image 100 presents the scene within the vehicle. In the conventional DMP method, since an object having a higher degree of motion is given a smaller (closer) depth of field, the depth of field of the window moving object 120 is smaller than the depth of field of the background 110, so that the image 100 seen by the viewer is made. The mid-view moving object 120 will be closer to the depth of field than the background 110.

本發明提供調整影像之運動景深的方法,此方法可避免或改善景深倒置現象。The present invention provides a method of adjusting the motion depth of field of an image, which avoids or improves the depth of field inversion phenomenon.

本發明之一實施例提出一種調整影像之運動景深的方法,用於二維轉三維影像處理。上述方法包括:(i)接收多個時間點的多個畫面,並依據各畫面各自之多個狹域移動向量與一廣域移動向量,計算上述畫面當中每一者之相對移動特性資料;(ii)將上述畫面之相對移動特性資料累積計算,以獲得第一累積相對移動特性資料;(iii)將上述畫面當中除一最近畫面外之其餘畫面之相對移動特性資料累積計算,以獲得一第二累積相對移動特性資料;(iv)比較最近畫面之相對移動特性資料與第二累積相對移動特性資料以獲得一比較相對移動特性資料;(v)依據第一累積相對移動特性資料與比較相對移動特性資料來計算出一增益值;以及(vi)依據增益值來調整最近畫面之原始運動景深。One embodiment of the present invention provides a method for adjusting the motion depth of field of an image for two-dimensional to three-dimensional image processing. The method includes: (i) receiving a plurality of pictures at a plurality of time points, and calculating relative movement characteristic data of each of the images according to a plurality of narrow-area movement vectors and a wide-area movement vector of each picture; Ii) accumulating the relative movement characteristic data of the above picture to obtain the first cumulative relative movement characteristic data; (iii) accumulating the relative movement characteristic data of the remaining pictures except the latest picture in the above picture to obtain a first Two cumulative relative movement characteristic data; (iv) comparing the relative movement characteristic data of the latest picture with the second cumulative relative movement characteristic data to obtain a comparative relative movement characteristic data; (v) relative moving according to the first cumulative relative movement characteristic data The characteristic data is used to calculate a gain value; and (vi) the original motion depth of field of the recent picture is adjusted according to the gain value.

本發明之另一實施例提出一種調整影像之運動景深的方法,用於二維轉三維影像處理。上述方法包括:接收多個時間點的多個畫面,並計算各畫面各自之多個狹域移動向量與一廣域移動向量;判斷上述多個畫面中,上述多個狹域移動向量與廣義移動向量間之第一差異程度;判斷上述畫面當中一最近畫面與其餘先前畫面間之第二差異程度;依據第一差異程度與第二差異程度來計算出一增益值;以及依據增益值來調整最近畫面之原始運動景深。Another embodiment of the present invention provides a method for adjusting the motion depth of field of an image for two-dimensional to three-dimensional image processing. The method includes: receiving a plurality of pictures at a plurality of time points, and calculating a plurality of narrow-area motion vectors and a wide-area motion vector of each picture; determining the plurality of narrow-area moving vectors and the generalized movement in the plurality of pictures a first degree of difference between the vectors; determining a second degree of difference between a recent picture and the remaining previous pictures in the picture; calculating a gain value according to the first difference degree and the second difference degree; and adjusting the nearest according to the gain value The original motion depth of the picture.

在本發明之一實施例中,上述步驟(i)係包括:(a)分別就各畫面計算各狹域向量與廣域向量間之差值,以獲得多個相對移動向量;以及(b)依據各畫面之狹域移動向量與相對移動向量,以獲得各畫面之相對移動特性資料。In an embodiment of the present invention, the step (i) includes: (a) calculating a difference between each narrow-domain vector and a wide-area vector for each picture to obtain a plurality of relative motion vectors; and (b) The relative motion data of each picture is obtained according to the narrow field motion vector and the relative motion vector of each picture.

在本發明之一實施例中,上述步驟(b)係包括:(b1)判斷各狹域移動向量的絕對值是否大於一第一臨界值;(b2)判斷各相對移動向量的絕對值是否大於一第二臨界值;以及(b3)依據上述判斷結果以獲得各畫面的相對移動特性資料。In an embodiment of the present invention, the step (b) includes: (b1) determining whether an absolute value of each narrow-field motion vector is greater than a first threshold; and (b2) determining whether an absolute value of each relative motion vector is greater than a second threshold value; and (b3) obtaining relative movement characteristic data of each picture according to the above judgment result.

在本發明之一實施例中,上述步驟(b3)係包括:依據上述判斷結果以計算出各畫面中與多個狹域單元相對應之多個比較結果值;以及將上述比較結果值沿一行/列映射方向映射以產生一映射移動向量,映射移動向量代表相對移動特性資料。In an embodiment of the present invention, the step (b3) includes: calculating, according to the determination result, a plurality of comparison result values corresponding to the plurality of narrow-area units in each screen; and placing the comparison result value along a line The /column map direction maps to produce a map motion vector, and the map motion vector represents relative motion profile data.

在本發明之一實施例中,上述產生映射移動向量之步驟係包括;將上述比較結果值沿行/列映射方向計數以產生多個分別對應於不同行/列的計數值;以及將上述計數值分別與一第三臨界值比較,以依據上述計數值與第三臨界值的比較結果來產生映射移動向量之多個元素值。In an embodiment of the present invention, the step of generating a mapping motion vector includes: counting the comparison result values in a row/column mapping direction to generate a plurality of count values respectively corresponding to different rows/columns; and The values are respectively compared with a third threshold to generate a plurality of element values of the mapped motion vector based on the comparison of the count value with the third threshold.

在本發明之一實施例中,上述步驟(i)至(v)係分別依據上述畫面之一個至多個方向實施。In an embodiment of the present invention, the above steps (i) to (v) are respectively performed according to one to a plurality of directions of the above-mentioned screen.

在本發明之一實施例中,上述畫面中之相對移動特性資料的每一者各包括多個對應於不同行/列的元素值。上述步驟(ii)係包括:將上述畫面中對應於同一行/列的元素值進行或運算,以獲得第一累積相對移動特性資料。In an embodiment of the invention, each of the relative motion characteristic data in the picture includes a plurality of element values corresponding to different rows/columns. The above step (ii) includes: ORing the element values corresponding to the same row/column in the above picture to obtain the first cumulative relative movement characteristic data.

在本發明之一實施例中,上述步驟(iii)係包括:將上述其餘畫面之相對移動特性資料中對應於同一行/列的元素值進行或運算,以獲得第二累積相對移動特性資料。In an embodiment of the present invention, the step (iii) includes: performing an OR operation on the element values corresponding to the same row/column in the relative movement characteristic data of the remaining pictures to obtain the second cumulative relative movement characteristic data.

在本發明之一實施例中,上述步驟(iv)係包括:將相對移動特性資料之複數個元素值與第二累積相對移動特性資料中對應於同一行/列之相反元素值進行及運算,以獲得比較相對移動特性資料。In an embodiment of the present invention, the step (iv) includes: combining a plurality of element values of the relative movement characteristic data with opposite element values corresponding to the same row/column of the second cumulative relative movement characteristic data, To obtain comparative relative movement characteristics data.

在本發明之一實施例中,上述步驟(v)係包括:依據第一累積相對移動特性資料,取得一第一增益值;依據比較相對移動特性資料,取得一第二增益值;以及依據第一增益值及第二增益值計算出增益值。In an embodiment of the present invention, the step (v) includes: obtaining a first gain value according to the first cumulative relative movement characteristic data; obtaining a second gain value according to comparing the relative movement characteristic data; A gain value and a second gain value calculate a gain value.

在本發明之一實施例中,上述取得第一增益值之步驟係包括:依據第一累積相對移動特性資料之複數個元素值之一第一加總值,自一第一增益曲線中獲得第一增益值。上述取得第二增益值之步驟係包括:依據比較相對移動特性資料之複數個元素值之一第二加總值,自一第二增益曲線中獲得第二增益值。In an embodiment of the present invention, the step of obtaining the first gain value includes: obtaining a first gain value from a first gain curve according to a first sum value of one of a plurality of element values of the first cumulative relative motion characteristic data A gain value. The step of obtaining the second gain value includes: obtaining a second gain value from a second gain curve according to comparing the second summation value of one of the plurality of element values of the relative movement characteristic data.

在本發明之一實施例中,上述第一增益值與第二增益值當中每一者係分別依第一與第二方向計算。In an embodiment of the invention, each of the first gain value and the second gain value is calculated according to the first and second directions, respectively.

在本發明之一實施例中,上述計算增益值步驟係包括:獲得沿第一方向之第一增益值與第二增益值之乘積;獲得沿第二方向之第一增益值與第二增益值之乘積;以及依據上述兩乘積當中之一較大者來決定增益值。In an embodiment of the invention, the calculating the gain value step comprises: obtaining a product of the first gain value and the second gain value in the first direction; obtaining the first gain value and the second gain value in the second direction; The product of the gain; and the gain value is determined according to one of the two products.

在本發明之一實施例中,上述判斷第一差異程度之步驟係包括:分別就各畫面計算狹域向量與廣域向量間之差值,以獲得多個相對移動向量;依據各畫面之狹域移動向量與相對移動向量,以獲得各畫面之相對移動特性資料;以及將畫面之相對移動特性資料累積計算,以獲得第一累積相對移動特性資料,而第一累積相對移動特性資料代表第一差異程度。In an embodiment of the present invention, the step of determining the first degree of difference comprises: separately calculating a difference between the narrow field vector and the wide area vector for each picture to obtain a plurality of relative motion vectors; a domain motion vector and a relative motion vector to obtain a relative motion characteristic data of each picture; and cumulatively calculating a relative motion characteristic data of the picture to obtain a first cumulative relative motion characteristic data, and the first cumulative relative motion characteristic data represents the first The degree of difference.

在本發明之一實施例中,上述獲得各畫面之相對移動特性資料之步驟係包括:判斷狹域移動向量的絕對值是否大於一第一臨界值;判斷相對移動向量的絕對值是否大於一第二臨界值;以及依據上述判斷結果以獲得各畫面的相對移動特性資料。In an embodiment of the present invention, the step of obtaining the relative movement characteristic data of each picture comprises: determining whether an absolute value of the narrow range motion vector is greater than a first critical value; and determining whether an absolute value of the relative motion vector is greater than a first value The second critical value; and the relative movement characteristic data of each picture is obtained according to the above judgment result.

在本發明之一實施例中,上述判斷第二差異程度之步驟係包括:將畫面當中除一最近畫面外之其餘畫面之相對移動特性資料累積計算,以獲得一第二累積相對移動特性資料;以及比較最近畫面之相對移動特性資料與第二累積相對移動特性資料以獲得一比較相對移動特性資料,比較相對移動特性資料代表第二差異程度。In an embodiment of the present invention, the step of determining the second degree of difference comprises: accumulating the relative movement characteristic data of the remaining pictures of the picture other than the latest picture to obtain a second cumulative relative movement characteristic data; And comparing the relative movement characteristic data of the latest picture with the second cumulative relative movement characteristic data to obtain a comparative relative movement characteristic data, and comparing the relative movement characteristic data to represent the second difference degree.

在本發明之一實施例中,當第一差異程度越大時,增益值係設定為越小,以及當第二差異程度越小時,增益值係設定為越小。In an embodiment of the invention, the gain value is set to be smaller as the first difference degree is larger, and the gain value is set to be smaller as the second difference degree is smaller.

基於上述,上述實施例藉由所計算出的第一累積相對移動特性資料及比較相對移動特性資料,獲得增益值。其中,第一累積相對移動特性資料用以判斷狹域向量與廣域向量間之間的差異程度,而比較相對移動特性資料用以判斷最近畫面與其餘的先前畫面之間的差異程度。因此,所得到的增益值會相關於狹域向量與廣域向量間之間的差異程度,並相關於最近畫面與其餘的先前畫面之間的差異程度。藉此,依據增益值而調整的最近畫面之運動景深得以真實地反應拍攝景況,而避免或改善景深倒置現象。Based on the above, the above embodiment obtains the gain value by calculating the first cumulative relative movement characteristic data and comparing the relative movement characteristic data. The first cumulative relative movement characteristic data is used to determine the degree of difference between the narrow field vector and the wide area vector, and the relative moving characteristic data is used to determine the degree of difference between the latest picture and the remaining previous pictures. Therefore, the resulting gain value is related to the degree of difference between the narrow-area vector and the wide-area vector, and is related to the degree of difference between the most recent picture and the rest of the previous picture. Thereby, the motion depth of the recent picture adjusted according to the gain value can truly reflect the shooting situation, and avoid or improve the depth of field inversion phenomenon.

為讓本發明之上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。The above described features and advantages of the present invention will be more apparent from the following description.

請參考圖2A,圖2A是本發明一實施例之影像處理電路200的功能方塊圖。影像處理電路200包括接收埠210、邏輯電路220以及緩衝記憶體230。接收埠210用以接收影像IMG1於多個時間點的多個畫面。如圖3所示,影像IMG1具有多個畫面M0~M9,而畫面M0~M9分別與時間點T0~T9對應。其中,畫面M0對應於時間點T0、畫面M1對應於時間點T1,依此類推。在此,畫面M0被定義為目前所處理的畫面,而稱為「最近畫面」,其餘畫面M1~M9則稱為「先前畫面」。須瞭解的,雖然圖3所繪示的影像IMG1具有10個畫面,但本技術領域中具有通常知識者應明白影像IMG1的畫面數可為其他數目。Please refer to FIG. 2A. FIG. 2A is a functional block diagram of an image processing circuit 200 according to an embodiment of the present invention. The image processing circuit 200 includes a receiving port 210, a logic circuit 220, and a buffer memory 230. The receiving port 210 is configured to receive a plurality of pictures of the image IMG1 at a plurality of time points. 3, having a plurality of picture image IMG1 M0 ~ M9, and the picture M0 ~ M9 correspond to the time point T 0 ~ T 9. The picture M0 corresponds to the time point T 0 , the picture M1 corresponds to the time point T 1 , and so on. Here, the screen M0 is defined as the currently processed screen, and is referred to as the "recent screen", and the remaining screens M1 to M9 are referred to as the "previous screen". It should be understood that although the image IMG1 illustrated in FIG. 3 has 10 pictures, those skilled in the art should understand that the number of pictures of the image IMG1 may be other numbers.

邏輯電路220耦接於接收埠210,用以執行本發明之調整影像的運動景深之方法。當邏輯電路220調整完影像IMG1中任一畫面的運動景深後,即可產生並輸出另一影像IMG2中一個對應的畫面。影像IMG2的每個畫面之運動景深皆由邏輯電路220調整過,且影像IMG2可被傳送至一顯示裝置,而由該顯示裝置基於影像IMG2顯示對應的畫面。The logic circuit 220 is coupled to the receiving port 210 for performing the method of adjusting the moving depth of field of the image of the present invention. After the logic circuit 220 adjusts the motion depth of the image in any of the images IMG1, a corresponding picture in the other image IMG2 can be generated and output. The motion depth of each picture of the image IMG2 is adjusted by the logic circuit 220, and the image IMG2 can be transmitted to a display device, and the display device displays the corresponding picture based on the image IMG2.

緩衝記憶體230耦接於邏輯電路220,用以暫存邏輯電路220於運作過程中所產生的資料。以下進一步說明影像處理電路200實施調整影像的運動景深之方法。The buffer memory 230 is coupled to the logic circuit 220 for temporarily storing the data generated by the logic circuit 220 during operation. The method of adjusting the motion depth of the image by the image processing circuit 200 will be further described below.

圖2B為依據一實施例之調整影像的運動景深之方法之概要流程圖,其可由圖2A所示之影像處理電路200來實施。首先,於步驟S201中,邏輯電路220接收多個時間點的多個畫面,並計算各該畫面各自之多個狹域移動向量與一廣域移動向量。2B is a schematic flow diagram of a method of adjusting the motion depth of field of an image, which may be implemented by image processing circuit 200 of FIG. 2A, in accordance with an embodiment. First, in step S201, the logic circuit 220 receives a plurality of pictures at a plurality of time points, and calculates a plurality of narrow-area motion vectors and a wide-area motion vector for each of the pictures.

接下來,於步驟S202中,邏輯電路220係判斷該多個畫面中,該多個狹域移動向量與該廣義移動向量間之第一差異程度。當幾個畫面中狹域向量與廣域向量之間的差異程度整體較高時,表示在畫面中可能有一定大小的移動物體。Next, in step S202, the logic circuit 220 determines a first degree of difference between the plurality of narrow-range motion vectors and the generalized motion vector among the plurality of pictures. When the degree of difference between the narrow-domain vector and the wide-area vector is high overall in several pictures, it means that there may be a moving object of a certain size in the picture.

接下來,於步驟S203中,邏輯電路220係判斷該些畫面當中一最近畫面與其餘先前畫面間之第二差異程度。當第二差異程度越大時,表示畫面中的移動物體在一定時間內有一定的空間位移。Next, in step S203, the logic circuit 220 determines a second degree of difference between a recent picture and the remaining previous pictures among the pictures. When the second difference degree is larger, it indicates that the moving object in the picture has a certain spatial displacement within a certain time.

接下來,於步驟S204中,邏輯電路220係依據該第一差異程度與該第二差異程度來計算出一增益值。較佳地,當第一差異程度越大時,此增益值係設定為越小;反之,當第二差異程度越小時,則設定此增益值越小。最後,於步驟S205中,即可依據該增益值來調整該最近畫面之原始運動景深。Next, in step S204, the logic circuit 220 calculates a gain value according to the first difference degree and the second difference degree. Preferably, when the first difference degree is larger, the gain value is set to be smaller; conversely, when the second difference degree is smaller, the smaller the gain value is set. Finally, in step S205, the original motion depth of the recent picture can be adjusted according to the gain value.

結果,在應用此方法時,倘若在畫面中的移動物體為視窗移動物件(windowed-moving object),則所計算出來的第一差異程度會偏大,且所計算出之第二差異程度會偏小,進而可得到偏小的增益值G。如此一來,當畫面中的移動物體為視窗移動物件時,依據偏小的增益值G來調整後的運動景深會較小,進而可避免或改善景深倒置的現象。As a result, when the method is applied, if the moving object in the picture is a windowed-moving object, the calculated first difference degree is too large, and the calculated second difference degree is biased. Small, and in turn, a small gain value G can be obtained. In this way, when the moving object in the picture is a window moving object, the adjusted depth of field according to the small gain value G is small, thereby avoiding or improving the phenomenon of depth of field inversion.

相對地,倘若在畫面中的移動物體並非視窗移動物件,則其所計算出來的第一差異程度及第二差異程度可能皆偏大,進而產生偏大的增益值。如此一來,調整後的運動景深會較大,而使用者會觀看到正常景深的影像。In contrast, if the moving object in the picture is not a window moving object, the calculated first difference degree and the second difference degree may be too large, thereby generating a large gain value. As a result, the adjusted motion depth of field will be larger, and the user will see the image with normal depth of field.

繼續參考圖2C,其為依據一實施例之調整影像的運動景深之方法之細步流程圖,用以說明圖2B中各步驟之進一步細節。如圖2C所示,其包括下述步驟:With continued reference to FIG. 2C, which is a detailed flow chart of a method of adjusting the motion depth of field of an image in accordance with an embodiment, for further details of the steps of FIG. 2B. As shown in FIG. 2C, it includes the following steps:

首先,於步驟S211中,邏輯電路220係接收多個時間點的多個畫面,並依據各該畫面各自之多個狹域移動向量與一廣域移動向量,以進一步計算出該些畫面當中每一者各自之一相對移動特性資料。此相對移動特性資料係代表每一畫面中的多個狹域移動向量與一廣域移動向量之差異程度。First, in step S211, the logic circuit 220 receives a plurality of pictures at a plurality of time points, and further calculates each of the pictures according to a plurality of narrow field motion vectors and a wide area motion vector of each of the pictures. One of the respective relative movement characteristics data. This relative mobility characteristic data represents the degree of difference between a plurality of narrow-area motion vectors and a wide-area motion vector in each picture.

接下來,於步驟S212中,邏輯電路220係將該些畫面之該些相對移動特性資料累積計算,以獲得第一累積相對移動特性資料。其中,第一累積相對移動特性資料即用來代表圖2B中所述之第一差異程度。Next, in step S212, the logic circuit 220 cumulatively calculates the relative movement characteristic data of the screens to obtain the first cumulative relative movement characteristic data. The first cumulative relative movement characteristic data is used to represent the first degree of difference described in FIG. 2B.

接下來,於步驟S213中,邏輯電路220將該些畫面當中除一最近畫面外之其餘畫面之該相對移動特性資料累積計算,以獲得一第二累積相對移動特性資料。繼而,於步驟S214中,即可比較該最近畫面之該相對移動特性資料與該第二累積相對移動特性資料,以獲得一比較相對移動特性資料。其中,比較相對移動特性資料即用來代表圖2B中所述之第二差異程度。Next, in step S213, the logic circuit 220 cumulatively calculates the relative movement characteristic data of the remaining pictures except the most recent picture among the pictures to obtain a second cumulative relative movement characteristic data. Then, in step S214, the relative movement characteristic data of the latest picture and the second cumulative relative movement characteristic data can be compared to obtain a comparative relative movement characteristic data. Among them, the comparative relative movement characteristic data is used to represent the second degree of difference described in FIG. 2B.

接下來,於步驟S215中,即可依據該第一累積相對移動特性資料與該比較相對移動特性資料來計算出一增益值。最後,於步驟S216中,即可依據該增益值來調整該最近畫面之原始運動景深。Next, in step S215, a gain value may be calculated according to the first cumulative relative movement characteristic data and the compared relative movement characteristic data. Finally, in step S216, the original motion depth of the recent picture can be adjusted according to the gain value.

值得注意的是,上述步驟S211至S215可分別依據畫面的一個至多個方向實施,譬如為水平方向X或/及垂直方向Y。當步驟S211至S215依據畫面的多個方向實施時,上述多個方向可為水平方向X及垂直方向Y。以下將進一步使用各種實施例來詳細說明圖2C之調整影像的運動景深的方法之各個步驟。It should be noted that the above steps S211 to S215 can be implemented according to one to more directions of the screen, for example, the horizontal direction X or/and the vertical direction Y. When the steps S211 to S215 are performed in accordance with a plurality of directions of the screen, the plurality of directions may be the horizontal direction X and the vertical direction Y. The various steps of the method of adjusting the motion depth of field of the image of FIG. 2C will be further described below using various embodiments.

首先,於步驟S211中,邏輯電路220計算每一畫面M0~M9中與多個狹域單元410相對應之多個狹域移動向量及一廣域移動向量VG。請參考圖4A,圖4A繪示本發明一實施例之畫面M0中各狹域單元所對應的狹域移動向量。畫面M0被區分為多個狹域單元410,而每一個狹域單元410具有畫面M0的一個或多個像素,而多個狹域單元410排列成M列乘以N行之陣列,其中M和N為正整數。與畫面M0相同地,影像IMG1的其他畫面(例如:畫面M1~M9)的每一者都具有排列成M列乘以N行陣列的多個狹域單元410。First, in step S211, the logic circuit 220 calculates a plurality of narrow-area motion vectors and a wide-area motion vector V G corresponding to the plurality of narrow-area units 410 in each of the pictures M0 to M9. Please refer to FIG. 4A. FIG. 4A illustrates a narrow-area motion vector corresponding to each narrow-area unit in the picture M0 according to an embodiment of the present invention. The picture M0 is divided into a plurality of narrow-area units 410, and each of the narrow-area units 410 has one or more pixels of the picture M0, and the plurality of narrow-area units 410 are arranged in an array of M columns multiplied by N lines, where M and N is a positive integer. Similarly to the screen M0, each of the other screens (for example, the screens M1 to M9) of the image IMG1 has a plurality of narrow-area units 410 arranged in an array of M columns by N rows.

為方便說明,如圖4A所示,邏輯電路220所計算出的畫面M0中與多個狹域單元410相對應之多個狹域移動向量分別以V(0,1,1)~V(0,M,N)表示。類似地,在時間點Ti的畫面Mi中第j列第k行之狹域單元410所對應的狹域移動向量以V(i,j,k)表示之,其中0≦i,1≦j≦M,1≦k≦N。上述計算狹域移動向量及廣域移動向量VG的方式可以是自運動獲取深度(DMP)方法中所採用的計算狹域移動向量(local motion vector)及廣域移動向量(global motion vector)的方式,而DMP方法為本技術領域中具有通常知識者所習知,故在此即不多贅述。For convenience of description, as shown in FIG. 4A, a plurality of narrow-area motion vectors corresponding to the plurality of narrow-area units 410 in the picture M0 calculated by the logic circuit 220 are respectively V (0, 1, 1) to V (0). , M, N) . Similarly, the narrow-area motion vector corresponding to the narrow-area unit 410 of the j-th column and the k-th row in the picture Mi at the time point T i is represented by V (i, j, k) , where 0 ≦ i, 1 ≦ j ≦M,1≦k≦N. The manner of calculating the narrow range motion vector and the wide area motion vector V G may be a calculation of a local motion vector and a global motion vector used in the motion acquisition depth (DMP) method. The manner in which the DMP method is known to those of ordinary skill in the art is not described here.

值得注意的是,較佳地,於計算時,每一狹域移動向量係萃取出兩方向之分量,譬如是一水平移動向量以及一垂直移動向量,其中水平移動向量與垂直移動向量相互垂直。請參考圖4B,圖4B繪示了本發明一實施例之畫面M0中各狹域單元410所對應的相對移動向量。為方便說明,在時間點Ti的畫面Mi中第j列第k行之狹域單元410所對應的狹域移動向量以[VX(i,j,k),VY(i,j,k)]表示之,其中0≦i,1≦j≦M,1≦k≦N,VX(i,j,k)表示狹域移動向量在水平方向X上的水平分量,而VY(i,j,k)表示狹域移動向量在垂直方向Y上的垂直分量。以圖4B為例,邏輯電路220所計算出的畫面M0中與多個狹域單元410相對應之多個狹域移動向量分別以[VX(0,1,1),VY(0,1,1)]~[VX(0,M,N),VY(0,M,N)]表示。此外,邏輯電路220所計算的廣域移動向量VG係以[GX,GY]表示。其中,GX為廣域移動向量VG在水平方向X上的分量,而GY為廣域移動向量VG在垂直方向Y上的分量。It is worth noting that, preferably, each narrow-field motion vector extracts components in two directions, such as a horizontal motion vector and a vertical motion vector, wherein the horizontal motion vector and the vertical motion vector are perpendicular to each other. Please refer to FIG. 4B. FIG. 4B illustrates a relative motion vector corresponding to each narrow-area unit 410 in the picture M0 according to an embodiment of the present invention. For convenience of explanation, the narrow-area motion vector corresponding to the narrow-area unit 410 of the j-th column and the k-th row in the picture Mi at the time point T i is [V X(i, j, k) , V Y(i, j, k) ], where 0≦i,1≦j≦M,1≦k≦N, V X(i,j,k) represent the horizontal component of the narrow-field motion vector in the horizontal direction X, and V Y( i, j, k) represents the vertical component of the narrow range motion vector in the vertical direction Y. 4B, the plurality of narrow-area motion vectors corresponding to the plurality of narrow-area units 410 in the picture M0 calculated by the logic circuit 220 are respectively [V X(0 , 1, 1 ) , V Y(0, 1,1) ]~[V X(0,M,N) , V Y(0,M,N) ]. Further, the wide-area motion vector V G calculated by the logic circuit 220 is represented by [G X , G Y ]. Where G X is the component of the wide-area motion vector V G in the horizontal direction X, and G Y is the component of the wide-area motion vector V G in the vertical direction Y.

之後,邏輯電路220分別就各畫面將多個狹域向量分別與廣域向量VG比較,以計算多個相對移動向量。為方便說明,在時間點Ti的畫面Mi中第j列第k行之狹域單元410所對應的相對移動向量以Δ( i , j , k )表示之,其中0≦i,1≦j≦M,1≦k≦N。以圖5A為例,圖5A繪示畫面M0中各狹域單元410所對應的相對移動向量。如圖5A所示,邏輯電路220所計算出的畫面M0中與多個狹域單元410相對應之多個相對移動向量分別以Δ(0,1,1)~Δ(0,M,N)表示。Thereafter, the logic circuit 220 compares the plurality of narrow-area vectors with the wide-area vector V G for each picture to calculate a plurality of relative motion vectors. For convenience of explanation, the relative motion vector corresponding to the narrow-area unit 410 of the jth column and the k-th row in the picture Mi at the time point T i is represented by Δ ( i , j , k ) , where 0≦i, 1≦j ≦M,1≦k≦N. Taking FIG. 5A as an example, FIG. 5A illustrates a relative motion vector corresponding to each narrow-area unit 410 in the picture M0. As shown in FIG. 5A, the plurality of relative motion vectors corresponding to the plurality of narrow-area units 410 in the picture M0 calculated by the logic circuit 220 are respectively Δ (0, 1, 1 ) to Δ (0, M, N). Said.

在本發明一實施例中,邏輯電路220分別就各畫面計算多個狹域向量與廣域向量VG間之差值以獲得多個相對移動向量。換言之,各相對移動向量係依據下述之方程式(1)取得:In an embodiment of the invention, the logic circuit 220 calculates a difference between the plurality of narrow-area vectors and the wide-area vector V G for each picture to obtain a plurality of relative motion vectors. In other words, each relative motion vector is obtained according to the following equation (1):

Δ(i,j,k)=V(i,j,k)-VG (1)Δ (i,j,k) =V (i,j,k) -V G (1)

值得注意的是,較佳地,於計算相對移動向量Δ ( i , j , k ) 時,係分別計算兩方向之分量。請參考圖5B,圖5B繪示了畫面M0中各狹域單元410所對應的相對移動向量。為方便說明,在時間點Ti的畫面Mi中第j列第k行之狹域單元410所對應的相對移動向量以[ΔX(i,j,k)Y(i,j,k)]表示之,其中0≦i,1≦j≦M,1≦k≦N,ΔX(i,j,k)表示相對移動向量在水平方向X上的分量,而ΔY(i,j,k)表示相對移動向量在垂直方向Y上的分量。以圖5B為例,邏輯電路220所計算出的畫面M0中與多個狹域單元410相對應之多個相對移動向量分別以[ΔX(i,1,1)Y(i,1,1)]~[ΔX(i,M,N)Y(i,M,N)]表示。在本發明一實施例中,各相對移動向量在水平方向X及垂直方向Y上的分量係依據下述之方程式(1-1)、(1-2)取得:It is worth noting that, preferably, when calculating the relative motion vector Δ ( i , j , k ) , the components of the two directions are respectively calculated. Referring to FIG. 5B, FIG. 5B illustrates a relative motion vector corresponding to each narrow-area unit 410 in the picture M0. For convenience of explanation, the relative motion vector corresponding to the narrow-area unit 410 of the jth column and the k-th row in the picture Mi at the time point T i is [Δ X(i, j, k) , Δ Y(i, j, k )] represents sum, where 0 ≦ i, 1 ≦ j ≦ M, 1 ≦ k ≦ N, Δ X (i, j, k) represents the component of the vector in the horizontal direction X relative movement, and Δ Y (i, j , k) represents the component of the relative motion vector in the vertical direction Y. Taking FIG. 5B as an example, the plurality of relative motion vectors corresponding to the plurality of narrow-area units 410 in the picture M0 calculated by the logic circuit 220 are respectively [Δ X(i,1,1) , Δ Y(i,1 , 1) ]~[Δ X(i,M,N) , Δ Y(i,M,N) ]. In an embodiment of the invention, the components of the relative motion vectors in the horizontal direction X and the vertical direction Y are obtained according to the following equations (1-1) and (1-2):

ΔX(i,j,k)=VX(i,j,k)-GX (1-1)Δ X(i,j,k) =V X(i,j,k) -G X (1-1)

ΔY(i,j,k)=VY(i,j,k)-GY (1-2)Δ Y(i,j,k) =V Y(i,j,k) -G Y (1-2)

之後,邏輯電路220依據各畫面之狹域移動向量與相對移動向量,以獲得各畫面的一相對移動特性資料。請參考圖6A,圖6A繪示了各畫面的相對移動特性資料。其中,H[0]表示為畫面M0的相對移動特性資料;H[1]表示為畫面M1的相對移動特性資料;H[2]表示為畫面M2的相對移動特性資料,依此類推。Thereafter, the logic circuit 220 obtains a relative movement characteristic data of each picture according to the narrow range motion vector and the relative motion vector of each picture. Please refer to FIG. 6A. FIG. 6A illustrates the relative movement characteristics of each picture. Where H[0] is represented as the relative movement characteristic data of the picture M0; H[1] is represented as the relative movement characteristic data of the picture M1; H[2] is represented as the relative movement characteristic data of the picture M2, and so on.

在本發明一實施例中,各相對移動特性資料H[0]~H[P]分別以一維矩陣或一向量表示。如圖6A所示,相對移動特性資料H[0]~H[P]的每一者各包括多個對應於不同行/列的元素值。以相對移動特性資料H[1]為例,相對移動特性資料H[1]包括多個元素值H[1,1]~H[1,Q],分別對應於畫面M1之第1至第M列,或是對應於畫面M1之第1至第N行;而以相對移動特性資料H[P]為例,相對移動特性資料H[P]包括多個元素值H[P,1]~H[P,Q],分別對應於畫面MP之第1至第M列,或是對應於畫面MP之第1至第N行。其中元素值H[s,t]係表示在時間點Ts的畫面所對應的相對移動特性資料H[s]之第t個元素值。In an embodiment of the invention, each of the relative movement characteristic data H[0] to H[P] is represented by a one-dimensional matrix or a vector, respectively. As shown in FIG. 6A, each of the relative movement characteristic data H[0] to H[P] includes a plurality of element values corresponding to different rows/columns. Taking the relative movement characteristic data H[1] as an example, the relative movement characteristic data H[1] includes a plurality of element values H[1, 1] to H[1, Q], which correspond to the first to the Mth of the screen M1, respectively. The column, or corresponding to the first to Nth rows of the picture M1; and the relative movement characteristic data H[P] as an example, the relative movement characteristic data H[P] includes a plurality of element values H[P, 1] to H [P, Q] corresponds to the first to Mth columns of the picture MP, respectively, or to the first to Nth lines of the picture MP. The element value H[s, t] represents the t-th element value of the relative movement characteristic data H[s] corresponding to the picture at the time point T s .

另外,值得注意的是,如圖6B所示,於計算每一畫面的相對移動特性資料H[0]~H[P]時,較佳可分別計算一水平分量以及一垂直分量。例如,畫面M0的相對移動特性資料(HX[0],HY[0])包括水平分量HX[0]以及垂直分量HY[0];畫面M1的相對移動特性資料(HX[1],HY[1])包括水平分量HX[1]以及垂直分量HY[1];畫面M2的相對移動特性資料(HX[2],HY[2])包括水平分量HX[2]以及垂直分量HY[2],依此類推。In addition, it is worth noting that, as shown in FIG. 6B, when calculating the relative movement characteristic data H[0] to H[P] of each picture, it is preferable to calculate a horizontal component and a vertical component, respectively. For example, the relative movement characteristic data (H X [0], H Y [0]) of the picture M0 includes the horizontal component H X [0] and the vertical component H Y [0]; the relative movement characteristic data of the picture M1 (H X [ 1], H Y [1]) includes the horizontal component H X [1] and the vertical component H Y [1]; the relative movement characteristic data (H X [2], H Y [2]) of the picture M2 includes the horizontal component H X [2] and the vertical component H Y [2], and so on.

更仔細言之,在時間點Ti的畫面所對應的相對移動特性資料(HX[i]、HY[i])之水平分量HX[i]的第j個元素值可以HX[i,j]表示,而時間點Ti的畫面所對應的相對移動特性資料(HX[i]、HY[i])之垂直分量HY[i]的第k個元素值可以HY[i,k]表示,其中1≦j≦M,1≦k≦N。以相對移動特性資料(HX[1]、HY[1])為例,其水平分量HX[1]包括多個元素值HX[1,1]~HX[1,M],其垂直分量HY[1]包括多個元素值HY[1,1]~HY[1,N];而以相對移動特性資料(HX[P]、HY[P])為例,其水平分量HX[P]包括多個元素值HX[P,1]~HX[P,M],其垂直分量HY[P]包括多個元素值HY[P,1]~HY[P,N]。More specifically, the j-th element value of the horizontal component H X [i] of the relative movement characteristic data (H X [i], H Y [i]) corresponding to the picture at the time point T i may be H X [ i, j] indicates that the kth element value of the vertical component H Y [i] of the relative movement characteristic data (H X [i], H Y [i]) corresponding to the picture at the time point T i may be H Y [i,k] indicates that 1≦j≦M,1≦k≦N. Taking the relative movement characteristic data (H X [1], H Y [1]) as an example, the horizontal component H X [1] includes a plurality of element values H X [1, 1] to H X [1, M], The vertical component H Y [1] includes a plurality of element values H Y [1,1] to H Y [1,N]; and the relative movement characteristic data (H X [P], H Y [P]) is taken as an example. , its horizontal component H X [P] includes a plurality of element values H X [P, 1] ~ H X [P, M], and its vertical component H Y [P] includes a plurality of element values H Y [P, 1] ~H Y [P,N].

在上述實施例中,圖6A中所示的相對移動特性資料H[1]至H[P]之各元素值,係分別作為一對應行/列上的各個狹域移動向量V(i,j,k)之絕對值與相對移動向量Δ(i,j,k)的絕對值是否夠大的象徵。以下繼續以範例仔細說明獲得相對移動特性資料H[0]~H[P]之詳細計算方式。In the above embodiment, the respective element values of the relative movement characteristic data H[1] to H[P] shown in FIG. 6A are respectively used as the respective narrow-area movement vectors V (i, j) on a corresponding row/column. whether k) the absolute value of the relative motion vectors Δ (i, j, k) sufficiently large absolute value symbol. The following is a detailed description of the detailed calculation of the relative movement characteristics data H[0] to H[P].

關於獲得相對移動特性資料H[0]~H[P]之過程,在本發明一實施例中,在邏輯電路220獲得各畫面的相對移動特性資料H[0]~H[P]的過程中,邏輯電路220會先判斷各狹域移動向量V(i,j,k)的絕對值是否大於第一臨界值,並判斷各相對移動向量Δ(i,j,k)的絕對值是否大於第二臨界值,之後再依據上述兩種判斷結果以獲得各畫面的相對移動特性資料H[0]~H[P]。Regarding the process of obtaining the relative mobility characteristic data H[0] to H[P], in an embodiment of the present invention, the logic circuit 220 obtains the relative movement characteristic data H[0] to H[P] of each picture. The logic circuit 220 first determines whether the absolute value of each narrow-field motion vector V (i, j, k) is greater than the first critical value, and determines whether the absolute value of each relative motion vector Δ (i, j, k) is greater than The second critical value is then obtained based on the above two judgment results to obtain the relative movement characteristic data H[0] to H[P] of each picture.

而關於依據上述兩種判斷結果以獲得各畫面的相對移動特性資料H[0]~H[P]的過程,在本發明一實施例中,邏輯電路220會先計算出各畫面中與狹域單元410相對應之多個比較結果值A(i,j,k),此比較結果值係代表上述兩種判斷結果,繼而邏輯電路220再將這些比較結果值A(i,j,k)沿一行/列映射方向映射以產生映射移動向量CX[0]或CY[0],並使用此映射移動向量CX[0]或CY[0]來代表上述的相對移動特性資料H[0]~H[P]。With regard to the process of obtaining the relative movement characteristic data H[0] to H[P] of each picture based on the above two kinds of judgment results, in an embodiment of the present invention, the logic circuit 220 first calculates the narrow field in each picture. The unit 410 corresponds to a plurality of comparison result values A (i, j, k) , and the comparison result value represents the above two determination results, and then the logic circuit 220 further follows the comparison result values A (i, j, k). A row/column map direction map is generated to generate a map motion vector C X [0] or C Y [0], and this map is used to move the vector C X [0] or C Y [0] to represent the relative motion characteristic data H above [ 0]~H[P].

請參考圖7A,圖7A繪示了畫面M0中各狹域單元410所對應的比較結果值A(i,j,k),以說明比較結果值A(i,j,k)與映射移動向量CX[0]或CY[0]之產生過程。為方便說明,在時間點Ti的畫面Mi中第j列第k行之狹域單元410所對應的比較結果值以A(i,j,k)表示之,其中0≦i,1≦j≦M,1≦k≦N。以圖7A為例,邏輯電路220所計算出的畫面M0中與多個狹域單元410相對應之多個比較結果值分別以A(0,1,1)~A(0,M,N)表示。Please refer to FIG. 7A. FIG. 7A illustrates a comparison result value A (i, j, k) corresponding to each narrow-area unit 410 in the picture M0 to describe the comparison result value A (i, j, k) and the mapping motion vector. The process of generating C X [0] or C Y [0]. For convenience of explanation, the comparison result value corresponding to the narrow-area unit 410 of the jth column and the k-th row in the picture Mi of the time point T i is represented by A (i, j, k) , where 0 ≦ i, 1 ≦ j ≦M,1≦k≦N. Taking FIG. 7A as an example, the plurality of comparison result values corresponding to the plurality of narrow-area units 410 in the picture M0 calculated by the logic circuit 220 are respectively A (0, 1, 1 ) to A (0, M, N). Said.

在本發明一實施例中,各比較結果值係依據下述之方程式(2)取得:In an embodiment of the invention, the comparison result values are obtained according to the following equation (2):

其中,Th1為上述的第一臨界值,而Th2為上述的第二臨界值。換言之,倘若|V(i,j,k)|大於第一臨界值Th1且|Δ(i,j,k)|大於第二臨界值Th2,則設定比較結果值A(i,j,k)等於1。相對地,倘若|V(i,j,k)|不大於第一臨界值Th1或|Δ(i,j,k)|不大於第二臨界值Th2,則設定比較結果值A(i,j,k)等於0。因此,只有|V(i,j,k)|與|Δ(i,j,k)|分別夠大時,才能夠設定比較結果值A(i,j,k)等於1,於其餘情況下,比較結果值A(i,j,k)皆設定為等於0。Wherein Th1 is the first critical value described above, and Th2 is the second critical value described above. In other words, if |V (i,j,k) | is greater than the first threshold Th1 and |Δ (i,j,k) | is greater than the second threshold Th2, the comparison result value A (i,j,k) is set. Equal to 1. In contrast, if |V (i,j,k) | is not greater than the first threshold Th1 or |Δ (i,j,k) | is not greater than the second threshold Th2, the comparison result value A (i,j is set) , k) is equal to 0. Therefore, only |V (i,j,k) | and |Δ (i,j,k) | are large enough to set the comparison result value A (i,j,k) equal to 1, in the remaining cases. The comparison result value A (i, j, k) is set equal to zero.

在獲得結果值A(i,j,k)後,繼而邏輯電路220會將上述的比較結果值沿一行/列映射方向映射以產生映射移動向量CX[0]或CY[0],而此映射移動向量CX[0]或CY[0]即可代表相對移動特性資料。在此所謂的行/列映射方向例如是水平方向X或垂直方向Y,其中水平方向X與垂直方向Y相互垂直。以圖7A為例,邏輯電路220可將畫面M0中的比較結果值A(0,1,1)~A(0,M,N)沿水平方向X映射,以產生映射移動向量CX[0]。或者,邏輯電路220可將畫面M0中的比較結果值A(0,1,1)~A(0,M,N)沿垂直方向Y映射,以產生映射移動向量CY[0]。如圖7A所示,映射移動向量CX[0]可具有多個元素值C[1]~C[M],而映射移動向量CY[0]可具有多個元素值C[M+1]~C[M+N]。每一元素值C[1]~C[M+N]對應於一列狹域單元410或一行狹域單元410。After obtaining the result value A (i, j, k) , the logic circuit 220 then maps the above comparison result values along the row/column mapping direction to generate a mapping motion vector C X [0] or C Y [0], and This mapping movement vector C X [0] or C Y [0] represents the relative movement characteristics data. The so-called row/column mapping direction here is, for example, a horizontal direction X or a vertical direction Y in which the horizontal direction X and the vertical direction Y are perpendicular to each other. Taking FIG. 7A as an example, the logic circuit 220 may map the comparison result values A (0, 1, 1 ) to A (0, M, N) in the picture M0 in the horizontal direction X to generate a mapping motion vector C X [0]. ]. Alternatively, the logic circuit 220 may map the comparison result values A ( 0, 1, 1 ) to A (0, M, N) in the picture M0 in the vertical direction Y to generate a mapping motion vector C Y [0]. As shown in FIG. 7A, the mapping motion vector C X [0] may have a plurality of element values C[1] to C[M], and the mapping motion vector C Y [0] may have a plurality of element values C[M+1 ]~C[M+N]. Each element value C[1]~C[M+N] corresponds to a list of narrow domain units 410 or a row of narrow domain units 410.

在一實施例中,在邏輯電路220將上述的比較結果值沿行/列映射方向映射以產生映射移動向量的過程中,邏輯電路220會將上述的比較結果值沿行/列映射方向計數,以產生多個分別對應於不同行/列的計數值,繼而再將上述的計數值分別與第三臨界值Th3比較,以依據上述計數值與第三臨界值Th3的比較結果來產生映射移動向量之多個元素值。In an embodiment, in the process that the logic circuit 220 maps the comparison result value in the row/column mapping direction to generate the mapping motion vector, the logic circuit 220 counts the comparison result value in the row/column mapping direction. To generate a plurality of count values respectively corresponding to different rows/columns, and then compare the above-mentioned count values with the third threshold value Th3, respectively, to generate a map motion vector according to the comparison result of the count value and the third threshold value Th3. Multiple element values.

以圖7A所示之畫面M0為例,倘若上述的行/列映射方向為垂直方向Y,亦即Q等於M,邏輯電路220會將比較結果值A(0,1,1)~A(0,M,N)沿垂直方向Y計數以產生多個分別對應於不同列的計數值S[1]~S[M],並將上述的計數值S[1]~S[M]分別與第三臨界值Th3比較,以依據上述計數值S[1]~S[M]與第三臨界值Th3的比較結果來產生映射移動向量CX[0]之多個元素值C[1]~C[M]。其中計數值S[1]~S[M]係依據下述之方程式(3)取得,而元素值C[1]~C[M]係依據下述之方程式(4)取得:Taking the picture M0 shown in FIG. 7A as an example, if the above-mentioned row/column mapping direction is the vertical direction Y, that is, Q is equal to M, the logic circuit 220 compares the result value A (0, 1 , 1 ) to A (0). , M, N) are counted in the vertical direction Y to generate a plurality of count values S[1] to S[M] respectively corresponding to different columns, and the above-mentioned count values S[1] to S[M] are respectively The three threshold value Th3 is compared to generate a plurality of element values C[1]-C of the mapping motion vector C X [0] according to the comparison result of the above-mentioned count values S[1] to S[M] and the third threshold value Th3. [M]. The count values S[1] to S[M] are obtained according to the following equation (3), and the element values C[1] to C[M] are obtained according to the following equation (4):

其中,圖7A中的映射移動向量CX[0]即為圖6A中相對移動特性資料H[0],元素值C[1]~C[M]即為相對移動特性資料H[0]之元素值H[0,1]~H[0,Q]。The mapping motion vector C X [0] in FIG. 7A is the relative motion characteristic data H[0] in FIG. 6A, and the element values C[1] to C[M] are relative motion characteristic data H[0]. Element values H[0,1]~H[0,Q].

相似地,倘若上述的行/列映射方向為水平方向X,亦即Q等於N,邏輯電路220會將比較結果值A(0,1,1)~A(0,M,N)沿水平方向X計數以產生多個分別對應於不同行的計數值S[M+1]~S[M+N],並將上述的計數值S[M+1]~S[M+N]分別與第三臨界值Th3比較,以依據上述計數值S[M+1]~S[M+N]與第三臨界值Th3的比較結果來產生映射移動向量之多個元素值C[M+1]~C[M+N]。其中計數值S[M+1]~S[M+N]係依據下述之方程式(5)取得,而元素值C[M+1]~C[M+N]係依據下述之方程式(6)取得:Similarly, if the row/column mapping direction is the horizontal direction X, that is, Q is equal to N, the logic circuit 220 will compare the comparison result values A (0, 1, 1 ) to A (0, M, N) in the horizontal direction. X counts to generate a plurality of count values S[M+1] to S[M+N] respectively corresponding to different rows, and the above-mentioned count values S[M+1] to S[M+N] respectively The three threshold value Th3 is compared to generate a plurality of element values C[M+1] of the mapping motion vector according to the comparison result of the count values S[M+1] to S[M+N] and the third threshold value Th3. C[M+N]. The count values S[M+1] to S[M+N] are obtained according to the following equation (5), and the element values C[M+1] to C[M+N] are based on the following equations ( 6) Acquire:

其中,圖7A中的映射移動向量CY[0]即為圖6A中相對移動特性資料H[0],元素值C[M+1]~C[M+N]即為相對移動特性資料H[0]之元素值H[0,1]~H[0,Q]。The mapping movement vector C Y [0] in FIG. 7A is the relative movement characteristic data H[0] in FIG. 6A, and the element values C[M+1] to C[M+N] are relative movement characteristic data H. The element value [0, 1] to H [0, Q] of [0].

值得注意的是,如前所述,於計算相對移動特性資料之過程中,較佳可計算其水平分量與垂直分量。因此,在本發明一實施例中,邏輯電路220可將每一狹域移動向量[VX(i,j,k),VY(i,j,k)]的水平分量VX(i,j,k)之絕對值及垂直分量VY(i,j,k)之絕對值分別與第一臨界值Th1比較,每一相對移動向量[ΔX(i,j,k)Y(i,j,k)]的水平分量ΔX(i,j,k)之絕對值及垂直分量ΔY(i,j,k)之絕對值分別與第二臨界值Th2比較,之後邏輯電路220再依據上述比較結果以獲得各畫面的相對移動特性資料。It is worth noting that, as mentioned above, in calculating the relative motion characteristics data, it is better to calculate the horizontal component and the vertical component. Therefore, in an embodiment of the invention, the logic circuit 220 can move the horizontal component V X(i, of each narrow domain motion vector [V X(i, j, k) , V Y(i, j, k) ] . The absolute value of j, k) and the absolute value of the vertical component V Y(i, j, k) are respectively compared with the first critical value Th1, and each relative motion vector [Δ X(i, j, k) , Δ Y ( i, j, k)] of the horizontal component of Δ X (i, j, k ) and the absolute value of the vertical component of Δ Y (i, j, k ) , respectively, the absolute value is compared with a second threshold value Th2, then the logic circuit 220 According to the above comparison result, the relative movement characteristic data of each picture is obtained.

另外,邏輯電路220同樣可將代表上述判斷結果之多個沿水平方向X及垂直方向Y之比較結果值,分別沿水平方向X及垂直方向Y映射以產生水平映射移動向量及垂直映射移動向量,其分別代表相對移動特性資料之水平分量與垂直分量。請參考圖7B,圖7B繪示了圖6B中畫面M0中各狹域單元410所對應的比較結果值。其中,在時間點Ti的畫面Mi中第j列第k行之狹域單元410所對應的比較結果值以[AX(i,j,k),AY(i,j,k)]表示,0≦i,1≦j≦M,1≦k≦N,而每一比較結果值[AX(i,j,k),AY(i,j,k)]包含有水平比較結果值AX(i,j,k)及垂直比較結果值AY(i,j,k)In addition, the logic circuit 220 can also map the plurality of comparison result values in the horizontal direction X and the vertical direction Y representing the result of the determination in the horizontal direction X and the vertical direction Y to generate a horizontal mapping motion vector and a vertical mapping motion vector, respectively. They represent the horizontal and vertical components of the relative motion characteristic data, respectively. Please refer to FIG. 7B. FIG. 7B illustrates comparison result values corresponding to the narrow-area units 410 in the picture M0 in FIG. 6B. Wherein, the comparison result value corresponding to the narrow-area unit 410 of the jth column and the k-th row in the picture Mi at the time point T i is [A X(i, j, k) , A Y(i, j, k) ] Representation, 0≦i,1≦j≦M,1≦k≦N, and each comparison result value [A X(i,j,k) , A Y(i,j,k) ] contains a horizontal comparison result The value A X(i, j, k) and the vertical comparison result value A Y(i, j, k) .

與方程式(5)類似,在本發明一實施例中,各水平比較結果值AX(i,j,k)及垂直比較結果值AY(i,j,k)係依據下述之方程式(2-1)、(2-2)取得:Similar to equation (5), in one embodiment of the present invention, each horizontal comparison result value A X(i, j, k) and the vertical comparison result value A Y(i, j, k) are based on the following equation ( 2-1), (2-2) obtained:

接下來,依類似的方式,邏輯電路220可將上述畫面M0中的水平比較結果值AX(0,1,1)~AX(0,M,N)沿垂直方向Y映射以產生水平映射移動向量CX[0],且邏輯電路220可將上述畫面M0中的垂直比較結果值AY(0,1,1)~AY(0,M,N)沿水平方向X映射以產生垂直映射移動向量CY[0]。Next, in a similar manner, the logic circuit 220 may map the horizontal comparison result values A X(0,1,1) to A X(0,M,N) in the above-described picture M0 in the vertical direction Y to generate a horizontal map. The vector C X [0] is moved, and the logic circuit 220 can map the vertical comparison result values A Y(0,1,1) to A Y(0,M,N) in the above-mentioned picture M0 in the horizontal direction X to generate a vertical Map the motion vector C Y [0].

而產生水平映射向量CX[0]與垂直映射向量CY[0]之過程中,邏輯電路220同樣將水平比較結果值AX(0,1,1)~AX(0,M,N)沿垂直方向Y計數以產生多個分別對應於不同列的計數值SX[1]~SX[M],並將垂直比較結果值AY(0,1,1)~AY(0,M,N)沿水平方向X計數以產生多個分別對應於不同行的計數值SY[1]~SY[N]。接下來,邏輯電路220可套用下述之方程式產生水平映射移動向量CX[0]之多個元素值CX[1]~CX[M]以及垂直映射移動向量CY[0]之多個元素值CY[1]~CY[N]。其中計數值SX[1]~SX[M]及SY[1]~SY[N]係依據下述之方程式(3-1)、(5-1)取得,而元素值CX[1]~CX[M]及CY[1]~CY[N]係依據下述之方程式(4-1)、(6-1)取得:In the process of generating the horizontal map vector C X [0] and the vertical map vector C Y [0], the logic circuit 220 also horizontally compares the result values A X(0,1,1) to A X(0,M,N ) Y count in the vertical direction to generate a plurality of columns corresponding to different count values S X [1] ~ S X [M], and the vertical comparison value a Y (0,1,1) ~ a Y (0 , M, N) are counted in the horizontal direction X to generate a plurality of count values S Y [1] to S Y [N] respectively corresponding to different rows. Next, the logic circuit 220 may apply the following equations to generate the horizontal motion vector map C X [0] of the plurality of element values C X [1] ~ C X [M] , and a vertical motion vector map C Y [0] as much as The element values C Y [1] ~ C Y [N]. The count values S X [1] to S X [M] and S Y [1] to S Y [N] are obtained according to the following equations (3-1) and (5-1), and the element value C X [1] to C X [M] and C Y [1] to C Y [N] are obtained according to the following equations (4-1) and (6-1):

另外,亦值得注意的是,相對移動特性資料H[0]~H[Q](不論是Hx[0]~H[M]或Hx[0]~H[N])之各元素值,係分別作為某一對應行/列上的各個狹域移動向量V(i,j,k)之絕對值與相對移動向量Δ(i,j,k)的絕對值是否夠大的象徵。因此,於其他實施例中,可以種種不同方式計算相對移動特性資料H[1]~H[Q],並不限定上述特定實施例之方式。In addition, it is also worth noting that the relative movement characteristics of the data H[0]~H[Q] (whether Hx[0]~H[M] or Hx[0]~H[N]) are the values of the elements. It is a symbol respectively whether the absolute value of each narrow-field motion vector V (i, j, k) on a corresponding row/column and the absolute value of the relative motion vector Δ (i, j, k) are sufficiently large. Therefore, in other embodiments, the relative movement characteristic data H[1]~H[Q] can be calculated in various ways, and the manner of the above specific embodiment is not limited.

請再參考圖2C與圖6A。當邏輯電路220獲得各畫面的相對移動特性資料H[0]~H[P]之後,邏輯電路220會進行步驟S212,以將(P+1)個畫面之相對移動特性資料H[0]~H[P]累積計算,以獲得第一累積相對移動特性資料OR1。Please refer to FIG. 2C and FIG. 6A again. After the logic circuit 220 obtains the relative movement characteristic data H[0] to H[P] of each picture, the logic circuit 220 proceeds to step S212 to compare the relative movement characteristic data H[0] of the (P+1) pictures. H[P] is cumulatively calculated to obtain a first cumulative relative movement characteristic data OR1.

在一實施例中,邏輯電路220會將(P+1)個畫面中對應於同一行/列的元素值進行或(OR)運算,以獲得上述的第一累積相對移動特性資料OR1。數學上來說,第一累積相對移動特性資料OR1具有多個元素值O[1]~O[Q],每一元素值O[1]~O[Q]係相對移動特性資料H[0]~H[P]中對應於同一行/列的元素值進行或運算而獲得的。詳言之,元素值O[1]~O[Q]係依據下述之方程式(7)取得:In an embodiment, the logic circuit 220 performs an OR operation on the element values corresponding to the same row/column in the (P+1) pictures to obtain the first cumulative relative movement characteristic data OR1 described above. Mathematically, the first cumulative relative movement characteristic data OR1 has a plurality of element values O[1] to O[Q], and each element value O[1] to O[Q] is a relative movement characteristic data H[0]~ The value of the element value corresponding to the same row/column in H[P] is ORed. In detail, the element values O[1] to O[Q] are obtained according to the following equation (7):

其中,1≦q≦Q。Among them, 1≦q≦Q.

請再參考圖6B。當邏輯電路220獲得各畫面的相對移動特性資料的水平分量HX[0]~HX[P]及垂直分量HY[0]~HY[P]之後,邏輯電路220會將各畫面之相對移動特性資料累積計算,以獲得第一累積相對移動特性資料(OR1X、OR1Y),其中OR1X代表第一累積相對移動特性資料的水平分量,OR1Y代表第一累積相對移動特性資料的垂直分量。換言之,邏輯電路220會將(P+1)個畫面之相對移動特性資料的水平分量HX[0]~HX[P]及垂直分量HY[0]~HY[P]累積計算,以獲得第一累積相對移動特性資料(OR1X、OR1Y)。Please refer to FIG. 6B again. After the logic circuit 220 obtains the horizontal components H X [0] to H X [P] and the vertical components H Y [0] to H Y [P] of the relative movement characteristic data of each picture, the logic circuit 220 will display each picture. The relative movement characteristic data is cumulatively calculated to obtain a first cumulative relative movement characteristic data (OR1 X , OR1 Y ), wherein OR1 X represents a horizontal component of the first cumulative relative movement characteristic data, and OR1 Y represents a first cumulative relative movement characteristic data. Vertical component. In other words, the logic circuit 220 cumulatively calculates the horizontal components H X [0] to H X [P] and the vertical components H Y [0] to H Y [P] of the relative movement characteristic data of the (P+1) pictures. Obtain the first cumulative relative movement characteristic data (OR1 X , OR1 Y ).

值得注意的是,如圖6B所示,第一累積相對移動特性資料同樣可沿垂直方向與水平方向分別計算。更進一步地說,第一累積相對移動特性資料(OR1X、OR1Y)具有多個元素值OX[1]~OX[M]、OY[1]~OY[N],其譬如可依據下述之方程式(7-1)、(7-2)取得:It should be noted that, as shown in FIG. 6B, the first cumulative relative movement characteristic data can also be calculated separately in the vertical direction and the horizontal direction. Furthermore, the first cumulative relative movement characteristic data (OR1 X , OR1 Y ) has a plurality of element values O X [1] to O X [M], O Y [1] to O Y [N], such as It can be obtained according to the following equations (7-1) and (7-2):

OX[j]=HX[0,j]∨HX[1,j]∨HX[2,j]∨...HX[P,j] (7-1)O X [j]=H X [0,j]∨H X [1,j]∨H X [2,j]∨...H X [P,j] (7-1)

OY[k]=HY[0,k]∨HY[1,k]∨HY[2,k]∨...HY[P,k] (7-2)O Y [k]=H Y [0,k]∨H Y [1,k]∨H Y [2,k]∨...H Y [P,k] (7-2)

其中,1≦j≦M,1≦k≦N。Among them, 1≦j≦M,1≦k≦N.

另外,亦值得注意的是,第一累積相對移動特性資料OR1或(OR1X、OR1Y)係用以判斷幾個連續畫面中狹域向量與廣域向量間之間的整體差異程度。當幾個畫面中狹域向量與廣域向量間之間的差異程度整體較高時,表示在畫面中可能有一定大小的移動物體。因此,於其他實施例中,可以依據其他方式計算相對移動特性資料OR1來代表這種差異,並不侷限於此實施例所例示之特定方式。In addition, it is also worth noting that the first cumulative relative movement characteristic data OR1 or (OR1 X , OR1 Y ) is used to determine the degree of overall difference between the narrow-domain vector and the wide-area vector in several consecutive pictures. When the degree of difference between the narrow-domain vector and the wide-area vector is high overall in several pictures, it means that there may be a certain size of moving object in the picture. Therefore, in other embodiments, the relative movement characteristic data OR1 may be calculated according to other manners to represent such a difference, and is not limited to the specific manner exemplified in this embodiment.

接下來,係說明圖2C中之步驟S213。除了獲得第一累積相對移動特性資料OR1之外,邏輯電路220還會將最近畫面M0排除,而將上述多個畫面當中其餘畫面之相對移動特性資料H[1]~H[P]累積計算,以獲得第二累積相對移動特性資料OR2,如圖6A所示。在本發明一實施例中,第二累積相對移動特性資料OR2包括多個對應於不同行/列的元素值U[1]~U[Q]。與第一累積相對移動特性資料OR1類似,每一元素值U[1]~U[Q]係邏輯電路220將上述的其餘畫面之相對移動特性資料H[1]~H[P]中對應於同一行/列的元素值進行或運算而取得。詳言之,元素值U[1]~U[Q]係依據下述之方程式(8)取得:Next, step S213 in Fig. 2C will be explained. In addition to obtaining the first cumulative relative movement characteristic data OR1, the logic circuit 220 also excludes the most recent picture M0, and accumulates the relative movement characteristic data H[1] to H[P] of the remaining pictures among the plurality of pictures. A second cumulative relative movement characteristic data OR2 is obtained, as shown in FIG. 6A. In an embodiment of the invention, the second cumulative relative movement characteristic data OR2 includes a plurality of element values U[1] to U[Q] corresponding to different rows/columns. Similar to the first cumulative relative movement characteristic data OR1, each element value U[1] to U[Q] is a logic circuit 220 corresponding to the relative movement characteristic data H[1] to H[P] of the remaining pictures described above. The element values of the same row/column are obtained by OR operation. In detail, the element values U[1] to U[Q] are obtained according to the following equation (8):

U[q]=H[1,q]∨H[2,q]∨H[3,q]∨...H[P,q] (8)U[q]=H[1,q]∨H[2,q]∨H[3,q]∨...H[P,q] (8)

其中,1≦q≦Q。Among them, 1≦q≦Q.

值得注意的是,如圖6B所示,邏輯電路220同樣可沿兩方向計算第二累積相對移動特性資料(OR2X、OR2Y),其中OR2X代表第二累積相對移動特性資料的水平分量,OR2Y代表第二累積相對移動特性資料的垂直分量。在本發明一實施例中,第二累積相對移動特性資料(OR2X、OR2Y)包括多個對應於不同行/列的元素值UX[1]~UX[M]、UY[1]~UY[N],其可依據下述之方程式(8-1)、(8-2)取得:It should be noted that, as shown in FIG. 6B, the logic circuit 220 can also calculate the second cumulative relative movement characteristic data (OR2 X , OR2 Y ) in two directions, wherein OR2 X represents the horizontal component of the second cumulative relative movement characteristic data. OR2 Y represents the vertical component of the second cumulative relative motion characteristic data. In an embodiment of the invention, the second cumulative relative movement characteristic data (OR2 X , OR2 Y ) includes a plurality of element values U X [1] to U X [M], U Y [1] corresponding to different rows/columns ]~U Y [N], which can be obtained according to the following equations (8-1), (8-2):

UX[j]=HX[1,j]∨HX[2,j]∨HX[3,j]∨...HX[P,j] (8-1)U X [j]=H X [1,j]∨H X [2,j]∨H X [3,j]∨...H X [P,j] (8-1)

UY[k]=HY[1,k]∨HY[2,k]∨HY[3,k]∨...HY[P,k] (8-2)U Y [k]=H Y [1,k]∨H Y [2,k]∨H Y [3,k]∨...H Y [P,k] (8-2)

其中,1≦j≦M,1≦k≦N。Among them, 1≦j≦M,1≦k≦N.

接下來,係說明圖2C中之步驟S214。邏輯電路220會比較最近畫面M0的相對移動特性資料H[0]與第二累積相對移動特性資料OR2,以獲得比較相對移動特性資料AND1(如圖6A所示)。在進行此比較之過程中,舉例而言,可將最近畫面M0之相對移動特性資料H[0]與第二累積相對移動特性資料OR2之相反資料(元素值1變為0,而0變為1)進行及(AND)運算,以獲得比較相對移動特性資料AND1。Next, step S214 in Fig. 2C will be explained. The logic circuit 220 compares the relative movement characteristic data H[0] of the most recent picture M0 with the second cumulative relative movement characteristic data OR2 to obtain a comparison relative movement characteristic data AND1 (as shown in FIG. 6A). In the course of performing this comparison, for example, the opposite data of the relative movement characteristic data H[0] of the latest picture M0 and the second cumulative relative movement characteristic data OR2 (the element value 1 becomes 0, and 0 becomes 1) Perform an AND operation to obtain a comparison relative movement characteristic data AND1.

更仔細言之,最近畫面之相對移動特性資料H[0]的元素值H[0,1]~H[0,Q]係與第二累積相對移動特性資料OR2中對應於同一行/列的相反元素值進行及運算,以獲得比較相對移動特性資料AND1。因此,比較相對移動特性資料AND1包含有多個元素值A[1]~A[Q],而元素值A[1]~A[Q]係依據下述之方程式(9)取得:More specifically, the element values H[0, 1] to H[0, Q] of the relative movement characteristic data H[0] of the recent picture correspond to the same row/column of the second cumulative relative movement characteristic data OR2. Opposite element value to Perform and operate to obtain the comparison relative movement characteristic data AND1. Therefore, the comparative relative movement characteristic data AND1 includes a plurality of element values A[1] to A[Q], and the element values A[1] to A[Q] are obtained according to the following equation (9):

其中,1≦q≦Q。Among them, 1≦q≦Q.

值得注意的是,如圖6B所示,邏輯電路220會比較最近畫面M0的相對移動特性資料(HX[0]、HY[0])與第二累積相對移動特性資料(OR2X、OR2Y)以獲得比較相對移動特性資料(AND1X、AND1Y),其中AND1X為比較相對移動特性資料的水平分量,AND1Y為比較相對移動特性資料的垂直分量。而類似地,比較相對移動特性資料(AND1X、AND1Y)包含有多個元素值AX[1]~AX[M]、AY[1]~AY[N],分別可依據下述之方程式(9-1)、(9-2)取得:It should be noted that, as shown in FIG. 6B, the logic circuit 220 compares the relative movement characteristic data (H X [0], H Y [0]) and the second cumulative relative movement characteristic data (OR2 X , OR2) of the latest picture M0. Y ) to obtain comparative relative motion characteristic data (AND1 X , AND1 Y ), where AND1 X is the horizontal component of the comparative relative motion characteristic data, and AND1 Y is the vertical component of the comparative relative motion characteristic data. Similarly, the comparative relative movement characteristic data (AND1 X , AND1 Y ) contains a plurality of element values A X [1] to A X [M], A Y [1] to A Y [N], respectively The equations (9-1) and (9-2) are obtained:

其中,1≦j≦M,1≦k≦N。Among them, 1≦j≦M,1≦k≦N.

另外,亦須值得注意的是,比較相對移動特性資料AND1係用以判斷最近畫面M0與其餘的先前畫面之間的差異程度。當差異程度越大時,表示畫面中的移動物體在一定時間內有一定的空間位移。因此,於其他實施例中,可以依據其他方式計算相對移動特性資料AND1來代表這種差異,並不侷限於此實施例所例示之特定方式。In addition, it should be noted that the comparative relative movement characteristic data AND1 is used to determine the degree of difference between the most recent picture M0 and the remaining previous pictures. When the degree of difference is larger, it means that the moving object in the picture has a certain spatial displacement within a certain time. Therefore, in other embodiments, the relative movement characteristic data AND1 may be calculated according to other manners to represent such a difference, and is not limited to the specific manner exemplified in this embodiment.

最後,即可進行圖2C中之步驟S215與S216,其中邏輯電路220即可依據第一累積相對移動特性資料OR1或(OR1X、OR1Y)與比較相對移動特性資料AND1或(AND1X、AND1Y)來計算出一增益值G,並依據所計算出的增益值G來調整最近畫面M0中與狹域單元410相對應之原始運動景深。Finally, steps S215 and S216 in FIG. 2C can be performed, wherein the logic circuit 220 can calculate according to the first cumulative relative movement characteristic data OR1 or (OR1X, OR1Y) and the comparative relative movement characteristic data AND1 or (AND1X, AND1Y). A gain value G is obtained, and the original motion depth of field corresponding to the narrow-area unit 410 in the most recent picture M0 is adjusted according to the calculated gain value G.

請參考圖8,圖8繪示畫面M0中各狹域單元410所對應的原始運動景深。為方便說明,在時間點Ti的畫面Mi中第j列第k行之狹域單元410所對應的原始運動景深以D(i,j,k)表示之,其中0≦i,1≦j≦M,1≦k≦N。如圖8所示,邏輯電路220所計算出的畫面M0中各狹域單元410所對應的原始運動景深分別以D(0,1,1)~D(0,M,N)表示。在此假設邏輯電路220所計算出的增益值為G,則在時間點Ti的畫面Mi中第j列第k行之狹域單元410所對應的經調整後的運動景深等於(D(i,j,k)×G)。Please refer to FIG. 8. FIG. 8 illustrates the original motion depth of field corresponding to each of the narrow-area units 410 in the picture M0. For convenience of explanation, the original motion depth field corresponding to the narrow field unit 410 of the jth column and the kth line in the picture Mi at the time point T i is represented by D (i, j, k) , where 0 ≦ i, 1 ≦ j ≦M,1≦k≦N. As shown in FIG. 8 , the original motion depths corresponding to the narrow-area units 410 in the picture M0 calculated by the logic circuit 220 are represented by D (0, 1, 1 ) to D (0, M, N) , respectively. It is assumed here that the gain value calculated by the logic circuit 220 is G, and the adjusted motion depth corresponding to the narrow-area unit 410 of the jth column of the j-th row in the picture Mi at the time point T i is equal to (D (i) , j, k) × G).

關於計算增益值G之過程(步驟S215),於一較佳實施例中,邏輯電路220可依據第一累積相對移動特性資料OR1,取得一第一增益值Gain1,以及依據比較相對移動特性資料AND1,取得一第二增益值Gain2。而較佳地,第一增益值Gain1與該第二增益值Gain2當中每一者可分別依第一與第二方向(譬如為行方向或列方向)計算。接下來,邏輯電路即可依據第一增益值Gain1及第二增益值Gain2計算出該增益值。以下將分別詳細說明上述過程Regarding the process of calculating the gain value G (step S215), in a preferred embodiment, the logic circuit 220 can obtain a first gain value Gain1 according to the first cumulative relative movement characteristic data OR1, and according to the comparison relative movement characteristic data AND1 , obtaining a second gain value Gain2. Preferably, each of the first gain value Gain1 and the second gain value Gain2 can be calculated according to the first and second directions (for example, the row direction or the column direction). Next, the logic circuit can calculate the gain value according to the first gain value Gain1 and the second gain value Gain2. The above process will be described in detail below.

在本發明一實施例中,邏輯電路220會加總第一累積相對移動特性資料OR1的多個元素值O[1]~O[Q],以取得第一加總值Or_C。其中,第一加總值Or_C係依據下述之方程式(10)取得:In an embodiment of the invention, the logic circuit 220 adds a plurality of element values O[1] to O[Q] of the first cumulative relative movement characteristic data OR1 to obtain a first total value Or_C. Wherein, the first total value Or_C is obtained according to the following equation (10):

之後,邏輯電路220再依據第一加總值Or_C,取得第一增益值Gain1。在本發明一實施例中,邏輯電路220會依據第一加總值Or_C自第一增益曲線C1中獲得第一增益值Gain1。Thereafter, the logic circuit 220 obtains the first gain value Gain1 according to the first total value Or_C. In an embodiment of the invention, the logic circuit 220 obtains the first gain value Gain1 from the first gain curve C1 according to the first summed value Or_C.

如圖9所示,其顯示依據一實施例之第一增益曲線C1。如圖9所示,第一增益曲線C1為一漸增曲線,因此越大的第一加總值Or_C所對應的第一增益值Gain1越大。須瞭解的,第一加總值Or_C(或第一累積相對移動特性資料OR1)可用以判斷幾個連續畫面中狹域向量與廣域向量間之間的整體差異程度。當幾個畫面中狹域向量與廣域向量間之間的差異程度整體較高時,表示在畫面中可能有一定大小的移動物體,同時所計算出的第一加總值Or_C相對地會越大。As shown in Figure 9, it shows a first gain curve C1 in accordance with an embodiment. As shown in FIG. 9, the first gain curve C1 is an increasing curve, so the larger the first gain value Ga_1 corresponding to the first total value Or_C is larger. It should be understood that the first total value Or_C (or the first cumulative relative movement characteristic data OR1) can be used to determine the degree of overall difference between the narrow-domain vector and the wide-area vector in several consecutive pictures. When the degree of difference between the narrow-domain vector and the wide-area vector is higher in several pictures, it means that there may be a certain size of the moving object in the picture, and the calculated first total value Or_C is relatively Big.

類似地,在獲得第二增益值Gain1之過程中,邏輯電路220會先加總比較相對移動特性資料AND1的多個元素值A[1]~A[Q],以取得第二加總值And_C。其中,第二加總值And_C係依據下述之方程式(11)取得:Similarly, in the process of obtaining the second gain value Gain1, the logic circuit 220 first adds a plurality of element values A[1] to A[Q] of the relative movement characteristic data AND1 to obtain the second total value And_C. . Wherein, the second total value And_C is obtained according to the following equation (11):

接下來,邏輯電路220即可依據第二加總值And_C,取得第二增益值Gain2。在本發明一實施例中,邏輯電路220會依據第二加總值And_C自第二增益曲線C2中獲得第二增益值Gain2。Next, the logic circuit 220 can obtain the second gain value Gain2 according to the second summed value And_C. In an embodiment of the invention, the logic circuit 220 obtains the second gain value Gain2 from the second gain curve C2 according to the second summed value And_C.

第10圖為依據一實施例之第二增益曲線C2。如圖所示,第二增益曲線C2為漸減曲線,因此越大的第二加總值And_C所對應的第二增益值Gain2越小。第二加總值And_C(或比較相對移動特性資料AND1)可用以判斷最近畫面M0與其餘的先前畫面之間的差異程度。當最近畫面M0與其餘的先前畫面之間的差異程度越大,進而表示畫面中的移動物體可能在一定時間內有一定的空間位移,同時所計算出的第二加總值And_C會越大。Figure 10 is a second gain curve C2 in accordance with an embodiment. As shown in the figure, the second gain curve C2 is a decreasing curve, so the second second gain value Gain2 corresponding to the larger second total value And_C is smaller. The second summed value And_C (or the comparison relative movement characteristic data AND1) can be used to determine the degree of difference between the most recent picture M0 and the remaining previous pictures. When the difference between the recent picture M0 and the rest of the previous pictures is greater, it indicates that the moving object in the picture may have a certain spatial displacement within a certain time, and the calculated second total value And_C will be larger.

因此,倘若在畫面中的移動物體為視窗移動物件(windowed-moving object),則其所計算出來的第一加總值Or_C會偏大,且第二加總值And_C會偏小,進而可得到偏小的增益值G。如此一來,當畫面中的移動物體為視窗移動物件時,依據偏小的增益值G來調整後的運動景深會較小,進而可避免或改善景深倒置的現象。Therefore, if the moving object in the picture is a windowed-moving object, the calculated first total value Or_C will be too large, and the second total value And_C will be too small, thereby obtaining A small gain value G. In this way, when the moving object in the picture is a window moving object, the adjusted depth of field according to the small gain value G is small, thereby avoiding or improving the phenomenon of depth of field inversion.

相對地,倘若在畫面中的移動物體並非視窗移動物件,則其所計算出來的第一加總值Or_C及第二加總值And_C皆偏大,而得到偏大的增益值G。如此一來,當畫面中的移動物體並非視窗移動物件時,因偏大的增益值G,調整後的運動景深會較大,而使用者會觀看到正常景深的影像。In contrast, if the moving object in the picture is not a window moving object, the calculated first total value Or_C and the second total value And_C are both larger, and a larger gain value G is obtained. In this way, when the moving object in the picture is not the moving object of the window, the adjusted depth of field will be larger due to the larger gain value G, and the user will see the image with normal depth of field.

接下來,邏輯電路220可依據第一增益值Gain1及第二增益值Gain2計算出上述的增益值G。在本發明一實施例中,增益值G係依據下述之方程式(12)取得:Next, the logic circuit 220 may calculate the gain value G according to the first gain value Gain1 and the second gain value Gain2. In an embodiment of the invention, the gain value G is obtained according to the following equation (12):

G=1-Gain1×Gain2 (12)G=1-Gain1×Gain2 (12)

其中因0≦Gain1≦1且0≦Gain2≦1,故0≦G≦1。Among them, 0≦Gain1≦1 and 0≦Gain2≦1, so 0≦G≦1.

值得注意的是,較佳地,第一加總值、第二加總值、第一增益值與第二增益值同樣可沿兩方向計算。在本發明一實施例中,邏輯電路220會加總第一累積相對移動特性資料(OR1X、OR1Y)的中水平分量的多個元素值OX[1]~OX[M],以取得第一加總值之水平分量Or_CX,並加總垂直分量的多個元素值OY[1]~OY[N],以取得第一加總值之垂直分量Or_CY。其中,第一加總值之水平分量Or_CX及垂直分量Or_CY分別可依據下述之方程式(10-1)、(10-2)取得:It should be noted that, preferably, the first total value, the second total value, the first gain value and the second gain value are equally calculated in two directions. In an embodiment of the invention, the logic circuit 220 adds a plurality of element values O X [1] to O X [M] of the middle horizontal component of the first cumulative relative movement characteristic data (OR1 X , OR1 Y ) to A horizontal component Or_C X of the first summed value is obtained, and a plurality of element values O Y [1] to O Y [N] of the vertical component are added to obtain a vertical component Or_C Y of the first summed value. Wherein, the horizontal component Or_C X and the vertical component Or_C Y of the first total value are respectively obtained according to the following equations (10-1) and (10-2):

之後,邏輯電路220可再依據第一加總值之水平分量Or_CX取得第一增益值之水平分量Gain1X,並依據第一加總值之垂直分量Or_CY取得第一增益值之垂直分量Gain1Y。其中,越大的第一加總值之水平分量Or_CX所對應的第一增益值之水平分量Gain1X越大,而越大的第一加總值之垂直分量Or_CY所對應的第一增益值之垂直分量Gain1Y越大。於一較佳實施例中,第一增益值之水平分量Gain1X及垂直分量Gain1Y的取得方式可藉由圖9的第一增益曲線C1取得。在取得第一增益值之水平分量Gain1X的過程中,邏輯電路220將圖9的橫軸及縱軸分別視為第一加總值之水平分量Or_CX及第一增益值之水平分量Gain1X,再依據第一加總值之水平分量Or_CX在第一增益曲線C1中取得對應的第一增益值之水平分量Gain1X。相似地,在取得第一增益值之垂直分量Gain1Y過程中,邏輯電路220將圖9的橫軸及縱軸分別視為第一加總值之垂直分量Or_CY及第一增益值之垂直分量Gain1Y,再依據第一加總值之垂直分量Or_CY從第一增益曲線C1中取得對應的第一增益值之垂直分量Gain1YAfterwards, the logic circuit 220 may further obtain the horizontal component Gain1 X of the first gain value according to the horizontal component Or_C X of the first summed value, and obtain the vertical component Gain1 of the first gain value according to the vertical component Or_C Y of the first summed value. Y. Wherein the first gain, the greater the level of the first sum value of the corresponding component Or_C X values of the horizontal component of the first gain Gain1 X, the greater the vertical component sum value of the first Or_C Y corresponding The vertical component Gain1 Y of the value is larger. In a preferred embodiment, the manner in which the horizontal component Gain1 X and the vertical component Gain1 Y of the first gain value are obtained can be obtained by the first gain curve C1 of FIG. In the process of obtaining the horizontal component Gain1 X of the first gain value, the logic circuit 220 regards the horizontal axis and the vertical axis of FIG. 9 as the horizontal component Or_C X of the first summed value and the horizontal component Gain1 X of the first gain value, respectively. And obtaining, according to the horizontal component Or_C X of the first total value, the horizontal component Gain1 X of the corresponding first gain value in the first gain curve C1. Similarly, in the process of obtaining the vertical component Gain1 Y of the first gain value, the logic circuit 220 regards the horizontal axis and the vertical axis of FIG. 9 as the vertical component Or_C Y of the first summed value and the vertical component of the first gain value, respectively. Gain1 Y , and then obtain the vertical component Gain1 Y of the corresponding first gain value from the first gain curve C1 according to the vertical component Or_C Y of the first summed value.

類似地,邏輯電路220會加總比較相對移動特性資料(AND1X、AND1Y)的水平分量的多個元素值AX[1]~AX[M]取得第二加總值之水平分量And_CX,並加總垂直分量的多個元素值AY[1]~AY[N]取得第二加總值之垂直分量And_CY。其中,第二加總值之水平分量And_CX及垂直分量And_CY分別可依據下述之方程式(11-1)、(11-2)取得:Similarly, the logic circuit 220 adds a plurality of element values A X [1] to A X [M] of the horizontal component of the relative movement characteristic data (AND1 X , AND1 Y ) to obtain the horizontal component And_C of the second total value. X , and add a plurality of element values A Y [1] to A Y [N] of the total vertical component to obtain the vertical component And_C Y of the second total value. Wherein, the horizontal component And_C X and the vertical component And_C Y of the second total value can be obtained according to the following equations (11-1) and (11-2):

接下來,邏輯電路220依據第二加總值之水平分量And_CX取得第二增益值之水平分量Gain2X,並依據第二加總值之垂直分量And_CY取得第二增益值之垂直分量Gain2Y。越大的第二加總值之水平分量And_CX所對應的第二增益值之水平分量Gain2X較佳為越小,且越大的第二加總值之垂直分量And_CY所對應的第二增益值之垂直分量Gain2Y較佳為越小。於一較佳實施例中,第二增益值之水平分量Gain2X及垂直分量Gain2Y的取得方式可藉由圖10的第二增益曲線C2取得。在取得第二增益值之水平分量Gain2X過程中,邏輯電路220將圖10的橫軸及縱軸分別視為第二加總值之水平分量And_CX及第二增益值之水平分量Gain2X,再依據第二加總值之水平分量And_CX在第二增益曲線C2中取得對應的第二增益值之水平分量Gain2X。相似地,在取得第二增益值之垂直分量Gain2Y過程中,邏輯電路220將圖10的橫軸及縱軸分別視為第二加總值之垂直分量And_CY及第二增益值之垂直分量Gain2Y,再依據第二加總值之垂直分量And_CY在第二增益曲線C2中取得對應的第二增益值之垂直分量Gain2YNext, the logic circuit 220 obtains the horizontal component Gain2 X of the second gain value according to the horizontal component And_C X of the second summed value, and obtains the vertical component Gain2 Y of the second gain value according to the vertical component And_C Y of the second summed value. . The larger the horizontal component Gain2 X of the second gain value corresponding to the horizontal component And_C X of the second total added value is preferably smaller, and the larger the second component of the second sum value, the second component corresponding to the vertical component And_C Y The vertical component Gain2 Y of the gain value is preferably smaller. In a preferred embodiment, the manner in which the horizontal component Gain2 X and the vertical component Gain2 Y of the second gain value are obtained can be obtained by the second gain curve C2 of FIG. In the process of obtaining the horizontal component Gain2 X of the second gain value, the logic circuit 220 regards the horizontal axis and the vertical axis of FIG. 10 as the horizontal component And_C X of the second total value and the horizontal component Gain2 X of the second gain value, respectively. The horizontal component Gain2 X of the corresponding second gain value is obtained in the second gain curve C2 according to the horizontal component And_C X of the second total value. Similarly, in the process of obtaining the vertical component Gain2 Y of the second gain value, the logic circuit 220 regards the horizontal axis and the vertical axis of FIG. 10 as the vertical component And_C Y of the second total value and the vertical component of the second gain value, respectively. Gain2 Y , according to the vertical component And_C Y of the second sum total value, obtains the vertical component Gain2 Y of the corresponding second gain value in the second gain curve C2.

接下來,邏輯電路220可依據上述第一增益值之水平與垂直分量、第二增益值之水平與垂直分量Gain1X、Gain1Y、Gain2X、Gain2Y計算出上述的增益值G。在本發明一實施例中,增益值G可依據下述之方程式(12-1)取得:Next, the logic circuit 220 may calculate the gain value G according to the horizontal and vertical components of the first gain value and the horizontal and vertical components Gain1 X , Gain1 Y , Gain2 X , Gain2 Y of the second gain value. In an embodiment of the invention, the gain value G can be obtained according to the following equation (12-1):

G=1-max(Gain1X×Gain2X,Gain1Y×Gain2Y) (12-1)G=1-max(Gain1 X ×Gain2 X , Gain1 Y ×Gain2 Y ) (12-1)

根據上式,倘若(Gain1X×Gain2X)大於(Gain1Y×Gain2Y),則增益值G等於[1-(Gain1X×Gain2X)];倘若(Gain1X×Gain2X)小於(Gain1Y×Gain2Y),則增益值G等於[1-(Gain1Y×Gain2Y)]。其中因Gain1X、Gain1Y、Gain2X、Gain2Y皆大於等於0並小於等於1,故0≦G≦1。According to the above formula, if (Gain1 X × Gain2 X ) is larger than (Gain1 Y × Gain2 Y ), the gain value G is equal to [1-(Gain1 X × Gain2 X )]; if (Gain1 X × Gain2 X ) is smaller than (Gain1 Y ×Gain2 Y ), the gain value G is equal to [1-(Gain1 Y × Gain2 Y )]. Among them, Gain1 X , Gain1 Y , Gain2 X , and Gain2 Y are all greater than or equal to 0 and less than or equal to 1, so 0≦G≦1.

綜上所述,上述實施例所述之方法藉由所計算出的第一累積相對移動特性資料及比較相對移動特性資料,獲得增益值。其中,第一累積相對移動特性資料是藉由判斷數各畫面中狹域向量與廣域向量間之間的整體差異程度所獲得的,而比較相對移動特性資料是藉由判斷最近畫面與其餘的先前畫面之間的差異程度所獲得的。因此,所得到的增益值會依據狹域向量與廣域向量間之間的差異程度以及最近畫面與其餘的先前畫面之間的差異程度而決定。藉此,依據增益值而調整的最近畫面之運動景深得以真實地反應拍攝景況,而避免或改善景深倒置現象。In summary, the method described in the above embodiment obtains the gain value by calculating the first cumulative relative movement characteristic data and comparing the relative movement characteristic data. Wherein, the first cumulative relative movement characteristic data is obtained by judging the degree of overall difference between the narrow-area vector and the wide-area vector in each picture, and comparing the relative movement characteristic data by judging the latest picture and the rest The degree of difference between the previous pictures was obtained. Therefore, the obtained gain value is determined according to the degree of difference between the narrow field vector and the wide area vector and the degree of difference between the latest picture and the remaining previous pictures. Thereby, the motion depth of the recent picture adjusted according to the gain value can truly reflect the shooting situation, and avoid or improve the depth of field inversion phenomenon.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,故本發明之保護範圍當視後附之申請專利範圍所界定者為準。Although the present invention has been disclosed in the above embodiments, it is not intended to limit the invention, and any one of ordinary skill in the art can make some modifications and refinements without departing from the spirit and scope of the invention. The scope of the invention is defined by the scope of the appended claims.

100...影像100. . . image

110...背景110. . . background

120...視窗移動物件120. . . Window moving object

200...影像處理電路200. . . Image processing circuit

210...接收埠210. . . Receiving 埠

220...邏輯電路220. . . Logic circuit

230...緩衝記憶體230. . . Buffer memory

410...狹域單元410. . . Narrow domain unit

IMG1、IMG2...影像IMG1, IMG2. . . image

M0~M9...畫面M0~M9. . . Picture

T0~T9...時間點T 0 to T 9 . . . Time point

V(0,1,1)~V(0,M,N)...狹域移動向量V (0,1,1) ~V (0,M,N) . . . Narrow domain motion vector

X...水平方向X. . . horizontal direction

Y...垂直方向Y. . . Vertical direction

VG...廣域移動向量V G . . . Wide area motion vector

GX...廣域移動向量VG在水平方向X上的分量G X . . . The component of the wide-area motion vector V G in the horizontal direction X

GY...廣域移動向量VG在垂直方向Y上的分量G Y . . . The component of the wide-area motion vector V G in the vertical direction Y

Δ(0,1,1)~Δ(0,M,N)、[ΔX(0,1,1)Y(0,1,1)]~[ΔX(0,M,N)Y(0,M,N))]...相對移動向量Δ (0,1,1)(0,M,N) , [Δ X(0,1,1)Y(0,1,1) ]~[Δ X(0,M,N) , Δ Y(0,M,N)) ]. . . Relative motion vector

H[0]~H[P]...相對移動特性資料H[0]~H[P]. . . Relative mobility data

HX[0]~HX[P]...水平分量H X [0] ~ H X [P]. . . Horizontal component

HY[0]~HY[P]...垂直分量H Y [0] ~ H Y [P]. . . Vertical component

H[0,1]~H[P,Q]、HX[0,1]~HX[P,M]、HY[0,1]~HY[P,N]...元素值H[0,1]~H[P,Q], H X [0,1]~H X [P,M], H Y [0,1]~H Y [P,N]. . . Element value

OR1...第一累積相對移動特性資料OR1. . . First cumulative relative movement characteristic data

OR1X...第一累積相對移動特性資料的水平分量OR1 X . . . The horizontal component of the first cumulative relative motion characteristic data

OR1Y...第一累積相對移動特性資料的垂直分量OR1 Y . . . The vertical component of the first cumulative relative motion characteristic data

O[1]~O[Q]、OX[1]~OX[M]、OY[1]~OY[N]...元素值O[1]~O[Q], O X [1]~O X [M], O Y [1]~O Y [N]. . . Element value

OR2...第二累積相對移動特性資料OR2. . . Second cumulative relative movement characteristic data

OR2X...第二累積相對移動特性資料的水平分量OR2 X . . . The horizontal component of the second cumulative relative motion characteristic data

OR2Y...第二累積相對移動特性資料的垂直分量OR2 Y . . . The vertical component of the second cumulative relative motion characteristic data

U[1]~U[Q]、UX[1]~UX[M]、UY[1]~UY[N]...元素值U[1]~U[Q], U X [1]~U X [M], U Y [1]~U Y [N]. . . Element value

AND1...比較相對移動特性資料AND1. . . Comparison of relative movement characteristics

AND1X...比較相對移動特性資料的水平分量AND1 X . . . Comparing the horizontal component of relative mobility data

AND1Y...比較相對移動特性資料的垂直分量AND1 Y . . . Compare the vertical component of relative motion characteristics data

A[1]~A[Q]、AX[1]~AX[M]、AY[1]~AY[N]...元素值A[1]~A[Q], A X [1]~A X [M], A Y [1]~A Y [N]. . . Element value

A(0,1,1)~A(0,M,N)、[AX(0,1,1),AY(0,1,1)]~[AX(0,M,N),AY(0,M,N)]...比較結果值A (0,1,1) ~A (0,M,N) , [A X(0,1,1) , A Y(0,1,1) ]~[A X(0,M,N) , A Y(0,M,N) ]. . . Comparison result value

CX[0]...水平映射移動向量C X [0]. . . Horizontal map motion vector

CY[0]...垂直映射移動向量C Y [0]. . . Vertical mapping motion vector

S[1]~S[M+N]、SX[1]~SX[M]、SY[1]~SY[N]...計數值S[1]~S[M+N], S X [1]~S X [M], S Y [1]~S Y [N]. . . Count value

C[1]~C[M+N]、CX[1]~CX[M]、CY[1]~CY[N]...元素值C[1]~C[M+N], C X [1]~C X [M], C Y [1]~C Y [N]. . . Element value

D(0,1,1)~D(0,M,N)...原始運動景深D (0,1,1) ~D (0,M,N) . . . Original movement depth of field

C1...第一增益曲線C1. . . First gain curve

C2...第二增益曲線C2. . . Second gain curve

Gain1...第一增益值Gain1. . . First gain value

Gain2...第二增益值Gain2. . . Second gain value

Or_C...第一加總值Or_C. . . First total value

And_C...第二加總值And_C. . . Second total value

S201~S205、S211~S216...流程步驟S201~S205, S211~S216. . . Process step

圖1為一影像包含有一視窗移動物件的示意圖。Figure 1 is a schematic illustration of an image containing a window moving object.

圖2A是本發明一實施例之影像處理電路的功能方塊圖。2A is a functional block diagram of an image processing circuit in accordance with an embodiment of the present invention.

圖2B為依據一實施例之調整影像的運動景深之方法之概要流程圖。2B is a schematic flow chart of a method of adjusting a moving depth of field of an image according to an embodiment.

圖2C為依據一實施例之調整影像的運動景深之方法之細步流程圖。2C is a detailed flow chart of a method of adjusting the motion depth of field of an image, in accordance with an embodiment.

圖3繪示了圖2A之影像在時序上的多個畫面。FIG. 3 illustrates a plurality of pictures of the image of FIG. 2A in time series.

圖4A繪示了本發明一實施例之畫面M0中各狹域單元所對應的相對移動向量。FIG. 4A illustrates a relative motion vector corresponding to each narrow-area unit in the picture M0 according to an embodiment of the present invention.

圖4B繪示了本發明另一實施例之畫面M0中各狹域單元所對應的相對移動向量。FIG. 4B illustrates a relative motion vector corresponding to each narrow-area unit in the picture M0 according to another embodiment of the present invention.

圖5A繪示了本發明一實施例中畫面M0的各狹域單元所對應的相對移動向量。FIG. 5A illustrates a relative motion vector corresponding to each narrow-area unit of the picture M0 in an embodiment of the present invention.

圖5B繪示了本發明另一實施例中畫面M0的各狹域單元所對應的相對移動向量。FIG. 5B illustrates a relative motion vector corresponding to each narrow-area unit of the picture M0 in another embodiment of the present invention.

圖6A繪示了本發明一實施例中各畫面的相對移動特性資料、第一累積相對移動特性資料、第二累積相對移動特性資料及比較相對移動特性資料。FIG. 6A illustrates relative motion characteristic data, first cumulative relative motion characteristic data, second cumulative relative motion characteristic data, and comparative relative motion characteristic data of each picture in an embodiment of the present invention.

圖6B繪示了本發明另一實施例中各畫面的相對移動特性資料、第一累積相對移動特性資料、第二累積相對移動特性資料及比較相對移動特性資料。6B is a diagram showing relative movement characteristic data, first cumulative relative movement characteristic data, second cumulative relative movement characteristic data, and comparative relative movement characteristic data of each screen in another embodiment of the present invention.

圖7A繪示了本發明一實施例中畫面M0的各狹域單元所對應的比較結果值。FIG. 7A illustrates a comparison result value corresponding to each narrow-area unit of the screen M0 according to an embodiment of the present invention.

圖7B繪示了本發明另一實施例中畫面M0的各狹域單元所對應的比較結果值。FIG. 7B illustrates comparison result values corresponding to the narrow-area cells of the screen M0 in another embodiment of the present invention.

圖8繪示了本發明一實施例中畫面M0的各狹域單元所對應的原始運動景深。FIG. 8 illustrates an original motion depth of field corresponding to each narrow-area unit of the screen M0 according to an embodiment of the present invention.

圖9為第一增益曲線之示意圖。Figure 9 is a schematic diagram of a first gain curve.

圖10為第二增益曲線之示意圖。Figure 10 is a schematic diagram of a second gain curve.

S211~S216...流程步驟S211~S216. . . Process step

Claims (18)

一種調整影像之運動景深的方法,用於二維轉三維影像處理,該方法包括:(i)接收多個時間點的多個畫面,並依據各該畫面各自之多個狹域移動向量與一廣域移動向量,計算該些畫面當中每一者之一相對移動特性資料;(ii)將該些畫面之該些相對移動特性資料累積計算,以獲得第一累積相對移動特性資料;(iii)將該些畫面當中除一最近畫面外之其餘畫面之該相對移動特性資料累積計算,以獲得一第二累積相對移動特性資料;(iv)比較該最近畫面之該相對移動特性資料與該第二累積相對移動特性資料以獲得一比較相對移動特性資料;(v)依據該第一累積相對移動特性資料與該比較相對移動特性資料來計算出一增益值;以及(vi)依據該增益值來調整該最近畫面之原始運動景深。A method for adjusting a moving depth of field of an image for two-dimensional to three-dimensional image processing, the method comprising: (i) receiving a plurality of pictures at a plurality of time points, and according to each of the plurality of narrow-field moving vectors and one of the respective pictures a wide-area moving vector, calculating a relative movement characteristic data of each of the pictures; (ii) cumulatively calculating the relative movement characteristic data of the pictures to obtain a first cumulative relative movement characteristic data; (iii) Compulsing the relative movement characteristic data of the remaining pictures except the most recent picture among the pictures to obtain a second cumulative relative movement characteristic data; (iv) comparing the relative movement characteristic data of the recent picture with the second Accumulating the relative movement characteristic data to obtain a comparative relative movement characteristic data; (v) calculating a gain value according to the first cumulative relative movement characteristic data and the comparison relative movement characteristic data; and (vi) adjusting according to the gain value The original motion depth of the recent picture. 如申請專利範圍第1項所述之調整影像之景深的方法,其中步驟(i)係包括:(a)分別就各該些畫面計算該些狹域向量與該廣域向量間之差值,以獲得多個相對移動向量;以及(b)依據各該些畫面之該些狹域移動向量與該些相對移動向量,以獲得各該畫面之該相對移動特性資料。The method for adjusting the depth of field of an image according to claim 1, wherein the step (i) comprises: (a) calculating a difference between the narrow-area vector and the wide-area vector for each of the pictures, Obtaining a plurality of relative motion vectors; and (b) obtaining the relative motion characteristic data of each of the pictures according to the narrow range motion vectors of the respective pictures and the relative motion vectors. 如申請專利範圍第2項所述之調整影像之景深的方法,其中步驟(b)係包括:(b1)判斷該些狹域移動向量的絕對值是否大於一第一臨界值;(b2)判斷該些相對移動向量的絕對值是否大於一第二臨界值;以及(b3)依據上述判斷結果以獲得各該些畫面的該相對移動特性資料。The method for adjusting the depth of field of an image as described in claim 2, wherein the step (b) comprises: (b1) determining whether the absolute value of the narrow range motion vectors is greater than a first threshold; (b2) determining Whether the absolute values of the relative motion vectors are greater than a second threshold value; and (b3) obtaining the relative motion characteristic data of each of the pictures according to the foregoing determination result. 如申請專利範圍第3項所述之調整影像之景深的方法,其中步驟(b3)係包括:依據上述判斷結果以計算出各該些畫面中與多個狹域單元相對應之多個比較結果值;以及將該些比較結果值沿一行/列映射方向映射以產生一映射移動向量,該映射移動向量代表該相對移動特性資料。The method for adjusting the depth of field of an image according to claim 3, wherein the step (b3) comprises: calculating a plurality of comparison results corresponding to the plurality of narrow-area units in each of the pictures according to the determination result; And mapping the comparison result values along a row/column mapping direction to generate a mapping motion vector, the mapping motion vector representing the relative motion characteristic data. 如申請專利範圍第4項所述之調整影像之景深的方法,其中產生該映射移動向量之步驟係包括:將該些比較結果值沿該行/列映射方向計數以產生多個分別對應於不同行/列的計數值;以及將該些計數值分別與一第三臨界值比較,以依據該些計數值與該第三臨界值的比較結果來產生該映射移動向量之多個元素值。The method for adjusting the depth of field of an image according to claim 4, wherein the step of generating the mapping motion vector comprises: counting the comparison result values along the row/column mapping direction to generate a plurality of respectively corresponding to different a row/column count value; and comparing the count values to a third threshold value to generate a plurality of element values of the map motion vector based on a comparison result of the count values and the third threshold value. 如申請專利範圍第1項所述之調整影像之景深的方法,其中步驟(i)至(v)係分別依據該些畫面之一個至多個方向實施。The method for adjusting the depth of field of an image as described in claim 1, wherein the steps (i) to (v) are performed according to one to more directions of the screens, respectively. 如申請專利範圍第1項所述之調整影像之景深的方法,其中該些畫面中之該些相對移動特性資料的每一者各包括多個對應於不同行/列的元素值,而上述步驟(ii)係包括:將該些畫面中對應於同一行/列的該些元素值進行或運算,以獲得該第一累積相對移動特性資料。The method for adjusting the depth of field of an image as described in claim 1, wherein each of the relative movement characteristic data in the pictures includes a plurality of element values corresponding to different rows/columns, and the above steps (ii) comprising: performing an OR operation on the element values corresponding to the same row/column in the pictures to obtain the first cumulative relative movement characteristic data. 如申請專利範圍第7項所述之調整影像之景深的方法,其中上述步驟(iii)係包括:將該些其餘畫面之該些相對移動特性資料中對應於同一行/列的該些元素值進行或運算,以獲得該第二累積相對移動特性資料。The method for adjusting the depth of field of an image according to claim 7 , wherein the step (iii) comprises: selecting the element values corresponding to the same row/column of the relative movement characteristic data of the remaining screens. Performing an OR operation to obtain the second cumulative relative movement characteristic data. 如申請專利範圍第7項所述之調整影像之景深的方法,其中步驟(iv)係包括:將該相對移動特性資料之複數個元素值與該第二累積相對移動特性資料中對應於同一行/列之相反元素值進行及運算,以獲得該比較相對移動特性資料。The method for adjusting the depth of field of an image according to claim 7 , wherein the step (iv) comprises: combining the plurality of element values of the relative movement characteristic data with the same line of the second cumulative relative movement characteristic data; The opposite element values of the /column are summed to obtain the relative movement characteristics of the comparison. 如申請專利範圍第1項所述之調整影像之景深的方法,其中上述步驟(v)係包括:依據該第一累積相對移動特性資料,取得一第一增益值;依據該比較相對移動特性資料,取得一第二增益值;以及依據該第一增益值及該第二增益值計算出該增益值。The method for adjusting the depth of field of an image according to claim 1, wherein the step (v) comprises: obtaining a first gain value according to the first cumulative relative movement characteristic data; and comparing the relative movement characteristic data according to the comparison Obtaining a second gain value; and calculating the gain value according to the first gain value and the second gain value. 如申請專利範圍第10項所述之調整影像之景深的方法,其中取得該第一增益值之步驟係包括:依據該第一累積相對移動特性資料之複數個元素值之一第一加總值,自一第一增益曲線中獲得該第一增益值;而取得該第二增益值之步驟係包括:依據該比較相對移動特性資料之複數個元素值之一第二加總值,自一第二增益曲線中獲得該第二增益值。The method for adjusting the depth of field of an image according to claim 10, wherein the step of obtaining the first gain value comprises: first summing a value of one of a plurality of element values according to the first cumulative relative movement characteristic data Obtaining the first gain value from a first gain curve; and obtaining the second gain value comprises: selecting a second total value of the plurality of element values according to the comparison relative movement characteristic data, from a first The second gain value is obtained in the second gain curve. 如申請專利範圍第10項所述之調整影像之景深的方法,其中該第一增益值與該第二增益值當中每一者係分別依第一與第二方向計算。The method for adjusting the depth of field of an image according to claim 10, wherein each of the first gain value and the second gain value is calculated according to the first and second directions, respectively. 如申請專利範圍第10項所述之調整影像之景深的方法,其中計算該增益值步驟係包括:獲得沿該第一方向之該第一增益值與第二增益值之乘積;獲得沿該第二方向之該第一增益值與第二增益值之乘積;以及依據上述兩乘積當中之一較大者來決定該增益值。The method for adjusting the depth of field of an image according to claim 10, wherein the calculating the gain value comprises: obtaining a product of the first gain value and the second gain value along the first direction; obtaining along the first a product of the first gain value and the second gain value in the two directions; and determining the gain value based on one of the two products. 一種調整影像之運動景深的方法,用於二維轉三維影像處理,該方法包括:接收多個時間點的多個畫面,並計算各該畫面各自之多個狹域移動向量與一廣域移動向量;判斷該多個畫面中,該多個狹域移動向量與該廣義移動向量間的第一差異程度;判斷該些畫面當中一最近畫面與其餘的先前畫面之間的第二差異程度;依據該第一差異程度與該第二差異程度來計算出一增益值;以及依據該增益值來調整該最近畫面之原始運動景深。A method for adjusting a moving depth of field of an image for two-dimensional to three-dimensional image processing, the method comprising: receiving a plurality of pictures at a plurality of time points, and calculating a plurality of narrow-area moving vectors and a wide-area movement of each of the pictures a vector; determining a first degree of difference between the plurality of narrow-area motion vectors and the generalized motion vector; determining a second degree of difference between a recent picture and the remaining previous pictures among the plurality of pictures; The first difference degree and the second difference degree are used to calculate a gain value; and the original motion depth of field of the recent picture is adjusted according to the gain value. 如申請專利範圍第14項所述之調整影像之景深的方法,其中判斷該第一差異程度之步驟係包括:分別就各該些畫面計算該些狹域向量與該廣域向量間之差值,以獲得多個相對移動向量;依據各該些畫面之該些狹域移動向量與該些相對移動向量,以獲得各該畫面之該相對移動特性資料;以及將該些畫面之該些相對移動特性資料累積計算,以獲得第一累積相對移動特性資料,而該第一累積相對移動特性資料代表該第一差異程度。The method for adjusting the depth of field of an image according to claim 14, wherein the step of determining the first degree of difference comprises: calculating, respectively, a difference between the narrow-area vectors and the wide-area vector for each of the pictures Obtaining a plurality of relative motion vectors; obtaining the relative motion characteristic data of each of the pictures according to the narrow range motion vectors of the respective pictures and the relative motion vectors; and moving the relative movements of the pictures The characteristic data is cumulatively calculated to obtain a first cumulative relative movement characteristic data, and the first cumulative relative movement characteristic data represents the first degree of difference. 如申請專利範圍第15項所述之調整影像之景深的方法,其中獲得各該畫面之該相對移動特性資料之步驟係包括:判斷該些狹域移動向量的絕對值是否大於一第一臨界值;判斷該些相對移動向量的絕對值是否大於一第二臨界值;以及依據上述判斷結果以獲得各該些畫面的該相對移動特性資料。The method for adjusting the depth of field of an image according to claim 15 , wherein the step of obtaining the relative movement characteristic data of each of the pictures comprises: determining whether an absolute value of the narrow range motion vectors is greater than a first threshold Determining whether the absolute values of the relative motion vectors are greater than a second threshold value; and obtaining the relative motion characteristic data of each of the pictures according to the foregoing determination result. 如申請專利範圍第15項所述之調整影像之景深的方法,其中判斷該第二差異程度之步驟係包括:將該些畫面當中除一最近畫面外之其餘畫面之該相對移動特性資料累積計算,以獲得一第二累積相對移動特性資料;以及比較該最近畫面之該相對移動特性資料與該第二累積相對移動特性資料以獲得一比較相對移動特性資料,該比較相對移動特性資料代表該第二差異程度。The method for adjusting the depth of field of an image according to claim 15 , wherein the step of determining the second degree of difference comprises: accumulating the relative movement characteristic data of the remaining pictures except the most recent picture among the pictures; Obtaining a second cumulative relative movement characteristic data; and comparing the relative movement characteristic data of the latest picture with the second cumulative relative movement characteristic data to obtain a comparative relative movement characteristic data, the comparative relative movement characteristic data representing the first The difference between the two. 如申請專利範圍第14項所述之調整影像之景深的方法,其中當該第一差異程度越大時,該增益值係設定為越小,以及當該第二差異程度越小時,該增益值係設定為越小。The method for adjusting the depth of field of an image as described in claim 14, wherein the gain value is set to be smaller when the first difference degree is larger, and the gain value is smaller when the second difference degree is smaller. The system is set to be smaller.
TW100143735A 2011-11-29 2011-11-29 Method for adjusting moving depths of video TW201322732A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW100143735A TW201322732A (en) 2011-11-29 2011-11-29 Method for adjusting moving depths of video

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW100143735A TW201322732A (en) 2011-11-29 2011-11-29 Method for adjusting moving depths of video

Publications (1)

Publication Number Publication Date
TW201322732A true TW201322732A (en) 2013-06-01

Family

ID=49032573

Family Applications (1)

Application Number Title Priority Date Filing Date
TW100143735A TW201322732A (en) 2011-11-29 2011-11-29 Method for adjusting moving depths of video

Country Status (1)

Country Link
TW (1) TW201322732A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9241148B2 (en) 2013-09-02 2016-01-19 Novatek Microelectronics Corp. Disparity calculating method and stereo matching device thereof
TWI554108B (en) * 2015-08-04 2016-10-11 緯創資通股份有限公司 Electronic device and image processing method
US12236814B2 (en) 2022-05-26 2025-02-25 Industrial Technology Research Institute Display method and display system for anti-dizziness reference image

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9241148B2 (en) 2013-09-02 2016-01-19 Novatek Microelectronics Corp. Disparity calculating method and stereo matching device thereof
TWI554108B (en) * 2015-08-04 2016-10-11 緯創資通股份有限公司 Electronic device and image processing method
US12236814B2 (en) 2022-05-26 2025-02-25 Industrial Technology Research Institute Display method and display system for anti-dizziness reference image

Similar Documents

Publication Publication Date Title
US12148123B2 (en) Multi-stage multi-reference bootstrapping for video super-resolution
CN112288790B (en) Video depth estimation based on temporal attention
US9525858B2 (en) Depth or disparity map upscaling
US9679387B2 (en) Depth-weighted group-wise principal component analysis for video foreground/background separation
US10999500B2 (en) Imaging apparatus and imaging method, and image processing apparatus and image processing method
US20120320045A1 (en) Image Processing Method and Apparatus Thereof
CA2729106A1 (en) System and method for depth extraction of images with motion compensation
WO2009145749A1 (en) System and method for depth extraction of images with forward and backward depth prediction
US20180198970A1 (en) High dynamic range imaging using camera arrays
US20130135430A1 (en) Method for adjusting moving depths of video
CN105023275A (en) Super-resolution light field acquisition device and three-dimensional reconstruction method thereof
EP2466901B1 (en) Depth data upsampling
CN113538243A (en) Super-resolution image reconstruction method based on multi-parallax attention module combination
Richter et al. Robust super-resolution for mixed-resolution multiview image plus depth data
CN109661815B (en) Robust disparity estimation in the presence of significant intensity variations of the camera array
US20110085026A1 (en) Detection method and detection system of moving object
TW201322732A (en) Method for adjusting moving depths of video
JP2014219795A (en) Image processor, image processing circuit, and image processing method
US20160093062A1 (en) Method and apparatus for estimating absolute motion values in image sequences
CN112911262B (en) Video sequence processing method and electronic equipment
CN102802020B (en) The method and apparatus of monitoring parallax information of binocular stereoscopic video
Sun et al. Rolling shutter distortion removal based on curve interpolation
Akin et al. Real-time free viewpoint synthesis using three-camera disparity estimation hardware
CN113593008B (en) True 3D image significant reconstruction method under complex scene
TW201426634A (en) Target image generation utilizing a functional based on functions of information from other images