TWI661721B - Method and circuit for detection motion - Google Patents

Method and circuit for detection motion Download PDF

Info

Publication number
TWI661721B
TWI661721B TW107111932A TW107111932A TWI661721B TW I661721 B TWI661721 B TW I661721B TW 107111932 A TW107111932 A TW 107111932A TW 107111932 A TW107111932 A TW 107111932A TW I661721 B TWI661721 B TW I661721B
Authority
TW
Taiwan
Prior art keywords
signature
value
signature value
motion detection
bits
Prior art date
Application number
TW107111932A
Other languages
Chinese (zh)
Other versions
TW201943285A (en
Inventor
甘家銘
楊得煒
Original Assignee
奇景光電股份有限公司
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 奇景光電股份有限公司 filed Critical 奇景光電股份有限公司
Priority to TW107111932A priority Critical patent/TWI661721B/en
Application granted granted Critical
Publication of TWI661721B publication Critical patent/TWI661721B/en
Publication of TW201943285A publication Critical patent/TW201943285A/en

Links

Landscapes

  • Image Analysis (AREA)

Abstract

本發明提出一種動作偵測電路,包括偵測單元以取得目前畫面並判斷目前畫面中是否有特定像素。動作偵測電路還包括簽章產生器與比較器。簽章產生器用以對每一個特定像素執行更新程序。此更新程序包括:將特定像素的座標資訊加至對應的簽章數值當中,以及更新對應的簽章數值中的至少一個位元。比較器用以比較目前畫面的簽章數值與前畫面的簽章數值以判斷目前畫面是否為動作畫面。 The invention provides a motion detection circuit, which includes a detection unit to obtain a current frame and determine whether a specific pixel exists in the current frame. The motion detection circuit further includes a signature generator and a comparator. The signature generator is used to perform an update procedure for each specific pixel. The update procedure includes: adding coordinate information of a specific pixel to a corresponding signature value, and updating at least one bit in the corresponding signature value. The comparator is used to compare the signature value of the current picture with the signature value of the previous picture to determine whether the current picture is an action picture.

Description

動作偵測電路與方法 Motion detection circuit and method

本發明是有關於一計算簽章數值以判斷動作畫面的動作偵測方法與電路。 The invention relates to a motion detection method and circuit for calculating a signature value to determine a motion picture.

在影像處理的領域中,在一些情境下需要判斷一段視訊中是否有動作畫面。為了要偵測動作畫面,可以計算前後影像之間的差,計算直方圖(histogram)等等,然而這些做法的複雜度可能較高。因此,如何提出一個低複雜度的演算法,來判斷動作畫面,為此領域技術人員所關心的議題。 In the field of image processing, in some situations it is necessary to determine whether there is an action picture in a segment of video. In order to detect the motion picture, the difference between the front and back images can be calculated, and the histogram can be calculated. However, the complexity of these methods may be high. Therefore, how to propose a low-complexity algorithm to determine the action picture is a topic of concern to those skilled in the art.

本發明的實施例提出一種動作偵測電路,包括偵測單元以取得目前畫面並判斷目前畫面中是否有特定像素。動作偵測電路還包括簽章產生器與比較器。簽章產生器用以對於每一個特定像素執行更新程序。此更新程序包括:將特定像素的座標資訊加至對應的簽章數值當中,以及更新對應的簽章數值中的至少一個位元。比較器用以比較目前畫 面的簽章數值與前畫面的簽章數值以判斷目前畫面是否為動作畫面。 An embodiment of the present invention provides a motion detection circuit including a detection unit to obtain a current frame and determine whether a specific pixel exists in the current frame. The motion detection circuit further includes a signature generator and a comparator. The signature generator is used to execute an update procedure for each specific pixel. The update procedure includes: adding coordinate information of a specific pixel to a corresponding signature value, and updating at least one bit in the corresponding signature value. The comparator is used to compare the current picture The signature value on the face and the signature value on the previous screen are used to determine whether the current screen is an action screen.

在一些實施例中,目前畫面包括多個區塊,每一個區塊具有對應的簽章數值。在初始化目前畫面的簽章數值以及前畫面的簽章數值時,對於位置相同的區塊所對應的簽章數值是採用相同的預設值。 In some embodiments, the current picture includes multiple blocks, and each block has a corresponding signature value. When initializing the signature value of the current picture and the signature value of the previous picture, the same preset value is used for the signature value corresponding to the block with the same position.

在一些實施例中,在更新程序中,簽章產生器用以將對應的簽章數值向左或向右位移多個位元,並將特定像素相對於所屬區塊的X座標與Y座標加入至對應的簽章數值當中。 In some embodiments, in the update procedure, the signature generator is used to shift the corresponding signature value to the left or right by a plurality of bits, and add the X coordinate and the Y coordinate of the specific pixel relative to the block it belongs to Among the corresponding signature values.

在一些實施例中,在更新程序中,簽章產生器更新對應的簽章數值中位元的步驟包括:從簽章數值中取得S個位元,其中S為大於1的正整數;將S個位元執行邏輯運算;以及將簽章數值中的至少一個位元更新為邏輯運算的結果。 In some embodiments, in the updating procedure, the step of the signature generator updating the corresponding bits in the signature value includes: obtaining S bits from the signature value, where S is a positive integer greater than 1; Each bit performs a logical operation; and updates at least one bit in the signature value to the result of the logical operation.

在一些實施例中,在更新程序中簽章數值被更新位元的個數大於1,簽章產生器在更新簽章數值中的不同位元時,是取得不同的S個位元。 In some embodiments, the number of updated bits in the signature value is greater than one in the update program, and the signature generator obtains different S bits when updating different bits in the signature value.

以另一個角度來說,本發明的實施例提出一種動作偵測方法,適用於動作偵測電路,此動作偵測方法包括:取得目前畫面並判斷目前畫面中是否有特定像素:對於每一個特定像素執行更新程序。此更新程序包括:將特定像素的座標資訊加至對應的簽章數值當中;以及更新對應的簽章數值中的至少一個位元。上述的動作偵測方法還包括;比 較目前畫面的簽章數值與前畫面的簽章數值以判斷目前畫面是否為動作畫面。 From another perspective, an embodiment of the present invention proposes a motion detection method suitable for a motion detection circuit. The motion detection method includes: obtaining a current picture and determining whether there are specific pixels in the current picture: for each specific Pixels perform the update procedure. The update procedure includes: adding coordinate information of a specific pixel to a corresponding signature value; and updating at least one bit in the corresponding signature value. The above motion detection method further includes: Compare the signature value of the current picture with the signature value of the previous picture to determine whether the current picture is an action picture.

在一些實施例中,目前畫面包括多個區塊,每一個區塊具有對應的簽章數值。動作偵測方法還包括:在初始化目前畫面的簽章數值以及前畫面的簽章數值時,對於位置相同的區塊所對應的簽章數值是採用相同的預設值。 In some embodiments, the current picture includes multiple blocks, and each block has a corresponding signature value. The motion detection method further includes: when initializing the signature value of the current picture and the signature value of the previous picture, using the same preset value for the signature value corresponding to the block with the same position.

在一些實施例中,動作偵測方法更包括:在更新程序中,將對應的簽章數值向左或向右位移多個位元,並將特定像素相對於所屬區塊的X座標與Y座標加入至對應的簽章數值當中。 In some embodiments, the motion detection method further includes: in the update procedure, shifting the corresponding signature value to the left or right by a plurality of bits, and shifting the X coordinate and the Y coordinate of the specific pixel relative to the block it belongs to Add to the corresponding signature value.

在一些實施例中,在更新程序中更新簽章數值中位元的步驟包括:從簽章數值中取得S個位元,其中S為大於1的正整數;將S個位元執行邏輯運算;以及將簽章數值中的位元更新為邏輯運算的結果。 In some embodiments, the step of updating the bits in the signature value in the update program includes: obtaining S bits from the signature value, where S is a positive integer greater than 1; performing logical operations on the S bits; And update the bits in the signature value to the result of the logical operation.

在一些實施例中,在更新程序中,被更新位元的個數大於1。動作偵測方法還包括:在更新簽章數值中的不同位元時,是取得不同的S個位元。 In some embodiments, in the update procedure, the number of updated bits is greater than one. The motion detection method further includes: when updating different bits in the signature value, obtaining different S bits.

為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。 In order to make the above features and advantages of the present invention more comprehensible, embodiments are hereinafter described in detail with reference to the accompanying drawings.

100‧‧‧顯示裝置 100‧‧‧ display device

110‧‧‧時序控制器 110‧‧‧sequence controller

111‧‧‧動作偵測電路 111‧‧‧motion detection circuit

120‧‧‧源極驅動器 120‧‧‧Source Driver

130‧‧‧閘極驅動器 130‧‧‧Gate driver

140‧‧‧顯示面板 140‧‧‧display panel

150‧‧‧偵測單元 150‧‧‧detection unit

160‧‧‧簽章產生器 160‧‧‧Sign Generator

161、180‧‧‧暫存器 161, 180‧‧‧ register

162‧‧‧運算單元 162‧‧‧ Computing Unit

170‧‧‧比較器 170‧‧‧ Comparator

181、182‧‧‧簽章數值 181, 182‧‧‧Signed value

200‧‧‧目前畫面 200‧‧‧ Current screen

210‧‧‧區塊 210‧‧‧block

M、N‧‧‧正整數 M, N‧‧‧ positive integer

P1、P2‧‧‧像素 P1, P2 ‧‧‧ pixels

O‧‧‧座標 O‧‧‧coordinates

b0~b31‧‧‧位元 b 0 ~ b 31 ‧‧‧bit

xlocal、ylocal‧‧‧座標 x local , y local ‧‧‧ coordinates

500‧‧‧前畫面 500‧‧‧ front screen

510‧‧‧區塊 510‧‧‧block

601~605‧‧‧步驟 601 ~ 605‧‧‧step

[圖1A]是根據一實施例繪示顯示裝置的示意圖。 1A is a schematic diagram illustrating a display device according to an embodiment.

[圖1B]是根據一實施例繪示動作偵測電路的方塊示意圖。 [FIG. 1B] A block diagram illustrating a motion detection circuit according to an embodiment.

[圖2]是根據一實施例繪示計算簽章數值的示意圖。 FIG. 2 is a schematic diagram illustrating calculating a signature value according to an embodiment.

[圖3]是根據一實施例繪示了將座標資訊加至簽章數值的示意圖。 FIG. 3 is a schematic diagram illustrating adding coordinate information to a signature value according to an embodiment.

[圖4]是根據一實施例繪示更新簽章數值中位元的示意圖。 4 is a schematic diagram showing updating a bit in a signature value according to an embodiment.

[圖5]是根據一實施例繪示比較兩張畫面中簽章數值的示意圖。 FIG. 5 is a schematic diagram illustrating comparison of signature values in two pictures according to an embodiment.

[圖6]是根據一實施例繪示動作偵測方法的流程圖。 6 is a flowchart illustrating a motion detection method according to an embodiment.

圖1A是根據一實施例繪示顯示裝置的示意圖。在圖1A的實施例中,顯示裝置100包括了時序控制器110、源極驅動器120、閘極驅動器130與顯示面板140。時序控制器110包括了動作偵測電路111,用以執行以下描述的動作偵測方法。然而,此動作偵測電路111與方法也可以應用在其他的電子裝置,例如智慧型手機、平板電腦、個人電腦、筆記型電腦、工業電腦、顯示螢幕、觸控螢幕等等。 FIG. 1A is a schematic diagram illustrating a display device according to an embodiment. In the embodiment of FIG. 1A, the display device 100 includes a timing controller 110, a source driver 120, a gate driver 130, and a display panel 140. The timing controller 110 includes a motion detection circuit 111 for performing a motion detection method described below. However, the motion detection circuit 111 and method can also be applied to other electronic devices, such as smart phones, tablet computers, personal computers, notebook computers, industrial computers, display screens, touch screens, and so on.

圖1B是根據一實施例繪示動作偵測電路的方塊示意圖。請參照圖1B,動作偵測電路111包括偵測單元150、簽章產生器160、比較器170與暫存器180。簽章產生器160中包括了暫存器161與運算單元162。以下將搭配圖1B與圖2一併說明動作偵測電路111的運作。 FIG. 1B is a block diagram illustrating a motion detection circuit according to an embodiment. Referring to FIG. 1B, the motion detection circuit 111 includes a detection unit 150, a signature generator 160, a comparator 170, and a register 180. The signature generator 160 includes a temporary register 161 and an operation unit 162. The operation of the motion detection circuit 111 will be described below with reference to FIGS. 1B and 2.

圖2是根據一實施例繪示計算簽章數值的示意圖。請參照圖2,偵測單元150會取得目前畫面200並判斷目前畫面中是否有特定像素。在此實施例中,偵測單元150可採用任意的邊緣偵測演算法,而上述的特定像素指的是處於邊緣的像素。此邊緣偵測演算法例如是採用一個濾波器,並根據此濾波器對目前畫面200做捲積(convolution)的運算,濾波的結果可以與一個臨界值做比較,若大於臨界值則判斷是特定像素。上述的濾波器可以是任意合適的高通濾波器,例如為索貝爾(sobel)濾波器等,本發明並不此限。本領域具有通常知識者當可採用任意的邊緣偵測演算法,例如為坎尼邊緣偵測器(canny edge detector)等,本發明並不限制邊緣偵測演算法的內容。在其他實施例中,偵測單元150也可以判斷目前畫面200中每個像素是否有特定的亮度、色相(hue)、飽和度、或者判斷目前畫面200中是否有特定的紋理(例如線條、平面、任意幾何形狀等)以取得特定像素。換言之,上述的特定像素也可以是具有特定色相、飽和度、亮度、紋理的像素,本發明並不在此限。在圖2僅繪示了特定像素P1與P2作為例子來說明後續的演算法。 FIG. 2 is a schematic diagram illustrating calculating a signature value according to an embodiment. Referring to FIG. 2, the detection unit 150 obtains the current frame 200 and determines whether there are specific pixels in the current frame. In this embodiment, the detection unit 150 may use any edge detection algorithm, and the specific pixel mentioned above refers to a pixel at an edge. The edge detection algorithm uses, for example, a filter, and performs a convolution operation on the current picture 200 according to the filter. The filtering result can be compared with a threshold value. If it is greater than the threshold value, it is determined to be specific. Pixels. The above-mentioned filter may be any suitable high-pass filter, such as a Sobel filter, and the present invention is not limited thereto. Those skilled in the art can use any edge detection algorithm, such as a canny edge detector, and the present invention does not limit the content of the edge detection algorithm. In other embodiments, the detection unit 150 may also determine whether each pixel in the current picture 200 has a specific brightness, hue, saturation, or whether there is a specific texture (e.g., lines, planes) in the current picture 200. , Arbitrary geometry, etc.) to get specific pixels. In other words, the above-mentioned specific pixel may also be a pixel having a specific hue, saturation, brightness, and texture, and the present invention is not limited thereto. Only specific pixels P1 and P2 are shown in FIG. 2 as an example to illustrate subsequent algorithms.

在一些實施例中,目前畫面200可被分為M x N個區塊,其中M與N為正整數。在一些實施例中,正整數M與N為16,但在其他實施例中也可以為8、32、64或其他數值,本發明並不在此限。在一些實施例中,目前畫面200的寬度可能無法被正整數M所整除,因此可以設定前M-1個區塊的寬度相同,第M個區塊的寬度則較大或較小。在一些實 施例中,每一個區塊的寬度與高度都可任意設計,也可彼此不相同,區塊的形狀也可以是其他多邊形或圓形,並不限於矩形。 In some embodiments, the current picture 200 may be divided into M x N blocks, where M and N are positive integers. In some embodiments, the positive integers M and N are 16, but in other embodiments, they can also be 8, 32, 64, or other values, and the present invention is not limited thereto. In some embodiments, the width of the current picture 200 may not be divisible by a positive integer M. Therefore, the width of the first M-1 blocks may be set to be the same, and the width of the Mth block may be larger or smaller. In some real In the embodiment, the width and height of each block can be arbitrarily designed or different from each other. The shape of the block can also be other polygons or circles, and is not limited to rectangular.

對於每一個區塊都可以設定一個簽章數值(signature),這些簽章數值是儲存在暫存器161當中,上述的特定像素是用來更新簽章數值,若同一個區塊中的簽章數值改變了,則表示畫面中的亮度、顏色、邊緣、或紋理改變了,即表示有動作發生,以下將說明如何計算簽章數值。首先,運算單元162會初始化簽章數值,在一些實施例中目前畫面200中每一個區塊的簽章數值可初始化成不同的數值,且可以隨機產生。其他實施例中,目前畫面200中數個區塊的簽章數值也可初始化成相同的數值,本發明並不在此限。 For each block, a signature value can be set. These signature values are stored in the register 161. The specific pixels mentioned above are used to update the signature value. If the signature is in the same block, When the value is changed, it means that the brightness, color, edge, or texture in the picture is changed, which means that an action has occurred. The following explains how to calculate the value of the signature. First, the arithmetic unit 162 initializes the signature value. In some embodiments, the signature value of each block in the current picture 200 may be initialized to a different value and may be randomly generated. In other embodiments, the signature values of several blocks in the current picture 200 may also be initialized to the same value, which is not limited in the present invention.

對於每個特定像素,簽章產生器160都會執行一個更新程序。在此以特定像素P1與P2為例,特定像素P1與P2是屬於區塊210。在對特定像素P1與P2執行更新程序時,簽章產生器160都會更新所屬區塊210所對應的簽章數值。換言之,對於區塊210所對應的簽章數值來說,上述的更新程序會重複執行兩次。具體來說,更新程序至少包括兩個步驟:第一,將特定像素相對於所屬區塊的座標資訊加至所屬區塊所對應的簽章數值當中;第二,更新簽章數值中的至少一個位元。 For each specific pixel, the signature generator 160 executes an update procedure. Here, specific pixels P1 and P2 are taken as examples. The specific pixels P1 and P2 belong to the block 210. When the update process is performed on the specific pixels P1 and P2, the signature generator 160 will update the signature value corresponding to the block 210 to which it belongs. In other words, for the signature value corresponding to the block 210, the above-mentioned update procedure will be repeatedly performed twice. Specifically, the update process includes at least two steps: first, the coordinate information of a specific pixel relative to the block to which it belongs is added to the signature value corresponding to the block; second, at least one of the signature values is updated Bit.

在上述第一步驟中,特定像素相對於區塊的座標資訊例如包括X座標與Y座標,這兩個座標是以區塊中的 左上角作為原點。舉例來說,以座標O作為原點,則特定像素P1的座標資訊例如表示為(3,4),而特定像素P2的座標資訊例如表示為(6,8)。在一些實施例中,X座標與Y座標的數值並不會超過255,因此可以各以8個位元來表示X座標與Y座標,為了一般化的表示,以下將這兩個座標表示為xlocal與ylocal。圖3繪示了將座標資訊加至簽章數值的示意圖,請參照圖3,上述“將座標資訊加至簽章數值”的一個實施例是先將簽章數值向左或向右位移多個位元,在圖3的例子中是向右位移16個位元,接下來將座標xlocal與座標ylocal加入至簽章數值當中,此運算可以表示為以下方程式(1)。 In the above first step, the coordinate information of the specific pixel with respect to the block includes, for example, the X coordinate and the Y coordinate, and these two coordinates use the upper left corner of the block as the origin. For example, with the coordinate O as the origin, the coordinate information of the specific pixel P1 is represented as (3,4), and the coordinate information of the specific pixel P2 is represented as (6,8), for example. In some embodiments, the values of the X coordinate and the Y coordinate do not exceed 255. Therefore, the X coordinate and the Y coordinate can be represented by 8 bits each. For generalization, the two coordinates are represented as x below. local and y local . FIG. 3 is a schematic diagram of adding coordinate information to a signature value. Please refer to FIG. 3. An embodiment of the above-mentioned “adding coordinate information to a signature value” is to first shift the signature value to the left or right by a plurality of times. The bit is shifted 16 bits to the right in the example in FIG. 3. Next, the coordinates x local and y local are added to the signature value. This operation can be expressed as the following equation (1).

LFSRi=(y local ≪8+x local )≪16+LFSR i ≫16…(1) LFSR i = ( y local ≪8 + x local ) ≪16 + LFSR i ≫16… (1)

其中LFSR i 表示第i個區塊所對應的簽章數值,<<表示向左位移,>>表示向右位移,+表示OR邏輯運算。在上述實施例中是將座標加入至最高有效位元(most significant bit,MSB),但在一些實施例中,也可以先將簽章數值向左位移多個位元以後,將座標xlocal與ylocal加入至最低有效位元(least significant bit,LSB)中。或者,當區塊的寬度與高度更大或更小時,座標xlocal、ylocal所需的位元數可能更多或更少,對應地簽章數值可以位移更少或更多個位元。在一些實施例中,也可以不位移簽章數值,直接將簽章數值中部份的位元替換為座標xlocal、ylocal。本發明也不限制要座標xlocal、ylocal在新的簽章數值中的位置,例如座標xlocal、ylocal的位元也可以分散地存在新的簽章數值當中。在一些實施例中,上述“將座標資訊加至簽章數 值”的步驟也可以是將簽章數值與座標xlocal、ylocal做任意的邏輯運算,例如加減乘除、邏輯AND、邏輯OR等運算,只要根據座標xlocal、ylocal來變更簽章數值中的位元即可,本發明並不在此限。 Among them, LFSR i represents the value of the signature corresponding to the i-th block, << represents a shift to the left, >> represents a shift to the right, and + represents an OR logic operation. In the above embodiments, the coordinates are added to the most significant bit (MSB), but in some embodiments, the signature value can also be shifted to the left by multiple bits, and the coordinates x local and y local is added to the least significant bit (LSB). Alternatively, when the width and height of the block are larger or smaller, the number of bits required for the coordinates x local and y local may be more or less, and correspondingly, the value of the signature may be shifted by less or more bits. In some embodiments, it is also possible to directly replace some bits in the signature value with coordinates x local and y local without shifting the signature value. The present invention also does not limit the positions of the coordinates x local and y local in the new signature value. For example, the bits of the coordinates x local and y local may be dispersed in the new signature value. In some embodiments, the above-mentioned step of "adding coordinate information to the signature value" may also be to perform arbitrary logical operations on the signature value and the coordinates x local and y local , such as addition, subtraction, multiplication and division, logical AND, logical OR and other operations. As long as the bits in the signature value are changed according to the coordinates x local and y local , the present invention is not limited thereto.

接下來說明上述更新程序的第二個步驟:更新簽章數值中的至少一個位元。請參照圖4,在一些實施例中,可從簽章數值中取得S個位元,其中S為正整數,例如為12、13、14或其他數值。接下來,將這S個位元執行一邏輯運算,並將簽章數值中的一個位元更新為邏輯運算的結果,此步驟可執行U次,用以更新簽章數值中的U個位元,其中U為正整數,例如為8、9、10或其他數值。在以下的實施例中,上述的邏輯運算為互斥或運算(XOR operation),但在其他實施例中也可以改為AND或是OR運算,本發明並不在此限。在一些實施例中,當U大於1時,每次更新位元時是取得不同的S個位元來更新不同的位元。舉例來說,圖4繪示了兩次的更新,圖4的上半部是取得位元b30、b28...b1等13個位元來做互斥或運算,並將位元b31更新為互斥或運算的結果。圖4的下半部是取得位元b31、b29...b0等13個位元來做互斥或運算,並將位元b16更新為互斥或運算的結果。換個角度來說,此步驟可表示為以下方程式(2)。 Next, the second step of the above update procedure is described: updating at least one bit in the signature value. Referring to FIG. 4, in some embodiments, S bits can be obtained from the signature value, where S is a positive integer, such as 12, 13, 14 or other values. Next, perform a logical operation on the S bits and update a bit in the signature value to the result of the logical operation. This step can be performed U times to update the U bits in the signature value , Where U is a positive integer, such as 8, 9, 10, or other values. In the following embodiments, the above-mentioned logical operation is a mutual exclusion or operation (XOR operation), but in other embodiments, it may be changed to AND or OR operation, and the present invention is not limited thereto. In some embodiments, when U is greater than 1, each time a bit is updated, different S bits are obtained to update different bits. For example, FIG. 4 shows two updates. The upper part of FIG. 4 is to obtain 13 bits such as bits b 30 , b 28 ... b 1 for mutual exclusion or operation, and the bits b 31 is updated as the result of a mutex or operation. The lower half of FIG. 4 is to obtain 13 bits such as bits b 31 , b 29 ... b 0 for mutual exclusion or operation, and update bit b 16 to the result of the mutual exclusion or operation. To put it another way, this step can be expressed as the following equation (2).

LFSRi[b u ]=LFSR i [b s,1]⊕LFSR i [b s,2]...⊕LFSR i [bs,S]…(2) LFSR i [ b u ] = LFSR i [ b s , 1 ] ⊕ LFSR i [ b s , 2 ] ... ⊕ LFSR i [b s, S ] ... (2)

在此,⊕是互斥或運算,bs,1...bs,S代表所選擇的位元,例如在圖4的上半部中bs,1...bs,S等於b30、b28...b1,圖4的下半部中bs,1...bs,S等於b31、b29...b0。bu 表示所要更新的位元,方程式(2)可執行U次,每次執行時所選擇的位元bs可不相同,例如在圖4的上半部中bu等於b31,在圖4的下半部中bu等於b16。請參照圖3與圖4,在一些實施例中,由於簽章數值LFSR i 會往右位移16個位元,因此在上述的方程式(2)中,位元bu只會是位元b31~b16的其中之一。在一些實施例中,圖4中的各個更新是平行運算,即所選擇的位元是舊的簽章數值中的位元,而不是新的簽章數值中的位元。舉例來說,圖4下半部所選擇的位元b31是在圖4上半部更新尚未被執行之前的位元。然而,在一些實施例中,圖4中各個更新也可以是依序執行,即圖4下半部所選擇的位元b31是在圖4上半部更新執行完以後的位元,本發明並不在此限。 Here, ⊕ is a mutually exclusive OR operation, and b s, 1 ... b s, S represents the selected bit. For example, in the upper part of Fig. 4, b s, 1 ... b s, S is equal to b. 30, b 28 ... b in the lower half b s 1, FIG. 4, 1 ... b s, S is equal to b 31, b 29 ... b 0 . b u represents the bit to be updated. Equation (2) can be executed U times. The bit b s selected during each execution may be different. For example, b u is equal to b 31 in the upper half of FIG. 4. B u is equal to b 16 in the lower half of. Please refer to FIG. 3 and FIG. 4. In some embodiments, since the signature value LFSR i is shifted to the right by 16 bits, in the above equation (2), the bit b u can only be the bit b 31 ~ b 16 of them. In some embodiments, each update in FIG. 4 is a parallel operation, that is, the selected bit is a bit in the old signature value, rather than a bit in the new signature value. For example, the bit b 31 selected in the lower half of FIG. 4 is a bit before the update in the upper half of FIG. 4 has not been performed. However, in some embodiments, each update in FIG. 4 may be performed sequentially, that is, the bit b 31 selected in the lower half of FIG. 4 is a bit after the update is performed in the upper half of FIG. 4. The present invention Not limited to this.

請參照圖1B,對於目前畫面200中每個特定像素都執行上述的更新程序以後,目前畫面200的多個簽章數值181會傳送至暫存器180與比較器170。此外,暫存器180中則儲存有前畫面的簽章數值,而前畫面的簽章數值182也會傳送至比較器170。比較器170會判斷目前畫面的簽章數值181是否相同於前畫面的簽章數值182,若兩者不相同,則表示目前畫面為動作畫面。值得注意的是,由於每個區塊都有對應的簽章數值,因此比較器170可比較相同區塊所對應的兩個簽章數值,以判斷此區塊是否有動作發生。舉例來說,請參照圖5,在時間軸上,前畫面500位於目前畫面200之前,前畫面具有區塊510,其中區塊510在畫面500中的相對位置是相同於區塊210在畫面200中的相對位置。值得 一提的是,在初始化目前畫面200中的簽章數值以及前畫面500的該簽章數值時,對於位置相同的區塊所對應的兩個簽章數值是採用相同的預設值。此外,在對區塊210與區塊510執行上述的方程式(1)、(2)時,所有的變數都完全相同,例如位移相同的位元數、採用相同的正整數U、S,採用相同的位元b u 、bs,1...bs,S等,如此一來區塊210與區塊510所對應的兩個簽章數值才可以相互比較。 Please refer to FIG. 1B. After the above-mentioned update procedure is performed for each specific pixel in the current frame 200, the multiple signature values 181 of the current frame 200 are transmitted to the register 180 and the comparator 170. In addition, the register 180 stores the signature value of the previous screen, and the signature value 182 of the previous screen is also transmitted to the comparator 170. The comparator 170 determines whether the signature value 181 of the current picture is the same as the signature value 182 of the previous picture. If they are not the same, it indicates that the current picture is an action picture. It is worth noting that since each block has a corresponding signature value, the comparator 170 can compare the two signature values corresponding to the same block to determine whether an action has occurred in this block. For example, please refer to FIG. 5. On the time axis, the front picture 500 is located before the current picture 200. The front picture has a block 510. The relative position of the block 510 in the picture 500 is the same as the block 210 in the picture 200. Relative position in. It is worth mentioning that when initializing the signature value in the current picture 200 and the signature value in the previous picture 500, the same signature value is used for the two signature values corresponding to the block with the same position. In addition, when the above equations (1) and (2) are performed on the block 210 and the block 510, all variables are completely the same, such as the same number of bits shifted, the same positive integers U, S, and the same Bits b u , b s, 1 ... b s, S, etc., so that the two signature values corresponding to block 210 and block 510 can be compared with each other.

如果區塊210所對應的簽章數值不相同於區塊510所對應的簽章數值,表示在區塊210、510內有動作發生,得到此判斷結果以後,便可以再執行額外的程序,例如時序控制器110可以執行過驅動(over drive)的處理。然而,本發明並不限制後續要執行那些運算或程序。 If the value of the signature corresponding to block 210 is not the same as the value of the signature corresponding to block 510, it means that an action occurred in blocks 210 and 510. After obtaining this judgment result, you can execute additional procedures, such as The timing controller 110 may perform an over drive process. However, the present invention is not limited to those operations or programs to be executed subsequently.

圖6是根據一實施例繪示動作偵測方法的流程圖,請參照圖6,在步驟601,取得目前畫面並判斷目前畫面中是否有特定像素。在步驟602,判斷目前畫面中是否還有特定像素。若步驟602的結果為是,在步驟603中,將特定像素的座標資訊加至對應的簽章數值當中。在步驟604中,更新對應的簽章數值中的至少一個位元。步驟603與步驟604又被稱為更新程序。步驟602~步驟604會重複執行,直到所有特定像素都處理完,如果步驟602的結果為否,則比較目前畫面的簽章數值與一前畫面的簽章數值以判斷目前畫面是否為動作畫面(步驟605)。然而,圖6中各步驟已詳細說明如上,在此便不再贅述。值得注意的是,圖6中各步驟可以實作為多個程式碼或是電路,本發明並不在此限。 此外,圖6的方法可以搭配以上實施例使用,也可以單獨使用。換言之,圖6的各步驟之間也可以加入其他的步驟。 FIG. 6 is a flowchart illustrating a motion detection method according to an embodiment. Referring to FIG. 6, in step 601, a current frame is obtained and it is determined whether there are specific pixels in the current frame. In step 602, it is determined whether there are any specific pixels in the current frame. If the result of step 602 is yes, in step 603, the coordinate information of the specific pixel is added to the corresponding signature value. In step 604, at least one bit in the corresponding signature value is updated. Steps 603 and 604 are also called update procedures. Steps 602 to 604 are repeated until all specific pixels have been processed. If the result of step 602 is no, the signature value of the current picture is compared with the signature value of a previous picture to determine whether the current picture is an action picture ( Step 605). However, the steps in FIG. 6 have been described in detail above, and will not be repeated here. It should be noted that each step in FIG. 6 can be implemented as multiple codes or circuits, and the present invention is not limited thereto. In addition, the method in FIG. 6 may be used in combination with the above embodiments, or may be used alone. In other words, other steps may be added between the steps in FIG. 6.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。 Although the present invention has been disclosed as above with the examples, it is not intended to limit the present invention. Any person with ordinary knowledge in the technical field can make some modifications and retouching without departing from the spirit and scope of the present invention. The protection scope of the present invention shall be determined by the scope of the attached patent application.

Claims (8)

一種動作偵測電路,包括一偵測單元,用以取得一目前畫面並判斷該目前畫面中是否有特定像素,該動作偵測電路包括:一簽章產生器,用以對每一個該特定像素執行一更新程序,該更新程序包括:將該特定像素的座標資訊加至對應的一簽章數值當中;以及更新對應的該簽章數值中的至少一位元;以及一比較器,用以比較該目前畫面的該簽章數值與一前畫面的簽章數值以判斷該目前畫面是否為動作畫面,其中該目前畫面包括多個區塊,每一該些區塊具有對應的該簽章數值,該在初始化該目前畫面的該些簽章數值以及該前畫面的該些簽章數值時,對於位置相同的該區塊所對應的該些簽章數值是採用相同的一預設值。A motion detection circuit includes a detection unit for obtaining a current picture and judging whether there is a specific pixel in the current picture. The motion detection circuit includes: a signature generator for each specific pixel An update procedure is executed, the update procedure includes: adding coordinate information of the specific pixel to a corresponding signature value; and updating at least one bit in the corresponding signature value; and a comparator for comparing The signature value of the current picture and the signature value of a previous picture to determine whether the current picture is an action picture, where the current picture includes a plurality of blocks, each of which has a corresponding signature value, When initializing the signature values of the current picture and the signature values of the previous picture, a same preset value is used for the signature values corresponding to the block with the same position. 如申請專利範圍第1項所述之動作偵測電路,其中在該更新程序中,該簽章產生器用以將對應的該簽章數值向左或向右位移多個位元,並將該特定像素相對於所屬區塊的X座標與Y座標加入至對應的該簽章數值當中。The motion detection circuit according to item 1 of the scope of patent application, wherein in the update procedure, the signature generator is used to shift the corresponding value of the signature to the left or right by multiple bits, and The X coordinate and Y coordinate of the pixel relative to the block it belongs to are added to the corresponding signature value. 如申請專利範圍第2項所述之動作偵測電路,其中在該更新程序中,該簽章產生器更新對應的該簽章數值中的該至少一位元的步驟包括:從該簽章數值中取得S個位元,其中S為大於1的正整數;將該S個位元執行一邏輯運算;以及將該簽章數值中的該至少一位元更新為該邏輯運算的結果。The motion detection circuit according to item 2 of the scope of patent application, wherein in the updating procedure, the step of the signature generator updating the at least one bit of the corresponding signature value includes: from the signature value Obtain S bits, where S is a positive integer greater than 1; perform a logical operation on the S bits; and update the at least one bit in the signature value to the result of the logical operation. 如申請專利範圍第3項所述之動作偵測電路,其中在該更新程序中,該簽章數值中被更新的該至少一位元的個數大於1,該簽章產生器在更新該簽章數值中的不同位元時,是取得不同的S個位元。The motion detection circuit according to item 3 of the scope of patent application, wherein in the update procedure, the number of the at least one bit updated in the signature value is greater than 1, and the signature generator is updating the signature When different bits in the chapter value, different S bits are obtained. 一種動作偵測方法,適用於一動作偵測電路,該動作偵測方法包括:取得一目前畫面並判斷該目前畫面中是否有特定像素:對每一個該特定像素執行一更新程序,該更新程序包括:將該特定像素的座標資訊加至對應的一簽章數值當中;以及更新對應的該簽章數值中的至少一位元;比較該目前畫面的該簽章數值與一前畫面的簽章數值以判斷該目前畫面是否為動作畫面,其中該目前畫面包括多個區塊,每一該些區塊具有對應的該簽章數值;以及在初始化該目前畫面的該些簽章數值以及該前畫面的該些簽章數值時,對於位置相同的該區塊所對應的該些簽章數值是採用相同的一預設值。A motion detection method is applicable to a motion detection circuit. The motion detection method includes: obtaining a current picture and determining whether there are specific pixels in the current picture: performing an update procedure for each specific pixel, and the update procedure Including: adding coordinate information of the specific pixel to a corresponding signature value; and updating at least one bit of the corresponding signature value; comparing the signature value of the current picture with the signature of a previous picture Value to determine whether the current picture is an action picture, where the current picture includes multiple blocks, each of which has the corresponding signature value; and the value of the signature and the previous value of the current picture are initialized When the signature values on the screen are the same, a preset value is used for the signature values corresponding to the same block. 如申請專利範圍第5項所述之動作偵測方法,更包括:在該更新程序中,將對應的該簽章數值向左或向右位移多個位元,並將該特定像素相對於所屬區塊的X座標與Y座標加入至對應的該簽章數值當中。The motion detection method described in item 5 of the scope of patent application, further comprising: in the update procedure, shifting the corresponding value of the signature to the left or right by multiple bits, and relative to the specific pixel The X and Y coordinates of the block are added to the corresponding signature value. 如申請專利範圍第6項所述之動作偵測方法,其中在該更新程序中更新對應的該簽章數值中的該至少一位元的步驟包括:從該簽章數值中取得S個位元,其中S為大於1的正整數;將該S個位元執行邏輯運算;以及將該簽章數值中的該至少一位元更新為該邏輯運算的結果。The motion detection method according to item 6 of the scope of patent application, wherein the step of updating the at least one bit in the corresponding signature value in the update procedure includes: obtaining S bits from the signature value Where S is a positive integer greater than 1; performing a logical operation on the S bits; and updating the at least one bit in the signature value to the result of the logical operation. 如申請專利範圍第7項所述之動作偵測方法,其中在該更新程序中,被更新的該至少一位元的個數大於1,該動作偵測方法還包括:在更新該簽章數值中的不同位元時,是取得不同的S個位元。The motion detection method according to item 7 of the scope of patent application, wherein in the update procedure, the number of the at least one bit updated is greater than 1, and the motion detection method further includes: updating the value of the signature When different bits are in, different S bits are obtained.
TW107111932A 2018-04-03 2018-04-03 Method and circuit for detection motion TWI661721B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW107111932A TWI661721B (en) 2018-04-03 2018-04-03 Method and circuit for detection motion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW107111932A TWI661721B (en) 2018-04-03 2018-04-03 Method and circuit for detection motion

Publications (2)

Publication Number Publication Date
TWI661721B true TWI661721B (en) 2019-06-01
TW201943285A TW201943285A (en) 2019-11-01

Family

ID=67764278

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107111932A TWI661721B (en) 2018-04-03 2018-04-03 Method and circuit for detection motion

Country Status (1)

Country Link
TW (1) TWI661721B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200826686A (en) * 2006-12-11 2008-06-16 Univ Nat Kaohsiung Applied Sci Method of authentication and restoration for images
TW201015446A (en) * 2008-10-02 2010-04-16 Silverbrook Res Pty Ltd Coding pattern comprising columns and rows of coordinate data
TW201535276A (en) * 2008-03-03 2015-09-16 Videoiq Inc Object matching for tracking, indexing, and search

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200826686A (en) * 2006-12-11 2008-06-16 Univ Nat Kaohsiung Applied Sci Method of authentication and restoration for images
TW201535276A (en) * 2008-03-03 2015-09-16 Videoiq Inc Object matching for tracking, indexing, and search
TW201015446A (en) * 2008-10-02 2010-04-16 Silverbrook Res Pty Ltd Coding pattern comprising columns and rows of coordinate data

Also Published As

Publication number Publication date
TW201943285A (en) 2019-11-01

Similar Documents

Publication Publication Date Title
US9390511B2 (en) Temporally coherent segmentation of RGBt volumes with aid of noisy or incomplete auxiliary data
WO2019041842A1 (en) Image processing method and device, storage medium and computer device
JP6369150B2 (en) Filtering method and filtering apparatus for recovering anti-aliasing edge
US9286653B2 (en) System and method for increasing the bit depth of images
CN111179159B (en) Method and device for eliminating target image in video, electronic equipment and storage medium
JP2016095842A (en) Method and system for processing video content
CN111192190A (en) Method and device for eliminating image watermark and electronic equipment
JP2017168079A (en) Writing board detection and correction
Bagiwa et al. Chroma key background detection for digital video using statistical correlation of blurring artifact
US9704271B2 (en) Method and apparatus for image blurring
TW201335889A (en) Method for processing edges in an image and image processing apparatus
TWI661721B (en) Method and circuit for detection motion
JP2020174320A (en) Video restoration system, video restoration method, and program
JP5983749B2 (en) Image processing apparatus, image processing method, and image processing program
US10755387B2 (en) Firefly detection using a plurality of buffers
JP6624061B2 (en) Image processing method, image processing device, and recording medium for storing image processing program
CN110415264B (en) Motion detection circuit and method
US11494944B2 (en) Automatic low contrast detection
Xiong et al. Underwater image enhancement by Gaussian curvature filter
KR20220167524A (en) Image enhancement method and apparatus
JP6775146B2 (en) Video restoration system, video restoration method and program
TWI493476B (en) Image processing circuit and method thereof
TWI740145B (en) Method, electrical device, and computer program product for hiding information and protecting privacy of video
US11544828B2 (en) Automatic occlusion detection
JP2019153966A (en) Video recovery system, video recovery method and program