TW201424366A - Method for correcting rolling shutter effect and image processing device using the same - Google Patents

Method for correcting rolling shutter effect and image processing device using the same Download PDF

Info

Publication number
TW201424366A
TW201424366A TW101145834A TW101145834A TW201424366A TW 201424366 A TW201424366 A TW 201424366A TW 101145834 A TW101145834 A TW 101145834A TW 101145834 A TW101145834 A TW 101145834A TW 201424366 A TW201424366 A TW 201424366A
Authority
TW
Taiwan
Prior art keywords
image
capturing unit
matrix
image capturing
point
Prior art date
Application number
TW101145834A
Other languages
Chinese (zh)
Inventor
Yen-Hao Chiao
Shang-Hong Lai
Ming-Feng Chiang
Original Assignee
Novatek Microelectronics Corp
Nat Univ Tsing Hua
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, Nat Univ Tsing Hua filed Critical Novatek Microelectronics Corp
Priority to TW101145834A priority Critical patent/TW201424366A/en
Publication of TW201424366A publication Critical patent/TW201424366A/en

Links

Landscapes

  • Image Analysis (AREA)
  • Studio Devices (AREA)

Abstract

A method for correcting rolling shutter effect is provided. The method includes: obtaining multiple feature point pairs in images, wherein each of the feature point pair corresponds to a motion vector; obtaining sampling points between two consecutive images in time; setting a moving velocity and an angular velocity of an image capturing unit at every sampling point as variables; obtaining multiple estimating motion vector according to the variables, a focal length of the image capturing unit, and row locations where the feature point pairs are located; executing an optimization algorithm according to a difference between the motion vectors and the estimating motion vectors, for calculating the moving velocity and the angle velocity corresponding to the variable; changing the locations of pixels in an image according to the moving velocity and the angle velocity. Therefore, the rolling shutter effect in an image is removed.

Description

滾動快門的校正方法與影像處理裝置 Rolling shutter correction method and image processing device

本發明是有關於一種的滾動快門效應的校正方法以及使用此方法的影像處理裝置。 The present invention relates to a method of correcting a rolling shutter effect and an image processing apparatus using the same.

一般來說,一個照相機的感光元件可以用互補金氧半導體(Complementary Metal-Oxide Semiconductor,CMOS)或是電荷耦合元件(Charge Coupled Device,CCD)來實作。然而,當使用互補金氧半導體時,每一個時間點僅會曝光一個列上的感光元件。因此,當在拍攝時若照相機或是被拍攝的物體在移動,會產生所謂的滾動快門效應。 In general, the photosensitive element of a camera can be implemented by a complementary metal-oxide semiconductor (CMOS) or a charge coupled device (CCD). However, when a complementary MOS is used, only one photosensitive element on one column is exposed at each time point. Therefore, if the camera or the object being photographed is moving while shooting, a so-called rolling shutter effect is produced.

圖1是繪示滾動快門效應的示意圖。 Figure 1 is a schematic diagram showing the rolling shutter effect.

如圖1所示,照相機110是要拍攝物體120。理想上在所拍攝的影像中,物體120應該為直立(如物體130)。在此假設照相機110拍攝一張影像的時間為S。而在拍攝物體120的過程中,照相機110於時間點nS所在的位置和時間點(n+1)S所在的位置並不相同。因此,在實際上所拍攝的影像140中,物體150會是傾斜的。這是因為在時間點nS時,照相機110擷取到了物體120的上半部,當照相機110要擷取物體120的下半部時,照相機110的位置已經改變。換句話說,如果被拍攝的物體快速的移動,則每一個列上的感光元件所取得的像素值都會有一個水平的位移。因此,要如何校正拍攝時產生的滾動快門效應,為 此領域技術人員所關心的議題。 As shown in FIG. 1, the camera 110 is to photograph an object 120. Ideally, in the captured image, object 120 should be upright (e.g., object 130). It is assumed here that the time taken by the camera 110 to take an image is S. In the process of photographing the object 120, the position where the camera 110 is located at the time point nS and the position at which the time point (n+1)S is located are not the same. Thus, in the image 140 actually captured, the object 150 will be tilted. This is because at the time point nS, the camera 110 captures the upper half of the object 120, and when the camera 110 is about to capture the lower half of the object 120, the position of the camera 110 has changed. In other words, if the object being photographed moves quickly, the pixel values obtained by the photosensitive elements on each column will have a horizontal displacement. Therefore, how to correct the rolling shutter effect generated during shooting is an issue of interest to those skilled in the art.

本發明的實施例提供一種滾動快門效應的校正方法與使用此方法的影像處理裝置,可以校正拍攝時所產生的滾動快門效應。 Embodiments of the present invention provide a method of correcting a rolling shutter effect and an image processing apparatus using the same, which can correct a rolling shutter effect generated at the time of shooting.

本發明一實施例提出一種滾動快門效應的校正方法,適用於一影像處理裝置。此方法包括:取得一視訊中多個影像的多個特徵點配對,其中每一個特徵點配對是對應於一動作向量,並且此視訊是由一影像擷取單元所擷取;從兩張時間上相鄰的影像之間,取得多個取樣點,其中每一個取樣點是對應於一列位置;將影像擷取單元在每一個取樣點上的至少一個移動速度與至少一個角速度設定為多個變數;根據所述的變數、影像擷取單元的焦距以及特徵點配對所在的列位置,取得特徵點配對的多個估測動作向量;根據動作向量與估測動作向量之間的差距執行最佳化演算法,以計算出變數所對應的移動速度與所述角速度;根據所述的移動速度與角速度改變一個影像中多個像素的位置,藉此產生第一校正影像。 An embodiment of the present invention provides a method for correcting a rolling shutter effect, which is applicable to an image processing apparatus. The method includes: acquiring a plurality of feature point pairs of a plurality of images in a video, wherein each feature point pairing corresponds to an action vector, and the video is captured by an image capturing unit; Between adjacent images, a plurality of sampling points are obtained, wherein each sampling point corresponds to a column position; at least one moving speed and at least one angular velocity of the image capturing unit at each sampling point are set to a plurality of variables; Obtaining a plurality of estimated motion vectors of feature point pairing according to the variable, the focal length of the image capturing unit, and the column position where the feature points are paired; performing an optimization algorithm according to the difference between the motion vector and the estimated motion vector a method for calculating a moving speed corresponding to the variable and the angular velocity; and changing a position of the plurality of pixels in one image according to the moving speed and the angular velocity, thereby generating a first corrected image.

在一實施例中,上述的特徵點配對包括一第二特徵點配對。第二特徵點配對包括一第二特徵點與一第三特徵點。第二特徵點的位置為(x1,y1),而第三特徵點的位置為(x2,y2)。第二特徵點配對所對應的動作向量為(x2-x1, y2-y1)。上述根據變數、影像擷取單元的焦距以及特徵點配對所在的列位置,取得特徵點配對的估測動作向量的步驟包括:根據以下方程式(1)計算第二特徵點配對所對應的估測動作向量的x分量,並且根據以下方程式(2)計算對應第二特徵點配對所對應的估測動作向量的y分量。 In an embodiment, the feature point pairing described above includes a second feature point pairing. The second feature point pairing includes a second feature point and a third feature point. The position of the second feature point is (x 1 , y 1 ), and the position of the third feature point is (x 2 , y 2 ). The motion vector corresponding to the second feature point pairing is (x 2 -x 1 , y 2 -y 1 ). The step of obtaining the estimated action vector of the feature point pairing according to the variable, the focal length of the image capturing unit, and the column position where the feature point is paired includes: calculating the estimated action corresponding to the second feature point pairing according to the following equation (1) The x component of the vector, and the y component corresponding to the estimated motion vector corresponding to the second feature point pairing is calculated according to the following equation (2).

其中S1與S2為實數,S1表示第二特徵點所在的列位置所對應的取樣點,S2表示第三特徵點所在的列位置所對應的取樣點。f為影像擷取單元的焦距。Z為影像的景深。為影像擷取單元在取樣點i在x方向上的移動速度。為影像擷取單元在取樣點i在y方向上的移動速度。為影像擷取單元在取樣點i在x軸上的角速度,為影像擷取單元在取樣點i在y軸上的角速度。為影像擷取單元在取樣點i在z軸上的角速度。 Where S1 and S2 are real numbers, S1 represents a sampling point corresponding to the column position where the second feature point is located, and S2 represents a sampling point corresponding to the column position where the third feature point is located. f is the focal length of the image capturing unit. Z is the depth of field of the image. The moving speed of the image capturing unit in the x direction at the sampling point i. The moving speed of the image capturing unit in the y direction at the sampling point i. For the angular velocity of the image capture unit on the x-axis at the sampling point i, The angular velocity of the image capture unit at the sampling point i on the y-axis. The angular velocity of the image capture unit at the sampling point i on the z-axis.

在一實施例中,上述根據動作向量與估測動作向量之間的差距執行最佳化演算法的步驟包括;根據動作向量的x分量與y分量產生多個限制;根據估測動作向量產生第一矩陣,其中第一矩陣中列的數目大於第一矩陣中行的數目;以及根據這些限制減去第一矩陣與變數相乘的結果產生一個成本函數,並且根據此成本函數執行最佳化演算法以取得變數所對應的移動速度與角速度。 In an embodiment, the step of performing the optimization algorithm according to the difference between the motion vector and the estimated motion vector comprises: generating a plurality of constraints according to the x component and the y component of the motion vector; generating the first according to the estimated motion vector a matrix, wherein the number of columns in the first matrix is greater than the number of rows in the first matrix; and subtracting the result of multiplying the first matrix by the variable according to the constraints to generate a cost function, and performing an optimization algorithm according to the cost function To obtain the moving speed and angular velocity corresponding to the variable.

在一實施例中,上述的成本函數還包括變數與一微分 矩陣相乘的結果。微分矩陣中第j行第j列的值為-1,微分矩陣中第j列第j+1行的值為1,並且j為正整數。 In an embodiment, the cost function described above further includes a variable and a differential The result of multiplying the matrix. The value of the jth column of the jth row in the differential matrix is -1, and the value of the j+1th row of the jth column in the differential matrix is 1, and j is a positive integer.

在一實施例中,一第二矩陣與一第三矩陣的相乘為所述第一矩陣。第二矩陣的第i個列中,僅有從第5(i-1)+1行至第5i行的值不為0,並且第二矩陣的第i個行是對應到所述限制中的第i個限制,其中i為正整數。第i個限制是對應於第三矩陣的第(5(i-1)+1)列至第5i列,並且第(5(i-1)+1)列至第5i列中非對應至第i個限制的取樣區間的值為0。 In an embodiment, multiplying a second matrix by a third matrix is the first matrix. In the i-th column of the second matrix, only the value from the 5th (i-1)th to the 5thth row is not 0, and the ith row of the second matrix corresponds to the limit The i-th limit, where i is a positive integer. The i-th limit is corresponding to the (5(i-1)+1)th column to the 5thth column of the third matrix, and the (5(i-1)+1)th column to the 5thth column are not corresponding to the The value of the i-limited sampling interval is zero.

在一實施例中,上述的多個影像包括一第二影像。第二影像中第一像素的位置為(xrs,yrs)。上述根據變數所對應的移動速度與角速度改變一影像中像素的位置,藉此產生第一校正影像的步驟包括:根據方程式(3)計算第一像素在x方向上的位移px,並且根據方程式(4)計算第一像素在y方向上的位移py,其中px與py為實數。 In an embodiment, the plurality of images includes a second image. The position of the first pixel in the second image is (x rs , y rs ). The step of changing the position of the pixel in an image according to the moving speed and the angular velocity corresponding to the variable, thereby generating the first corrected image comprises: calculating the displacement p x of the first pixel in the x direction according to the equation (3), and according to the equation (4) Calculating the displacement p y of the first pixel in the y direction, where p x and p y are real numbers.

其中n與S為正整數,第二影像是從時間點nS開始曝光至時間點(n+1)S。a為浮點數。vx(t)為影像擷取單元在時間點t在x方向上的移動速度。vy(t)為影像擷取單元在時間點t在y方向上的移動速度。wx(t)為影像擷取單元在時間點t在x軸上的角速度。wy(t)為影像擷取單元在時間點t在y軸上的角速度。wz(t)為影像擷取單元在時間點t在z軸上的角速度。 Where n and S are positive integers, and the second image is exposed from time point nS to time point (n+1)S. a is a floating point number. v x (t) is the moving speed of the image capturing unit in the x direction at time t. v y (t) is the moving speed of the image capturing unit in the y direction at the time point t. w x (t) is the angular velocity of the image capturing unit on the x-axis at time t. w y (t) is the angular velocity of the image capturing unit on the y-axis at time t. w z (t) is the angular velocity of the image capturing unit on the z-axis at time t.

在一實施例中,上述的校正方法更包括:根據移動速度與角速度產生一擷取軌跡;對擷取軌跡執行濾波器運算;將一平滑擷取軌跡設定為第二變數,根據第二變數與經過濾波器運算的擷取軌跡之間的第二差距產生一成本函數;以及根據此成本函數執行第二最佳化演算法,藉此取得平滑擷取軌跡。 In an embodiment, the above correction method further comprises: generating a trajectory according to the moving speed and the angular velocity; performing a filter operation on the captured trajectory; setting a smooth trajectory as the second variable, according to the second variable A second difference between the captured trajectories of the filter operation produces a cost function; and a second optimization algorithm is performed according to the cost function, thereby obtaining a smooth trajectory.

在一實施例中,上述的校正方法更包括:根據平滑擷取軌跡與擷取軌跡之間的差距改變第一校正影像中像素的位置,藉此產生第二校正影像。 In an embodiment, the above correction method further comprises: changing a position of a pixel in the first corrected image according to a gap between the smooth captured track and the captured track, thereby generating a second corrected image.

以另外一個角度來說,本發明提出一種影像處理裝置,包括記憶體與處理器。記憶體中儲存有多個指令。處理器耦接至記憶體,用以執行指令以執行多個步驟:取得一視訊中多個影像的多個特徵點配對,其中每一個特徵點配對是對應於一動作向量,並且此視訊是由一影像擷取單元所擷取;從兩張時間上相鄰的影像之間,取得多個取樣點,其中每一個取樣點是對應於一列位置;將影像擷取單元在每一個取樣點上的至少一個移動速度與至少一個角速度設定為多個變數;根據所述的變數、影像擷取單元的焦距以及特徵點配對所在的列位置,取得特徵點配對的多個估測動作向量;根據動作向量與估測動作向量之間的差距執行最佳化演算法,以計算出變數所對應的移動速度與所述角速度;根據所述的移動速度與角速度改變一個影像中多個像素的位置,藉此產生第一校正影像。 In another aspect, the present invention provides an image processing apparatus including a memory and a processor. There are multiple instructions stored in the memory. The processor is coupled to the memory for executing instructions to perform a plurality of steps: acquiring a plurality of feature point pairs of the plurality of images in a video, wherein each feature point pairing corresponds to an action vector, and the video is Obtaining by an image capturing unit; obtaining a plurality of sampling points from two temporally adjacent images, wherein each sampling point corresponds to a column position; and the image capturing unit is at each sampling point The at least one moving speed and the at least one angular velocity are set to a plurality of variables; according to the variable, the focal length of the image capturing unit, and the column position where the feature points are paired, the plurality of estimated motion vectors of the feature point pairing are obtained; according to the motion vector Performing an optimization algorithm with the estimated motion vector to calculate a moving speed corresponding to the variable and the angular velocity; and changing a position of the plurality of pixels in one image according to the moving speed and the angular velocity, thereby A first corrected image is produced.

在一實施例中,上述的特徵點配對包括一第二特徵點 配對。第二特徵點配對包括一第二特徵點與一第三特徵點。第二特徵點的位置為(x1,y1),而第三特徵點的位置為(x2,y2)。第二特徵點配對所對應的動作向量為(x2-x1,y2-y1)。上述根據變數、影像擷取單元的焦距以及特徵點配對所在的列位置,取得特徵點配對的估測動作向量的步驟包括:根據上述方程式(1)計算第二特徵點配對所對應的估測動作向量的x分量,並且根據上述方程式(2)計算對應第二特徵點配對所對應的估測動作向量的y分量。 In an embodiment, the feature point pairing described above includes a second feature point pairing. The second feature point pairing includes a second feature point and a third feature point. The position of the second feature point is (x 1 , y 1 ), and the position of the third feature point is (x 2 , y 2 ). The action vector corresponding to the second feature point pairing is (x 2 -x 1 , y 2 -y 1 ). The step of obtaining the estimated action vector of the feature point pairing according to the variable, the focal length of the image capturing unit, and the column position where the feature point is paired includes: calculating the estimated action corresponding to the second feature point pairing according to the above equation (1) The x component of the vector, and the y component corresponding to the estimated motion vector corresponding to the second feature point pairing is calculated according to the above equation (2).

在一實施例中,上述根據動作向量與估測動作向量之間的差距執行最佳化演算法的步驟包括;根據動作向量的x分量與y分量產生多個限制;根據估測動作向量產生第一矩陣,其中第一矩陣中列的數目大於第一矩陣中行的數目;以及根據這些限制減去第一矩陣與變數相乘的結果產生一個成本函數,並且根據此成本函數執行最佳化演算法以取得變數所對應的移動速度與角速度。 In an embodiment, the step of performing the optimization algorithm according to the difference between the motion vector and the estimated motion vector comprises: generating a plurality of constraints according to the x component and the y component of the motion vector; generating the first according to the estimated motion vector a matrix, wherein the number of columns in the first matrix is greater than the number of rows in the first matrix; and subtracting the result of multiplying the first matrix by the variable according to the constraints to generate a cost function, and performing an optimization algorithm according to the cost function To obtain the moving speed and angular velocity corresponding to the variable.

在一實施例中,上述的成本函數還包括變數與一微分矩陣相乘的結果。微分矩陣中第j行第j列的值為-1,微分矩陣中第j列第j+1行的值為1,並且j為正整數。 In an embodiment, the cost function described above further includes a result of multiplying the variable by a differential matrix. The value of the jth column of the jth row in the differential matrix is -1, and the value of the j+1th row of the jth column in the differential matrix is 1, and j is a positive integer.

在一實施例中,一第二矩陣與一第三矩陣的相乘為所述第一矩陣。第二矩陣的第i個列中,僅有從第5(i-1)+1行至第5i行的值不為0,並且第二矩陣的第i個行是對應到所述限制中的第i個限制,其中i為正整數。第i個限制是對應於第三矩陣的第(5(i-1)+1)列至第5i列,並且第(5(i-1)+1)列至第5i列中非對應至第i個限制的取樣區間的 值為0。 In an embodiment, multiplying a second matrix by a third matrix is the first matrix. In the i-th column of the second matrix, only the value from the 5th (i-1)th to the 5thth row is not 0, and the ith row of the second matrix corresponds to the limit The i-th limit, where i is a positive integer. The i-th limit is corresponding to the (5(i-1)+1)th column to the 5thth column of the third matrix, and the (5(i-1)+1)th column to the 5thth column are not corresponding to the i limited sampling interval The value is 0.

在一實施例中,上述的多個影像包括一第二影像。第二影像中第一像素的位置為(xrs,yrs)。上述根據變數所對應的移動速度與角速度改變一影像中像素的位置,藉此產生第一校正影像的步驟包括:根據上述方程式(3)計算第一像素在x方向上的位移px,並且根據上述方程式(4)計算第一像素在y方向上的位移py,其中px與py為實數。 In an embodiment, the plurality of images includes a second image. The position of the first pixel in the second image is (x rs , y rs ). The step of changing the position of the pixel in an image according to the moving speed and the angular velocity corresponding to the variable, thereby generating the first corrected image comprises: calculating the displacement p x of the first pixel in the x direction according to the above equation (3), and according to Equation (4) above calculates the displacement p y of the first pixel in the y direction, where p x and p y are real numbers.

在一實施例中,上述的多個步驟更包括:根據移動速度與角速度產生一擷取軌跡;對擷取軌跡執行濾波器運算;將一平滑擷取軌跡設定為第二變數,根據第二變數與經過濾波器運算的擷取軌跡之間的第二差距產生一成本函數;以及根據此成本函數執行第二最佳化演算法,藉此取得平滑擷取軌跡。 In an embodiment, the multiple steps further include: generating a capture trajectory according to the moving speed and the angular velocity; performing a filter operation on the captured trajectory; setting a smooth trajectory as the second variable, according to the second variable A second difference between the extracted trajectory and the filtered trajectory produces a cost function; and a second optimization algorithm is performed based on the cost function, thereby obtaining a smooth trajectory.

在一實施例中,上述的多個步驟更包括:根據平滑擷取軌跡與擷取軌跡之間的差距改變第一校正影像中像素的位置,藉此產生第二校正影像。 In an embodiment, the multiple steps further include: changing a position of a pixel in the first corrected image according to a gap between the smooth captured track and the captured track, thereby generating a second corrected image.

基於上述,本發明實施例所提出的校正方法與影像處理裝置,可以用最佳化演算法取得影像擷取單元的移動速度與角速度,進而改變影像中像素的位置。如此一來,可以校正影像中的滾動快門效應。 Based on the above, the correction method and the image processing apparatus proposed by the embodiments of the present invention can obtain the moving speed and the angular velocity of the image capturing unit by using an optimization algorithm, thereby changing the position of the pixels in the image. In this way, the rolling shutter effect in the image can be corrected.

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

圖2是根據一實施例所繪示的影像處理裝置的示意圖。 2 is a schematic diagram of an image processing apparatus according to an embodiment.

請參照圖2,影像處理裝置200包括了處理器210與記憶體220與影像擷取單元230。在本實施例中,影像處理裝置200為一個攝影機。然而,在其他實施例中,影像處理裝置200也可以為個人電腦、智慧型手機、平板電腦、筆記型電腦、伺服器或是照相機。 Referring to FIG. 2 , the image processing apparatus 200 includes a processor 210 , a memory 220 , and an image capturing unit 230 . In the present embodiment, the image processing apparatus 200 is a camera. However, in other embodiments, the image processing device 200 can also be a personal computer, a smart phone, a tablet, a notebook, a server, or a camera.

處理器210是用以控制影像處理裝置200的整體運作。例如,處理器210為中央處理單元(Central Processing Unit,CPU)、微處理器(Microprocessor)、數位訊號處理器(Digital Signal Processor,DSP)、可程式化控制器、特殊應用積體電路(Application Specific Integrated Circuits,ASIC)或可程式化邏輯裝置(Programmable Logic Device,PLD)。 The processor 210 is used to control the overall operation of the image processing apparatus 200. For example, the processor 210 is a central processing unit (CPU), a microprocessor (Microprocessor), a digital signal processor (DSP), a programmable controller, and a special application integrated circuit (Application Specific). Integrated Circuits (ASIC) or Programmable Logic Device (PLD).

而記憶體220可為動態隨機存取記憶體(dynamic random access memory,DRAM)、靜態隨機存取記憶體(static random access memory,SRAM)、快閃記憶體(Flash)、或其他的記憶體。在此實施例中,記憶體220中還儲存了多個指令。 The memory 220 can be a dynamic random access memory (DRAM), a static random access memory (SRAM), a flash memory, or other memory. In this embodiment, a plurality of instructions are also stored in the memory 220.

影像擷取單元230是用以取得一段視訊,並且此視訊中會包括多個影像。例如,影像擷取單元230包括了互補金氧半導體、快門與透鏡。影像擷取單元230會將這些影像傳送給處理器210,而處理器210會執行記憶體220中的指令來去除這些影像中的滾動快門效應。 The image capturing unit 230 is configured to acquire a piece of video, and the video includes a plurality of images. For example, the image capturing unit 230 includes a complementary MOS, a shutter, and a lens. The image capture unit 230 will transmit the images to the processor 210, and the processor 210 will execute instructions in the memory 220 to remove the rolling shutter effects in the images.

圖3是根據一實施例繪示取得特徵點配對的示意圖。 FIG. 3 is a schematic diagram showing the acquisition of feature point pairing according to an embodiment.

請參照圖3,影像擷取單元230所取得的視訊中包括了影像310、320與330。處理器210會取得影像310、320與330中的多個特徵點配對。例如,處理器210會執行尺度不變特徵轉換(Scale-Invariant Feature Transform,SIFT)來取得多個特徵點(feature point)以及每一個特徵點所對應的特徵值。處理器210會比對這些特徵值,藉此找到不同影像中相配對的特徵點。例如,影像310包括了特徵點311~313,影像320包括了特徵點321~325,而影像330包括了特徵點331、334與335。其中,特徵點311是配對(match)於特徵點321,特徵點312是配對於特徵點322,特徵點313是配對於特徵點323。相對應的兩個特徵點會形成一個特徵點配對。例如,特徵點311與特徵點321會形成特徵點配對341。每一個特徵點配對是對應於一個動作向量(motion vector),並且一個特徵點配對所對應的兩個特徵點是表示一個物體的兩個位置。例如,某一個物體是從特徵點311的位置移動到特徵點321的位置。 Referring to FIG. 3, the video captured by the image capturing unit 230 includes images 310, 320, and 330. The processor 210 will acquire a plurality of feature points in the images 310, 320 and 330. For example, the processor 210 performs a Scale-Invariant Feature Transform (SIFT) to obtain a plurality of feature points and feature values corresponding to each feature point. The processor 210 compares the feature values to find matching feature points in different images. For example, image 310 includes feature points 311-313, image 320 includes feature points 321-325, and image 330 includes feature points 331, 334 and 335. The feature point 311 is matched to the feature point 321 , the feature point 312 is matched to the feature point 322 , and the feature point 313 is matched to the feature point 323 . The corresponding two feature points form a feature point pairing. For example, the feature point 311 and the feature point 321 form a feature point pair 341. Each feature point pairing corresponds to a motion vector, and two feature points corresponding to one feature point pairing represent two positions of an object. For example, an object moves from the position of the feature point 311 to the position of the feature point 321 .

在本實施例中,處理器210會在每兩個時間上相鄰的畫面之間取得200個特徵點配對。然而,在其他實施例中,處理器210也可以取得數目更多或更少的特徵點配對,本發明並不在此限。此外,處理器210也可以用光學流(optical flow)或動作估測(motion estimation)的方式取得特徵點配對,本發明並不在此限。 In this embodiment, the processor 210 obtains 200 feature point pairs between adjacent pictures every two times. However, in other embodiments, the processor 210 may also obtain a greater or lesser number of feature point pairs, and the invention is not limited thereto. In addition, the processor 210 may also acquire feature point pairing by optical flow or motion estimation, and the present invention is not limited thereto.

圖4是根據一實施例繪示取得相鄰兩畫面之間的取樣點的示意圖。 4 is a schematic diagram showing the acquisition of sampling points between adjacent two pictures according to an embodiment.

在圖3中,特徵點配對341所對應的動作向量是在兩個相鄰的畫面之間。然而,在計算滾動快門效應所造成的一個動作向量時,此動作向量必須有更高的時間解析度(temporal resolution)。請參照圖3與圖4,畫面310是在時間點410所擷取,畫面320是在時間點420所擷取,並且畫面330是在時間點430所擷取。曲線450代表的是一個物體真正的位移。然而,特徵點配對341所代表的動作向量是曲線450經過”量化”的結果。在此實施例中,處理器210會從兩個時間上相鄰的畫面之間取得多個取樣點,並且每一個取樣點是對應到一個列位置。例如,時間點410與時間點420之間會被分割為多個取樣點441~446。而每一個取樣點441~446會對應至影像320中的一個列位置。舉例來說,若一張影像共有560個列位置,則取樣點441則對應於第80個列位置,亦即在取樣點441時,影像擷取單元230正在曝光第80個列位置上的感光元件。處理器210會計算出影像擷取單元230在每一個取樣點441~446的移動速度與角速度。 In FIG. 3, the motion vector corresponding to the feature point pair 341 is between two adjacent pictures. However, when calculating an action vector caused by the rolling shutter effect, this motion vector must have a higher temporal resolution. Referring to FIG. 3 and FIG. 4, the screen 310 is captured at a time point 410, the screen 320 is captured at a time point 420, and the screen 330 is captured at a time point 430. Curve 450 represents the true displacement of an object. However, the motion vector represented by feature point pair 341 is the result of curve 450 being "quantized". In this embodiment, the processor 210 takes multiple sample points from two temporally adjacent pictures, and each sample point corresponds to a column position. For example, time point 410 and time point 420 are divided into a plurality of sampling points 441-446. Each of the sampling points 441-446 corresponds to a column position in the image 320. For example, if an image has a total of 560 column positions, the sampling point 441 corresponds to the 80th column position, that is, at the sampling point 441, the image capturing unit 230 is exposing the photosensitive position at the 80th column position. element. The processor 210 calculates the moving speed and angular velocity of the image capturing unit 230 at each of the sampling points 441 to 446.

圖5是根據一實施例繪示計算估測動作向量的示意圖。 FIG. 5 is a schematic diagram of calculating an estimated motion vector according to an embodiment.

請參照圖5,在此假設畫面310是從時間點nS曝光到時間點(n+1)S,而畫面320是從時間點(n+1)S曝光到時間點(n+2)S。其中n為正整數,S表示曝光一張畫面所需的時間。特徵點311在畫面310的位置為(x1,y1),而特徵點320在畫面320中的位置為(x2,y2)。因此,特徵點311的 曝光時間可以表示為(n+ay1)S,並且特徵點321的曝光時間可以表示為(n+1+ay2)S。其中a為一個浮點數,其值為1/img_rows。img_rows為一個正整數,其表示為一個畫面中列的個數。另一方面,影像擷取單元230在時間點t,在x方向上的的移動速度可以表示為vx(t),並且在y方向上的移動速度可以表示為vy(t)。影像擷取單元230在時間點t,於x軸上的角速度可以表示為wx(t);在時間點t,於y軸上的角速度可以表示為wy(t);並且在時間點t,於z軸上的角速度為wz(t)。而特徵點311至特徵點321之間的動作向量可以表示(x2-x1,y2-y1),其可以透過下列方程式(1)與方程式(2)計算。 Referring to FIG. 5, it is assumed here that the screen 310 is exposed from the time point nS to the time point (n+1)S, and the picture 320 is exposed from the time point (n+1)S to the time point (n+2)S. Where n is a positive integer and S is the time required to expose a picture. The position of the feature point 311 on the screen 310 is (x1, y1), and the position of the feature point 320 in the screen 320 is (x2, y2). Therefore, the exposure time of the feature point 311 can be expressed as (n+ay 1 )S, and the exposure time of the feature point 321 can be expressed as (n+1+ay 2 )S. Where a is a floating point number and its value is 1/img_rows. Img_rows is a positive integer that is represented as the number of columns in a frame. On the other hand, at the time point t, the moving speed of the image capturing unit 230 in the x direction can be expressed as v x (t), and the moving speed in the y direction can be expressed as v y (t). The image capturing unit 230 at the time point t, the angular velocity on the x-axis can be expressed as w x (t); at the time point t, the angular velocity on the y-axis can be expressed as w y (t); and at the time point t The angular velocity on the z-axis is w z (t). And a motion vector between the feature points 311 to 321 may represent a feature point (x 2 -x 1, y 2 -y 1), which can be calculated through the following equation (1) and Equation (2).

其中,f表示影像擷取單元230的焦距。Z為視訊中影像的景深,在此假設為常數。以上方程式(1)與(2)是以積分的形式計算。然而,由於畫面310與畫面320之間已被分割為多個取樣點,因此可以用離散的形式來計算動作向量。當以離散的形式計算時,時間點(n+ay1)S可以被表示為取樣點S1,其是對應於特徵點311的列位置y1。而時間點(n+1+ay2)S可以被表示為取樣點S2,其是對應於特徵點321的列位置y2。藉此,方程式(1)與(2)可以改寫為方程式(3)與(4)。 Where f denotes the focal length of the image capturing unit 230. Z is the depth of field of the video in the video, and is assumed to be a constant here. The above equations (1) and (2) are calculated in the form of integrals. However, since the picture 310 and the picture 320 have been divided into a plurality of sampling points, the motion vector can be calculated in a discrete form. When calculated in discrete form, the time point (n+ay 1 )S can be represented as a sampling point S1 which is the column position y 1 corresponding to the feature point 311. And the time point (n+1+ay 2 )S can be expressed as the sampling point S2 which is the column position y 2 corresponding to the feature point 321 . Thereby, equations (1) and (2) can be rewritten as equations (3) and (4).

其中,表示影像擷取單元230在取樣點i時在x方向的移動速度。表示影像擷取單元230在取樣點i時在y方向的移動速度。表示影像擷取單元230在取樣點i時在x軸上的的角速度。表示影像擷取單元230在取樣點i時在y軸上的角速度。表示影像擷取單元230在取樣點i時在z軸上的角速度。 among them, Indicates the moving speed of the image capturing unit 230 in the x direction at the sampling point i. Indicates the moving speed of the image capturing unit 230 in the y direction at the sampling point i. Indicates the angular velocity of the image capturing unit 230 on the x-axis when sampling point i. Indicates the angular velocity of the image capturing unit 230 on the y-axis when sampling point i. Indicates the angular velocity of the image capturing unit 230 on the z-axis when sampling point i.

處理器210會將影像擷取單元230在每一個取樣點上的移動速度與角速度設定為多個變數。根據這些變數、影像擷取單元230的焦距以及上述特徵點配對所在的列位置,處理器210會取得這些特徵點配對的多個估測動作向量。舉例來說,影像擷取單元230的每一個取樣點上的兩個移動速度與三個角速度可以被表示為5個變數。方程式(3)與(4)中等式的左邊是已知的條件,其可以透過特徵點311與特徵點321的位置取得。而方程式(3)與(4)中等式的右邊是由多個變數、焦距f以及列位置對應的取樣點S1與S2所組成,在此稱所計算出的動作向量亦為估測動作向量。理論上,等式左邊所計算出的動作向量與等式右邊所計算出的估測動作向量應該要相等。因此,處理器210會根據這些動作向量與估測動作向量之間的差距執行一個最佳化演算法,以計算出這些變數所對應的移動速度與角速度。 The processor 210 sets the moving speed and angular velocity of the image capturing unit 230 at each sampling point to a plurality of variables. Based on the variables, the focal length of the image capturing unit 230, and the column position at which the feature points are paired, the processor 210 obtains a plurality of estimated motion vectors paired by the feature points. For example, the two moving speeds and the three angular velocities at each sampling point of the image capturing unit 230 can be expressed as five variables. The left side of equations (3) and (4) is a known condition that can be obtained by the position of feature point 311 and feature point 321 . The right side of equations (3) and (4) is composed of a plurality of variables, a focal length f, and sampling points S1 and S2 corresponding to the column positions. Here, the calculated motion vector is also an estimated motion vector. In theory, the motion vector calculated on the left side of the equation should be equal to the estimated motion vector calculated on the right side of the equation. Therefore, the processor 210 performs an optimization algorithm based on the difference between the motion vectors and the estimated motion vectors to calculate the moving speed and angular velocity corresponding to the variables.

舉例來說,每一個取樣點的5個變數可以表示為向量 。若從兩個相鄰的畫面之間取得n個取樣點,則這兩個畫面之間會有5n個變數。此外,若一次要計算k張畫面之間的移動速度與角速度,則變數的數目會是5kn。在此設定5kn=5N,其中k、n、N為正整數。這些變數可以表示為一個向量x,其維度是5N-乘-1(5N-by-1)。 For example, 5 variables per sample point can be represented as vectors . If n sample points are taken from between two adjacent pictures, there will be 5n variables between the two pictures. In addition, if the moving speed and angular velocity between k pictures are to be calculated at a time, the number of variables will be 5kn. Here, 5kn=5N is set, where k, n, and N are positive integers. These variables can be expressed as a vector x whose dimensions are 5N-by-1 (5N-by-1).

在一實施例中,處理器210可只使用x方向的移動速度與一個軸上的角速度。本發明並不限制上述的變數要包括哪些移動速度與角速度。 In an embodiment, processor 210 may only use the speed of movement in the x direction and the angular velocity on one axis. The present invention does not limit which moving speeds and angular velocities to be included in the above variables.

另一方面,處理器210會根據動作向量的x分量與y分量產生多個限制(constraints),並且這些限制的個數會大於變數的個數(5N)。在此實施例中,若兩張畫面之間取得m個特徵點配對(即,m個動作向量),則會得到2m個限制(對應於x分量與y分量)。另外,若一次取得k張畫面,則會有2mk個限制。在此設定2mk=M,並且M>5N,其中m、M為正整數。這些限制可以被表示為一個向量b,其維度是M-乘-1。 On the other hand, the processor 210 generates a plurality of constraints based on the x and y components of the motion vector, and the number of these limits is greater than the number of variables (5N). In this embodiment, if m feature point pairs (i.e., m motion vectors) are obtained between two pictures, 2m limits (corresponding to the x component and the y component) are obtained. In addition, if k frames are taken at a time, there will be 2mk limits. Here, 2mk=M is set, and M>5N, where m and M are positive integers. These limits can be expressed as a vector b whose dimensions are M-by-1.

處理器210會根據上述計算估測動作向量的過程一個矩陣A(亦稱第一矩陣)。此矩陣A中列的數目會大於矩陣A中行的數目。處理器210會根據上述的限制b減去矩陣A與變數b的相乘的結果產生一個成本函數,並且根據此成本函數執行最佳化演算法以取得移動速度與角速度。 The processor 210 evaluates the motion vector according to the above calculation by a matrix A (also referred to as a first matrix). The number of columns in this matrix A will be greater than the number of rows in matrix A. The processor 210 generates a cost function according to the above-described limit b minus the multiplication of the matrix A and the variable b, and performs an optimization algorithm according to the cost function to obtain the moving speed and the angular velocity.

舉例來說,矩陣A與變數x相乘的結果即是估測動作向量的x分量與y分量。則最佳化演算法中的成本函數可以表示為以下的方程式(5)。其中矩陣A的維度是M-乘 -5N。 For example, the result of multiplying the matrix A by the variable x is to estimate the x and y components of the motion vector. Then the cost function in the optimization algorithm can be expressed as the following equation (5). Where the dimension of matrix A is M-multiplication -5N.

矩陣A會被分為兩個矩陣,表示為A=ADAI。其中矩陣AD(亦稱第二矩陣)表示為方程式(6),其維度為Mx5M。 The matrix A will be divided into two matrices, denoted as A=A D A I . The matrix A D (also known as the second matrix) is expressed as equation (6) and its dimension is Mx5M.

是一個維度為1-乘-5的向量,表示上述方程式(3)或(4)中第i個限制所對應的係數。具體來說,第i個限制是對應到兩個特徵點,其中一個特徵點的位置是表示為(,)。而對於x分量的限制來說,是表示為以下方程式(7)。而對於y分量的限制來說,是表示為以下方程式(8)。 Is a vector with a dimension of 1-by-5, representing the coefficient corresponding to the ith limit in equation (3) or (4) above. Specifically, the i-th limit corresponds to two feature points, and the position of one feature point is expressed as ( , ). And for the x component limit, It is expressed as the following equation (7). And for the limitation of the y component, It is expressed as the following equation (8).

值得注意的是,方程式(7)中的5個係數是對應於方程式(3)中等式右邊的係數;而方程式(8)中的5個係數是對應於方程式(4)中等式右邊的係數。換言之,在矩陣AD的第i個列是對應到限制b中的第i個限制。而在矩陣AD的第i個列中,僅有從第5(i-1)+1行至第5i行的值不為0,其餘為0。而這五個不為0的值便是第i個限制所對應的係數(如方程式(7)或(8))。 It is worth noting that the five coefficients in equation (7) are coefficients corresponding to the right side of equation (3); and the five coefficients in equation (8) are coefficients corresponding to the right side of equation (4). In other words, the ith column in the matrix A D corresponds to the ith limit in the limit b. In the i-th column of the matrix A D , only the value from the 5th (i-1)th to the 5thth row is not 0, and the rest is 0. The five values that are not zero are the coefficients corresponding to the ith limit (such as equation (7) or (8)).

另一方面,矩陣AI的維度為5M-乘-5N,第i個限制 是對應於矩陣AI的第(5(i-1)+1)列至第5i列。而第i個限制所對應的列乘上變數x會成為5-乘-1的向量(如圖6所示)。並且第(5(i-1)+1)列至第5i列中非對應至第i個限制的一個取樣區間的值為0。具體來說,若第i個限制所對應的特徵點配對的兩個特徵點分別是在取樣點S1與取樣點S2上(如同方程式(3)與(4)),取樣點S1與取樣點S2會形成一個取樣區間。圖6中在N個取樣點中,第S1個取樣點至第S1個取樣點的係數不會為0。而w1是對應至取樣點S1;w2是對應至取樣點S2。並且,w1與w2是介於0與1之間的實數。例如,若兩個畫面之間的取樣點有6個,而一個畫面有560個列位置,取樣點S1是對應至40個列位置(介於第0個列位置與第80個列位置之間),則w1會是0.5。 On the other hand, the dimension of the matrix A I is 5M-by-5N, and the i-th constraint is the (5(i-1)+1)th column to the 5thth column corresponding to the matrix A I . The column multiplied by the variable i of the i-th limit will become a 5-by-1 vector (as shown in Figure 6). And the value of one sampling interval which is not corresponding to the i-th limit in the (5(i-1)+1)th column to the 5ith column is 0. Specifically, if the feature points of the i-th constraint corresponding to the feature points are respectively at the sampling point S1 and the sampling point S2 (as in equations (3) and (4)), the sampling point S1 and the sampling point S2 A sampling interval will be formed. In the N sampling points in FIG. 6, the coefficients of the S1th sampling point to the S1th sampling point are not 0. And w 1 corresponds to the sampling point S1; w 2 corresponds to the sampling point S2. Also, w 1 and w 2 are real numbers between 0 and 1. For example, if there are 6 sampling points between two screens and one screen has 560 column positions, the sampling point S1 corresponds to 40 column positions (between the 0th column position and the 80th column position). ), then w 1 will be 0.5.

在建立出矩陣A以後,處理器210便可以根據方程式(5)計算出變數x。由於計算出的變數x在時間上應該有平滑的變化。因此在另一實施例中,上述方程式(5)所示的成本函數還可包括變數x與一個微分矩陣相乘的結果。例如,處理器210可用以下方程式(9)作為最佳化演算法的成本函數。 After the matrix A is established, the processor 210 can calculate the variable x according to equation (5). Since the calculated variable x should have a smooth change in time. Therefore, in another embodiment, the cost function shown in the above equation (5) may further include a result of multiplying the variable x by a differential matrix. For example, processor 210 may use equation (9) below as a cost function to optimize the algorithm.

G為微分矩陣,其中第j行第j列的值為-1,第j列第j+1行的值為1(即,G(j,j)=-1並且G(j,j+1)=1)。j為正整數。λ為一個實數,可由使用者自訂。 G is a differential matrix in which the value of the jth column of the jth row is -1, and the value of the j+1th row of the jth column is 1 (ie, G(j,j)=-1 and G(j,j+1) ) = 1). j is a positive integer. λ is a real number and can be customized by the user.

在根據上述方程式(9)計算出變數x(即,所有取樣點上 的移動速度以及角速度)以後。處理器210會根據變數x所對應的移動速度與角速度改變一個影像中多個像素的位置,藉此產生一個第一校正影像。以影像310為例,假設一個第一像素在未校正前的位置是在(xrs,yrs),則校正後的位置會是(xgs,ygs)=(xrs,yrs)+(px,py)。其中px為第一像素在x方向上的位移;而py是第一像素在y方向上的位移。處理器210會根據影像擷取裝置230的焦距、移動速度以及角速度計算出位移px與位移py。例如,處理器210可以根據以下方程式(10)與(11)求得位移px與位移py,其中px與py為實數。 After the variable x (i.e., the moving speed at all sampling points and the angular velocity) is calculated according to the above equation (9). The processor 210 changes the position of the plurality of pixels in one image according to the moving speed and the angular velocity corresponding to the variable x, thereby generating a first corrected image. Taking image 310 as an example, assuming that the position of a first pixel before uncorrection is (x rs , y rs ), the corrected position will be (x gs , y gs ) = (x rs , y rs ) + (p x , p y ). Where p x is the displacement of the first pixel in the x direction; and p y is the displacement of the first pixel in the y direction. The processor 210 calculates the displacement p x and the displacement p y according to the focal length, the moving speed, and the angular velocity of the image capturing device 230. For example, the processor 210 can determine the displacement p x and the displacement p y according to the following equations (10) and (11), where p x and p y are real numbers.

值得注意的是,方程式(10)與(11)是將所有的像素都移動到曝光時間為(n+0.5)S所對應的位置。藉此,一張影像中所有的像素都會被移動到相同曝光時間的位置,而使得可以去除滾動快門效應。在此,經過方程式(10)與(11)運算過後的影像亦被稱為第一校正影像。 It is worth noting that equations (10) and (11) move all pixels to a position corresponding to the exposure time of (n+0.5)S. Thereby, all the pixels in one image are moved to the same exposure time position, so that the rolling shutter effect can be removed. Here, the image after the operations of equations (10) and (11) is also referred to as a first corrected image.

在一實施例中,處理器210會根據計算出的移動速度與角速度來使第一校正影像更平穩(stabilize)。具體來說,處理器210會移動速度與角速度產生一擷取軌跡,此擷取軌跡表示影像擷取單元230因為被使用者移動所造成的移動軌跡。例如,處理器210會根據以下方程式(12)計算出擷取軌跡,其中n為表示時間的實數。 In an embodiment, the processor 210 stabilizes the first corrected image based on the calculated moving speed and angular velocity. Specifically, the processor 210 generates a capture track by the moving speed and the angular velocity, and the captured track represents a moving track caused by the image capturing unit 230 being moved by the user. For example, the processor 210 calculates the captured trajectory according to the following equation (12). , where n is a real number representing time.

其中vu(i)表示影像擷取單元230在取樣點i的移動速度或是角速度。u為代表角速度或是移動速度的符號,例如,若u=x則vx表示影像擷取單元230在x方向的移動速度。若此擷取軌跡在時間上的變動很大,會使得播放的視訊有抖動的現象。因此,處理器210會對擷取軌跡執行一個濾波器運算,並且將一個平滑擷取軌跡設定為第二變數。處理器210會根據此第二變數與經過濾波器運算的擷取軌跡之間的差距(亦稱第二差距)產生一個成本函數,並且對此成本函數一個第二最佳化演算法,藉此取得該平滑擷取軌跡。例如,此成本函數可以用以下方程式(13)表示。 Where v u (i) represents the moving speed or angular velocity of the image capturing unit 230 at the sampling point i. u is a symbol representing an angular velocity or a moving velocity. For example, if u = x, v x represents the moving speed of the image capturing unit 230 in the x direction. If the captured trajectory changes greatly in time, the played video will be shaken. Therefore, the processor 210 performs a filter operation on the captured track and sets a smooth captured track as the second variable. The processor 210 generates a cost function according to the difference between the second variable and the extracted trajectory calculated by the filter (also called the second gap), and a second optimization algorithm for the cost function, thereby Get the smooth capture track. For example, this cost function can be represented by the following program (13).

其中h為一個濾波器,例如為高斯濾波器。λ 1λ 2為實數,▽為梯度向量(gradient vector),而▽2為拉普拉斯算子(Laplace operator)。則為平滑擷取軌跡。值得注意的是,平滑擷取軌跡是一個向量,代表每一個取樣點上的移動速度或角速度。平滑擷取軌跡中第n個元素(element)可以表示為Where h is a filter, such as a Gaussian filter. λ 1 and λ 2 are real numbers, ▽ is a gradient vector, and ▽ 2 is a Laplace operator. Then it is smooth to capture the track. It is worth noting that the smooth snap track is a vector representing the speed of movement or angular velocity at each sample point. The nth element in the smoothed trace can be expressed as .

在計算出平滑擷取軌跡以後,處理器210會根據平滑擷取軌跡與擷取軌跡之間的差距來改變第一校正影像中像素的位置,藉此產生第二校正影像。在此假 設第一校正影像的像素可以表示為I gs (x,y),而第二校正影像的像素可以表示為I gss (x',y')。平滑擷取軌跡與擷取軌跡之間的差距可以表示為以下方程式(14);第一校正影像中像素的位置與第二校正影像中像素的位置之間的關係可以表示為以下方程式(15);而處理器210會根據以下方程式(16)與(17)來產生第二校正影像。值得注意的是,當u表示為移動速度與角速度時,△t u (n)亦可被改寫為△t x (n)、△t y (n)、△r x (n)、△r y (n)以及△r z (n)。 Calculating a smooth capture trajectory In the future, the processor 210 will capture the trajectory according to the smoothing. And capture track The difference between the pixels in the first corrected image is changed, thereby generating a second corrected image. The first correction is assumed that image pixels may be expressed as I gs (x, y), the pixel of the second calibration image may be expressed as I gss (x ', y' ). Smooth capture track And capture track The difference between the two can be expressed as the following equation (14); the relationship between the position of the pixel in the first corrected image and the position of the pixel in the second corrected image can be expressed as the following equation (15); and the processor 210 is based on the following Equations (16) and (17) produce a second corrected image. It is worth noting that when u is expressed as the moving speed and the angular velocity, Δ t u ( n ) can also be rewritten as Δ t x ( n ), Δ t y ( n ), Δ r x ( n ), Δ r y ( n ) and Δ r z ( n ).

圖7是根據一實施例繪示滾動快門效應的校正方法的流程圖。 7 is a flow chart illustrating a method of correcting a rolling shutter effect, in accordance with an embodiment.

請參照圖7,在步驟S702中,取得一視訊中多個影像的多個特徵點配對。其中每一個特徵點配對是對應於一個動作向量,並且視訊是由一影像擷取單元所擷取。在步驟S704中,從兩張時間上相鄰的影像之間取得多個取樣點,其中每一個取樣點是對應於一列位置。在步驟S706中,將影像擷取單元在每一個取樣點上的至少一移動速度與至少一角速度設定為多個變數。在步驟S708中,根據這些變數、影像擷取單元的焦距以及所述特徵點配對所在的列 位置,取得特徵點配對的多個估測動作向量。在步驟S710中,根據動作向量與估測動作向量之間的差距執行最佳化演算法,以計算出變數所對應的移動速度與角速度。在步驟S712中,根據變數所對應的移動速度與角速度改變一個影像中多個像素的位置,藉此產生一校正影像。在步驟S714中,根據計算出的移動速度與角速度來使第一校正影像更平穩,藉此產生第二校正影像。然而,圖7中各步驟已詳細說明如上,在此便不再贅述。值得注意的是,步驟S714是一個選擇性的步驟,亦即在一實施例中步驟S714可以被省略。 Referring to FIG. 7, in step S702, a plurality of feature point pairs of a plurality of images in a video are acquired. Each of the feature point pairs corresponds to an action vector, and the video is captured by an image capturing unit. In step S704, a plurality of sampling points are taken from two temporally adjacent images, wherein each sampling point corresponds to a column of positions. In step S706, at least one moving speed and at least one angular velocity of the image capturing unit at each sampling point are set as a plurality of variables. In step S708, according to the variables, the focal length of the image capturing unit and the column in which the feature points are paired Position, obtain multiple estimated motion vectors of feature point pairing. In step S710, an optimization algorithm is performed according to the difference between the motion vector and the estimated motion vector to calculate the moving speed and the angular velocity corresponding to the variable. In step S712, the position of the plurality of pixels in one image is changed according to the moving speed and the angular velocity corresponding to the variable, thereby generating a corrected image. In step S714, the first corrected image is made smoother based on the calculated moving speed and angular velocity, thereby generating a second corrected image. However, the steps in FIG. 7 have been described in detail above, and will not be described again here. It is to be noted that step S714 is an optional step, that is, step S714 may be omitted in an embodiment.

在一實施例中,處理器210所執行的各個步驟可以被實作為一或多個電路。本發明並不限制要用軟體或是硬體的形式來實作。 In an embodiment, the various steps performed by processor 210 may be implemented as one or more circuits. The invention is not limited to being implemented in the form of a soft body or a hard body.

綜上所述,本發明實施例所提出的滾動快門的校正方法與影像處理裝置,可以取得高時間解析度的取樣點,並且透過最佳化演算法計算出每一個取樣點的移動速度與角速度。藉由這些移動速度與角速度,可以校正滾動快門效應,並且可以使視訊更平穩。 In summary, the method for correcting rolling shutters and the image processing apparatus according to the embodiments of the present invention can obtain sampling points with high time resolution, and calculate the moving speed and angular velocity of each sampling point through an optimization algorithm. . With these moving speeds and angular velocities, the rolling shutter effect can be corrected and the video can be made smoother.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,故本發明之保護範圍當視後附之申請專利範圍所界定者為準。 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.

110‧‧‧照相機 110‧‧‧ camera

120、130、150‧‧‧物體 120, 130, 150 ‧ ‧ objects

200‧‧‧影像處理裝置 200‧‧‧Image processing device

210‧‧‧處理器 210‧‧‧ processor

220‧‧‧記憶體 220‧‧‧ memory

230‧‧‧影像擷取單元 230‧‧‧Image capture unit

140、310、320、330‧‧‧影像 140, 310, 320, 330‧ ‧ images

311~313、321~325、331、334、335‧‧‧特徵點 311~313, 321~325, 331, 334, 335‧ ‧ feature points

341‧‧‧特徵點配對 341‧‧‧ Feature Point Pairing

410、420、430‧‧‧時間點 410, 420, 430‧‧‧ time points

441~446‧‧‧取樣點 441~446‧‧‧ sampling points

450‧‧‧曲線 450‧‧‧ Curve

S702、S704、S706、S708、S710、S712、S714‧‧‧滾動快門的校正方法的步驟 Steps of S702, S704, S706, S708, S710, S712, S714‧‧‧ rolling shutter correction method

圖1是繪示滾動快門效應的示意圖。 Figure 1 is a schematic diagram showing the rolling shutter effect.

圖2是根據一實施例所繪示的影像處理裝置的示意圖。 2 is a schematic diagram of an image processing apparatus according to an embodiment.

圖3是根據一實施例繪示取得特徵點配對的示意圖。 FIG. 3 is a schematic diagram showing the acquisition of feature point pairing according to an embodiment.

圖4是根據一實施例繪示取得相鄰兩畫面之間的取樣點的示意圖。 4 is a schematic diagram showing the acquisition of sampling points between adjacent two pictures according to an embodiment.

圖5是根據一實施例繪示計算估測動作向量的示意圖。 FIG. 5 is a schematic diagram of calculating an estimated motion vector according to an embodiment.

圖6是根據一實施例繪示部份的第三矩陣的示意圖。 FIG. 6 is a schematic diagram showing a third matrix of a portion according to an embodiment.

圖7是根據一實施例繪示滾動快門效應的校正方法的流程圖。 7 is a flow chart illustrating a method of correcting a rolling shutter effect, in accordance with an embodiment.

S702、S704、S706、S708、S710、S712、S714‧‧‧滾動快門的校正方法的步驟 Steps of S702, S704, S706, S708, S710, S712, S714‧‧‧ rolling shutter correction method

Claims (16)

一種滾動快門效應的校正方法,適用於一影像處理裝置,包括:取得一視訊中多個影像的多個特徵點配對,其中每一該些特徵點配對是對應於一動作向量,並且該視訊是由一影像擷取單元所擷取;從該些影像中兩張時間上相鄰的影像之間,取得多個取樣點,其中每一該些取樣點是對應於一列位置;將該影像擷取單元在每一該些取樣點上的至少一移動速度與至少一角速度設定為多個變數;根據該些變數、該影像擷取單元的一焦距以及該些特徵點配對所在的該些列位置,取得該些特徵點配對的多個估測動作向量;根據該些動作向量與該些估測動作向量之間的一差距執行一最佳化演算法,以計算出該些變數所對應的該至少一移動速度與該至少一角速度;根據該些變數所對應的該至少一移動速度與該至少一角速度改變該些影像的其中之一的多個像素的位置,藉此產生一第一校正影像。 A method for correcting a rolling shutter effect, which is applicable to an image processing apparatus, comprising: acquiring a plurality of feature point pairs of a plurality of images in a video, wherein each of the feature point pairs corresponds to an action vector, and the video is Obtained by an image capturing unit; between the two temporally adjacent images in the images, a plurality of sampling points are obtained, wherein each of the sampling points corresponds to a column position; the image is captured The at least one moving speed and the at least one angular velocity of the unit at each of the sampling points are set to a plurality of variables; according to the variables, a focal length of the image capturing unit, and the column positions where the feature points are paired, Obtaining a plurality of estimated motion vector pairs of the feature points; performing an optimization algorithm according to a gap between the motion vectors and the estimated motion vectors, to calculate the at least corresponding to the variables a moving speed and the at least one angular velocity; changing the position of the plurality of pixels of the one of the images according to the at least one moving speed and the at least one angular velocity corresponding to the variables Thereby generating a first correction image. 如申請專利範圍第1項所述之校正方法,其中該些特徵點配對包括一第二特徵點配對,該第二特徵點配對包括一第二特徵點與一第三特徵點,該第二特徵點的位置為(x1,y1),該第三特徵點的位置為(x2,y2),該第二特徵點配對所對應的該動作向量為(x2-x1,y2-y1),其中根據該些變數、 該影像擷取單元的該焦距以及該些特徵點配對所在的該些列位置,取得該些特徵點配對的該些估測動作向量的步驟包括:根據以下方程式(1)計算該第二特徵點配對所對應的該估測動作向量的一x分量,並且根據以下方程式(2)計算對應該第二特徵點配對所對應的該估測動作向量的一y分量: 其中S1與S2為實數,S1表示該第二特徵點所在的該列位置所對應的該取樣點,S2表示該第三特徵點所在的該列位置所對應的該取樣點,f為該影像擷取單元的一焦距,Z為該些影像的一景深,為該影像擷取單元在取樣點i在一x方向上的該至少一移動速度,為該影像擷取單元在取樣點i在一y方向上的該至少一移動速度,為該影像擷取單元在取樣點i在一x軸上的該至少一角速度,為該影像擷取單元在取樣點i在一y軸上的該至少一角速度,為該影像擷取單元在取樣點i在一z軸上的該至少一角速度。 The method of claim 1, wherein the feature point pairing comprises a second feature point pairing, the second feature point pairing comprises a second feature point and a third feature point, the second feature The position of the point is (x 1 , y 1 ), the position of the third feature point is (x 2 , y 2 ), and the action vector corresponding to the pair of second feature points is (x 2 -x 1 , y 2 - y 1 ), wherein the step of obtaining the estimated motion vectors paired by the feature points according to the variables, the focal length of the image capturing unit, and the column positions where the feature points are paired comprises: Equation (1) calculates an x component of the estimated motion vector corresponding to the second feature point pairing, and calculates one of the estimated motion vectors corresponding to the second feature point pairing according to the following equation (2) y component: Wherein S1 and S2 are real numbers, S1 represents the sampling point corresponding to the column position where the second feature point is located, S2 represents the sampling point corresponding to the column position where the third feature point is located, and f is the image 撷Taking a focal length of the unit, Z is a depth of field of the images, The at least one moving speed of the image capturing unit at the sampling point i in the x direction, The at least one moving speed of the image capturing unit in the y direction at the sampling point i, The at least one angular velocity of the image capturing unit on the x-axis at the sampling point i, The at least one angular velocity of the image capturing unit on the y-axis at the sampling point i, The at least one angular velocity of the image capturing unit at a sampling point i on a z-axis. 如申請專利範圍第1項所述之校正方法,其中根據該些動作向量與該些估測動作向量之間的該差距執行該最佳化演算法的步驟包括;根據該些動作向量的一x分量與一y分量產生多個限 制;根據該些估測動作向量產生一第一矩陣,其中該第一矩陣中列的數目大於該第一矩陣中行的數目;以及根據該些限制減去該第一矩陣與該些變數相乘的一結果產生一成本函數,並且根據該成本函數執行該最佳化演算法以取得該些變數所對應的該至少一移動速度與該至少一角速度。 The method of claim 1, wherein the step of performing the optimization algorithm according to the gap between the motion vectors and the estimated motion vectors comprises: determining an x according to the motion vectors Multiple limits for components and one y component Generating a first matrix according to the estimated motion vectors, wherein the number of columns in the first matrix is greater than the number of rows in the first matrix; and subtracting the first matrix from the variables according to the constraints A result of the generation produces a cost function, and the optimization algorithm is executed according to the cost function to obtain the at least one moving speed and the at least one angular velocity corresponding to the variables. 如申請專利範圍第3項所述之校正方法,其中該成本函數還包括該些變數與一微分矩陣相乘的結果,其中該微分矩陣中第j行第j列的值為-1,該微分矩陣中第j列第j+1行的值為1,並且j為正整數。 The method of claim 3, wherein the cost function further comprises a result of multiplying the variables by a differential matrix, wherein the value of the jth column in the jth column of the differential matrix is -1, the differential The value of the j+1th row of the jth column in the matrix is 1, and j is a positive integer. 如申請專利範圍第3項所述之校正方法,其中一第二矩陣與一第三矩陣的相乘為該第一矩陣,該第二矩陣的第i個列中,僅有從第5(i-1)+1行至第5i行的值不為0,並且該第二矩陣的該第i個行是對應到該些限制中的第i個限制,其中i為正整數,該第i個限制是對應於第三矩陣的第(5(i-1)+1)列至第5i列,並且該第(5(i-1)+1)列至該第5i列中非對應至該第i個限制的一取樣區間的值為0。 The method of claim 3, wherein a multiplication of a second matrix with a third matrix is the first matrix, and in the ith column of the second matrix, only from the 5th (i) -1) The value of the +1 line to the 5th line is not 0, and the ith line of the second matrix corresponds to the ith limit of the restrictions, where i is a positive integer, the ith The restriction is corresponding to the (5(i-1)+1)th column to the 5th column of the third matrix, and the (5(i-1)+1)th column to the 5ith column does not correspond to the first The value of a sampling interval of i limits is zero. 如申請專利範圍第1項所述之校正方法,其中該些影像包括一第二影像,該第二影像中一第一像素的位置為(xrs,yrs),其中根據該些變數所對應的該至少一移動速度與該至少一角速度改變該些影像的其中之一的該些像素的位置,藉此產生該第一校正影像的步驟包括: 根據方程式(3)計算該第一像素在一x方向上的位移px,並且根據方程式(4)計算該第一像素在一y方向上的位移py,其中px與py為實數, 其中n為正整數,該第二影像是從時間點nS開始曝光至時間點(n+1)S,a為一浮點數,f為該影像擷取單元的一焦距,Z為該些影像的一景深,vx(t)為該影像擷取單元在時間點t在該x方向上的該至少一移動速度,vy(t)為該影像擷取單元在時間點t在該y方向上的該至少一移動速度,wx(t)為該影像擷取單元在時間點t在一x軸上的該至少一角速度,wy(t)為該影像擷取單元在時間點t在一y軸上的該至少一角速度,wz(t)為該影像擷取單元在時間點t在一z軸上的該至少一角速度。 The method of claim 1, wherein the image includes a second image, wherein a position of a first pixel in the second image is (x rs , y rs ), wherein the variable corresponds to the variable The at least one moving speed and the at least one angular speed change positions of the pixels of the one of the images, wherein the step of generating the first corrected image comprises: calculating the first pixel according to equation (3) a displacement p x in the x direction, and calculating a displacement p y of the first pixel in a y direction according to equation (4), where p x and p y are real numbers, Where n is a positive integer, the second image is exposed from the time point nS to the time point (n+1)S, a is a floating point number, f is a focal length of the image capturing unit, and Z is the image a depth of field, v x (t) is the at least one moving speed of the image capturing unit in the x direction at a time point t, and v y (t) is the image capturing unit at the time point t in the y direction The at least one moving speed, w x (t) is the at least one angular velocity of the image capturing unit on an x-axis at a time point t, and w y (t) is that the image capturing unit is at a time point t The at least one angular velocity on a y-axis, w z (t), is the at least one angular velocity of the image capturing unit on a z-axis at a time point t. 如申請專利範圍第1項所述之校正方法,更包括:根據該至少一移動速度與該至少一角速度產生一擷取軌跡;對該擷取軌跡執行一濾波器運算;將一平滑擷取軌跡設定為一第二變數,根據該第二變數與經過該濾波器運算的該擷取軌跡之間的一第二差距產生一成本函數;以及根據該成本函數執行一第二最佳化演算法,藉此取得該平滑擷取軌跡。 The method of claim 1, further comprising: generating a trajectory according to the at least one moving speed and the at least one angular velocity; performing a filter operation on the captured trajectory; and performing a smooth trajectory Set as a second variable, generating a cost function according to a second difference between the second variable and the captured trajectory calculated by the filter; and performing a second optimization algorithm according to the cost function, Thereby the smooth capture trajectory is obtained. 如申請專利範圍第7項所述之校正方法,更包括:根據該平滑擷取軌跡與該擷取軌跡之間的差距改變該第一校正影像中像素的位置,藉此產生一第二校正影像。 The method of claim 7, further comprising: changing a position of a pixel in the first corrected image according to a gap between the smoothed trajectory and the captured trajectory, thereby generating a second corrected image . 一種影像處理裝置,包括:一記憶體,儲存有多個指令;以及一處理器,耦接至該記憶體,用以執行該些指令以執行多個步驟:取得一視訊中多個影像的多個特徵點配對,其中每一該些特徵點配對是對應於一動作向量,並且該視訊是由一影像擷取單元所擷取;從該些影像中兩張時間上相鄰的影像之間,取得多個取樣點,其中每一該些取樣點是對應於一列位置;將該影像擷取單元在每一該些取樣點上的至少一移動速度與至少一角速度設定為多個變數;根據該些變數、該影像擷取單元的一焦距以及該些特徵點配對所在的該些列位置,取得該些特徵點配對的多個估測動作向量;根據該些動作向量與該些估測動作向量之間的一差距執行一最佳化演算法,以計算出該些變數所對應的該至少一移動速度與該至少一角速度;根據該些變數所對應的該至少一移動速度與該至少一角速度改變該些影像的其中之一的多個像素的位置,藉此產生一第一校正影像。 An image processing apparatus includes: a memory storing a plurality of instructions; and a processor coupled to the memory for executing the instructions to perform a plurality of steps: obtaining a plurality of images in a video Feature point pairing, wherein each of the feature point pairs corresponds to an action vector, and the video is captured by an image capturing unit; and between the two temporally adjacent images in the images, Obtaining a plurality of sampling points, wherein each of the sampling points corresponds to a column position; at least one moving speed and at least one angular velocity of the image capturing unit at each of the sampling points is set to a plurality of variables; And obtaining, by the plurality of variables, a focal length of the image capturing unit, and the column positions where the feature points are paired, obtaining a plurality of estimated motion vectors paired by the feature points; and determining the motion vector according to the motion vectors Performing an optimization algorithm between the gaps to calculate the at least one moving speed and the at least one angular velocity corresponding to the variables; and the at least one moving speed corresponding to the variables The speed change position at least one corner of one of the plurality of pixels of the plurality of images, thereby generating a first correction image. 如申請專利範圍第9項所述之影像處理裝置,其 中該些特徵點配對包括一第二特徵點配對,該第二特徵點配對包括一第二特徵點與一第三特徵點,該第二特徵點的位置為(x1,y1),該第三特徵點的位置為(x2,y2),該第二特徵點配對所對應的該動作向量為(x2-x1,y2-y1),其中根據該些變數、該影像擷取單元的該焦距以及該些特徵點配對所在的該些列位置,取得該些特徵點配對的該些估測動作向量的步驟包括:根據以下方程式(1)計算該第二特徵點配對所對應的該估測動作向量的一x分量,並且根據以下方程式(2)計算對應該第二特徵點配對所對應的該估測動作向量的一y分量: 其中S1與S2為實數,S1表示該第二特徵點所在的該列位置所對應的該取樣點,S2表示該第三特徵點所在的該列位置所對應的該取樣點,f為該影像擷取單元的一焦距,Z為該些影像的一景深,為該影像擷取單元在取樣點i在一x方向上的該至少一移動速度,為該影像擷取單元在取樣點i在一y方向上的該至少一移動速度,為該影像擷取單元在取樣點i在一x軸上的該至少一角速度,為該影像擷取單元在取樣點i在一y軸上的該至少一角速度,為該影像擷取單元在取樣點i在一z軸上的該至少一角速度。 The image processing device of claim 9, wherein the feature point pairing comprises a second feature point pairing, the second feature point pairing includes a second feature point and a third feature point, the second The position of the feature point is (x 1 , y 1 ), the position of the third feature point is (x 2 , y 2 ), and the action vector corresponding to the second feature point pairing is (x 2 -x 1 , y 2 - y 1 ), wherein the step of obtaining the estimated motion vectors paired by the feature points according to the variables, the focal length of the image capturing unit, and the column positions where the feature points are paired comprises: Calculating an x component of the estimated motion vector corresponding to the second feature point pair according to the following equation (1), and calculating the estimated motion vector corresponding to the second feature point pair according to the following equation (2) One y component: Wherein S1 and S2 are real numbers, S1 represents the sampling point corresponding to the column position where the second feature point is located, S2 represents the sampling point corresponding to the column position where the third feature point is located, and f is the image 撷Taking a focal length of the unit, Z is a depth of field of the images, The at least one moving speed of the image capturing unit at the sampling point i in the x direction, The at least one moving speed of the image capturing unit in the y direction at the sampling point i, The at least one angular velocity of the image capturing unit on the x-axis at the sampling point i, The at least one angular velocity of the image capturing unit on the y-axis at the sampling point i, The at least one angular velocity of the image capturing unit at a sampling point i on a z-axis. 如申請專利範圍第9項所述之影像處理裝置,其中根據該些動作向量與該些估測動作向量之間的該差距執行該最佳化演算法的步驟包括;根據該些動作向量的一x分量與一y分量產生多個限制;根據該些估測動作向量產生一第一矩陣,其中該第一矩陣中列的數目大於該第一矩陣中行的數目;以及根據該些限制減去該第一矩陣與該些變數相乘的一結果產生一成本函數,並且根據該成本函數執行該最佳化演算法以取得該些變數所對應的該至少一移動速度與該至少一角速度。 The image processing device of claim 9, wherein the step of performing the optimization algorithm according to the difference between the motion vectors and the estimated motion vectors comprises: according to one of the motion vectors The x component and the y component generate a plurality of constraints; generating a first matrix according to the estimated motion vectors, wherein the number of columns in the first matrix is greater than the number of rows in the first matrix; and subtracting the A result of multiplying the first matrix by the variables produces a cost function, and the optimization algorithm is executed in accordance with the cost function to obtain the at least one moving speed and the at least one angular velocity corresponding to the variables. 如申請專利範圍第11項所述之影像處理裝置,其中該成本函數還包括該些變數與一微分矩陣相乘的結果,其中該微分矩陣中第j行第j列的值為-1,該微分矩陣中第j列第j+1行的值為1,並且j為正整數。 The image processing device of claim 11, wherein the cost function further comprises a result of multiplying the variables by a differential matrix, wherein the value of the jth column in the jth column of the differential matrix is -1, The value of the j+1th row of the jth column in the differential matrix is 1, and j is a positive integer. 如申請專利範圍第11項所述之影像處理裝置,其中一第二矩陣與一第三矩陣的相乘為該第一矩陣,該第二矩陣的第i個列中,僅有從第5(i-1)+1行至第5i行的值不為0,並且該第二矩陣的該第i個行是對應到該些限制中的第i個限制,其中i為正整數,該第i個限制是對應於第三矩陣的第(5(i-1)+1)列至第5i列,並且該第(5(i-1)+1)列至該第5i列中非對應至該第i個限制的一取樣區間的值為0。 The image processing device of claim 11, wherein a multiplication of a second matrix with a third matrix is the first matrix, and only the fifth from the ith column of the second matrix I-1) The value of the +1 line to the 5th line is not 0, and the ith line of the second matrix corresponds to the ith limit of the restrictions, where i is a positive integer, the ith The limit is corresponding to the (5(i-1)+1)th column to the 5th column of the third matrix, and the (5(i-1)+1)th column to the 5ith column are not corresponding to the The value of a sampling interval of the i-th limit is zero. 如申請專利範圍第9項所述之影像處理裝置,其 中該些影像包括一第二影像,該第二影像中一第一像素的位置為(xrs,yrs),其中根據該些變數所對應的該至少一移動速度與該至少一角速度改變該些影像的其中之一的該些像素的位置,藉此產生該第一校正影像的步驟包括:根據方程式(3)計算該第一像素在一x方向上的位移px,並且根據方程式(4)計算該第一像素在一y方向上的位移py,其中px與py為實數, 其中n為正整數,該第二影像是從時間點nS開始曝光至時間點(n+1)S,a為一浮點數,f為該影像擷取單元的一焦距,Z為該些影像的一景深,vx(t)為該影像擷取單元在時間點t在該x方向上的該至少一移動速度,vy(t)為該影像擷取單元在時間點t在該y方向上的該至少一移動速度,wx(t)為該影像擷取單元在時間點t在一x軸上的該至少一角速度,wy(t)為該影像擷取單元在時間點t在一y軸上的該至少一角速度,wz(t)為該影像擷取單元在時間點t在一z軸上的該至少一角速度。 The image processing device of claim 9, wherein the images comprise a second image, wherein a position of a first pixel in the second image is (x rs , y rs ), wherein the variables are based on the variables Corresponding at least one moving speed and the at least one angular velocity change positions of the pixels of the one of the images, thereby generating the first corrected image comprises: calculating the first pixel according to equation (3) a displacement p x in the x direction, and calculating a displacement p y of the first pixel in a y direction according to equation (4), where p x and p y are real numbers, Where n is a positive integer, the second image is exposed from the time point nS to the time point (n+1)S, a is a floating point number, f is a focal length of the image capturing unit, and Z is the image a depth of field, v x (t) is the at least one moving speed of the image capturing unit in the x direction at a time point t, and v y (t) is the image capturing unit at the time point t in the y direction The at least one moving speed, w x (t) is the at least one angular velocity of the image capturing unit on an x-axis at a time point t, and w y (t) is that the image capturing unit is at a time point t The at least one angular velocity on a y-axis, w z (t), is the at least one angular velocity of the image capturing unit on a z-axis at a time point t. 如申請專利範圍第9項所述之影像處理裝置,其中該些步驟更包括:根據該至少一移動速度與該至少一角速度產生一擷取軌跡;對該擷取軌跡執行一濾波器運算; 將一平滑擷取軌跡設定為一第二變數,根據該第二變數與經過該濾波器運算的該擷取軌跡之間的一第二差距產生一成本函數;以及根據該成本函數執行一第二最佳化演算法,藉此取得該平滑擷取軌跡。 The image processing device of claim 9, wherein the steps further comprise: generating a capture trajectory according to the at least one moving speed and the at least one angular velocity; performing a filter operation on the captured trajectory; Setting a smoothed trajectory as a second variable, generating a cost function according to a second difference between the second variable and the captured trajectory calculated by the filter; and performing a second according to the cost function The algorithm is optimized to obtain the smoothed trajectory. 如申請專利範圍第15項所述之影像處理裝置,其中該些步驟更包括:根據該平滑擷取軌跡與該擷取軌跡之間的差距改變該第一校正影像中像素的位置,藉此產生一第二校正影像。 The image processing device of claim 15, wherein the steps further comprise: changing a position of the pixel in the first corrected image according to a gap between the smoothed captured track and the captured track, thereby generating A second corrected image.
TW101145834A 2012-12-06 2012-12-06 Method for correcting rolling shutter effect and image processing device using the same TW201424366A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW101145834A TW201424366A (en) 2012-12-06 2012-12-06 Method for correcting rolling shutter effect and image processing device using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW101145834A TW201424366A (en) 2012-12-06 2012-12-06 Method for correcting rolling shutter effect and image processing device using the same

Publications (1)

Publication Number Publication Date
TW201424366A true TW201424366A (en) 2014-06-16

Family

ID=51394243

Family Applications (1)

Application Number Title Priority Date Filing Date
TW101145834A TW201424366A (en) 2012-12-06 2012-12-06 Method for correcting rolling shutter effect and image processing device using the same

Country Status (1)

Country Link
TW (1) TW201424366A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI612805B (en) * 2017-01-09 2018-01-21 視旅科技股份有限公司 Image processing method and system thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI612805B (en) * 2017-01-09 2018-01-21 視旅科技股份有限公司 Image processing method and system thereof

Similar Documents

Publication Publication Date Title
US9020292B2 (en) Method for correcting rolling shutter effect and image processing device using the same
JP5794705B2 (en) Imaging apparatus, control method thereof, and program
Karpenko et al. Digital video stabilization and rolling shutter correction using gyroscopes
Hee Park et al. Gyro-based multi-image deconvolution for removing handshake blur
US8229172B2 (en) Algorithms for estimating precise and relative object distances in a scene
CN103503432B (en) Image processing apparatus, image processing method
US10007990B2 (en) Generating composite images using estimated blur kernel size
US8264553B2 (en) Hardware assisted image deblurring
JP4500875B2 (en) Method and apparatus for removing motion blur effect
JP2014192613A5 (en)
JP7271653B2 (en) Optical Image Stabilization Operation to Generate a Super-Resolved Image of a Scene
JP2011172226A (en) Method and system for obtaining point spread function using motion information, and computer program
TWI390970B (en) Use motion detection to adjust the digital camera's shooting settings
WO2013151873A1 (en) Joint video stabilization and rolling shutter correction on a generic platform
JP6656035B2 (en) Image processing apparatus, imaging apparatus, and control method for image processing apparatus
Tang et al. What does an aberrated photo tell us about the lens and the scene?
JP7009107B2 (en) Image pickup device and its control method
TW202029727A (en) Image stabilization method and apparatus for panoramic video, and method for evaluating image stabilization algorithm
CN110493522A (en) Anti-fluttering method and device, electronic equipment, computer readable storage medium
Zhang et al. Combining inertial measurements with blind image deblurring using distance transform
TWI693577B (en) Image generating method and electronic apparatus
TW201424366A (en) Method for correcting rolling shutter effect and image processing device using the same
JP2009171341A (en) Blur correcting device and imaging apparatus
Shih et al. Fuzzy based hand-shake compensation for image stabilization
CN115103108B (en) Anti-shake processing method, device, electronic equipment and computer readable storage medium