The present invention contains subject matter related to Japanese Patent Application JP 2007-230053 filed in the Japanese Patent Office on Sep. 5, 2007, the entire contents of which are incorporated herein by reference.
1. Field of the Invention
The present invention relates to apparatuses and methods for image processing and computer programs, and in particular, relates to an image processing apparatus and method for detecting a motion vector in an image, and a computer program.
2. Description of the Related Art
In image coding, such as moving image compression, a motion vector is detected and data compression based on motion vector information is performed. According to the MPEG systems known as image coding systems, for example, a process for segmenting each frame into blocks and detecting a motion vector in each block of the current frame using a corresponding block of a reference frame is performed. However, when motion vector information in block units is contained in compressed data, the amount of data increases. When a camera is moved by, for example, a panning or tilting action or hand movement, motion vectors for respective blocks are substantially the same. In such a case, a single motion vector associated with one frame is set instead of a motion vector for each block and a coding process is performed using motion vectors obtained in this manner, so that the amount of data can be reduced.
A motion vector for each block is called a local motion vector (LMV) and a motion vector associated with one frame is called a global motion vector (GMV). Data coding using a global motion vector is utilized in, for example, the MPEG-4.
For example, it is assumed that there are two image frames, i.e., an image frame 10 captured at time t0 and an image frame 11 taken at time t1 as shown in
To encode those images, generally, each frame is segmented into blocks each including a matrix of, for example, n×n pixels, a motion vector (MV) for each block, namely, a local motion vector is detected, and data compression and decompression are performed using motion vectors for the respective blocks. However, if the camera was moved by a panning or tilting action or hand movement, the motion vectors for the respective blocks are substantially the same as shown in
In such a case, image coding is performed using one motion vector 21 that describes the motion of the whole image as shown in
A global motion vector can be expressed as data describing simple translation as shown in
The MPEG-4 uses an image coding technique applying a global motion vector and using global motion compensation (GMC) as a standard. An encoder detects a global motion vector and a decoder performs decoding with global motion compensation using the received global motion vector.
A global motion vector is expressed as data describing the relationship between a pixel position at (x, y) in the current frame and a corresponding pixel position at (x′, y′) in a reference frame shown in
When a global motion vector describes, for example, only translation (parallel displacement), this vector is expressed using two parameters [a0, a1] as follows.
x′=x+a
0
y′=y+a
1
A global motion vector describing translation (parallel displacement) with rotation is expressed using three parameters [a0, a1, a2] as follows.
x′=sin a0x−cos a0y+a2
y′=cos a0x+sin a0y+a1
A global motion vector describing Affine transformation is expressed using six parameters [a0, a1, a2, a3, a4, a5] as follows.
x′=a
0
x−a
1
y+a
2
y′=a
3
x+a
4
y+a
5
A global motion vector describing projection transformation is expressed using eight parameters [a0, a1, a2, a3, a4, a5, a6, a7] as follows.
x′=((a0x+a1y+a2)/(a6x+a7y+1))
y′=((a3x+a4y+a5)/(a6x+a7y+1))
To obtain a global motion vector from a moving image frame, a process using the current frame and a reference frame is performed as shown in
According to this technique, a local motion vector for each block is obtained, local motion vectors having high reliability are selected from among the local motion vectors associated with the respective blocks, and a global motion vector is obtained on the basis of the selected local motion vectors having high reliability.
For example, it is assumed that p local motion vectors associated with p blocks are obtained and q local motion vectors having high reliability are selected from among the p local motion vectors. A single global motion vector is obtained on the basis of the q local motion vectors having high reliability without using the other (p-q) local motion vectors having low reliability.
As for information regarding the reliability of a local motion vector, for example, information indicating whether clear feature matching information is obtained in block matching between the current frame and a reference frame is used. As for techniques for obtaining a single global motion vector on the basis of local motion vectors having high reliability, for example, a method of least squares may be used.
Such a technique for deriving a global motion vector using local motion vectors can be performed as an extension of related-art local motion vector estimation. Advantageously, already-existing components can be used. However, when the number of local motion vectors having high reliability is small, the reliability of a global motion vector remarkably decreases.
The present invention is made in consideration of the above-described problems. It is desirable to provide an image processing apparatus and method capable of obtaining a global motion vector using local motion vectors without remarkably reducing the reliability of the global motion vector even when the number of local motion vectors having high reliability is small, and a computer program.
According to a first embodiment of the present invention, an image processing apparatus includes the following elements. A local motion vector estimation unit estimates a motion vector associated with each of blocks, serving as segments of an image frame constituting a moving image, as a local motion vector. A block weight calculation unit calculates a block weight as an index of the reliability of a local motion vector associated with each block. A global motion vector estimation unit receives the local motion vectors and the block weights to estimate a global motion vector as a motion vector common to the blocks included in the image frame. The global motion vector estimation unit is configured to calculate, as a cost, the sum of the products of the differences between the local motion vectors associated with the respective blocks and the global motion vector and the block weights assigned to the respective blocks subjected to difference calculation, calculate configuration parameters of the global motion vector which minimize the cost, and generate the global motion vector in which the calculated parameters are set.
In this embodiment, the block weight calculation unit may be configured to obtain a plurality of block-associated weight data elements based on different data elements and calculate a block weight associated with each block on the basis of the block-associated weight data elements.
In this embodiment, the block weight calculation unit may be configured to obtain a plurality of block-associated weight data elements based on different data elements and calculate the product of the block-associated weight data elements as a block weight associated with each block.
In this embodiment, the block weight calculation unit may perform a process for calculating a block weight using at least one of values of (a) the size of a local motion vector associated with each block, (b) the sum of absolute difference associated with each block, (c) a variance of pixel values associated with each block, (d) a covariance obtained from pixel values associated with each block of a processing target frame and those associated with the corresponding block of a reference frame, (e) a correlation between a local motion vector associated with each block and those associated with blocks adjacent to the block, and (f) a correlation coefficient obtained from the pixel values associated with each block of the processing target frame and those associated with the corresponding block of the reference frame.
In this embodiment, the global motion vector estimation unit may be configured to receive the local motion vectors and the block weights and estimate a single global motion vector associated with the image frame as a motion vector common to all of the blocks included in the image frame.
According to a second embodiment of the present invention, there is provided an image processing method for executing motion vector detection in an image processing apparatus. The method includes the steps of (A) estimating a motion vector associated with each of blocks, serving as segments of an image frame constituting a moving image, as a local motion vector, (B) calculating a block weight as an index of the reliability of a local motion vector associated with each block, and (C) receiving the local motion vectors and the block weights to estimate a global motion vector as a motion vector common to the blocks included in the image frame. In step (C), the sum of the products of the differences between the local motion vectors associated with the respective blocks and the global motion vector and the block weights assigned to the respective blocks subjected to difference calculation is calculated as a cost, configuration parameters of the global motion vector which minimize the cost are calculated, and the global motion vector in which the calculated parameters are set is generated.
In this embodiment, preferably, in step (B), a plurality of block-associated weight data elements based on different data elements are obtained and a block weight associated with each block is calculated on the basis of the block-associated weight data elements.
In this embodiment, preferably, in step (B), a plurality of block-associated weight data elements based on different data elements are obtained and the product of the block-associated weight data elements is calculated as a block weight associated with each block.
In this embodiment, preferably, in step (B), a process for calculating a block weight is performed using at least one of values of (a) the size of a local motion vector associated with each block, (b) the sum of absolute difference associated with each block, (c) a variance of pixel values associated with each block, (d) a covariance obtained from pixel values associated with each block of a processing target frame and those associated with the corresponding block of a reference frame, (e) a correlation between a local motion vector associated with each block and those associated with blocks adjacent to the block, and (f) a correlation coefficient obtained from the pixel values associated with each block of the processing target frame and those associated with the corresponding block of the reference frame.
According to this embodiment, preferably, in step (C), the local motion vectors and the block weights are received and a single global motion vector associated with the image frame is estimated as a motion vector common to all of the blocks included in the image frame.
According to a third embodiment of the present invention, there is provided a computer program that allows an image processing apparatus to execute motion vector detection. The program includes the steps of (A) estimating a motion vector associated with each of blocks, serving as segments of an image frame constituting a moving image, as a local motion vector, (B) calculating a block weight as an index of the reliability of a local motion vector associated with each block, and (C) receiving the local motion vectors and the block weights to estimate a global motion vector as a motion vector common to the blocks included in the image frame. In step (C), the sum of the products of the differences between the local motion vectors associated with the respective blocks and the global motion vector and the block weights assigned to the respective blocks subjected to difference calculation is calculated as a cost, configuration parameters of the global motion vector which minimize the cost are calculated, and the global motion vector in which the calculated parameters are set is generated.
The computer program according to this embodiment of the present invention may be provided to, for example, general-purpose computer systems capable of executing various program codes from computer-readable storage media and communication media. Providing this computer program in computer-readable form achieves processing operations according to the program on such a computer system.
Other features and advantages of the present invention will become more apparent from the following more detailed description based on an embodiment of the present invention which will be described below and the accompanying drawings. The term “system” in this specification refers to a logical set of devices and the devices each serving as a component are not necessarily accommodated in a single casing.
According to an embodiment of the present invention, a local motion vector (LMV) associated with each of blocks, serving as segments of an image frame constituting a moving image, and a block weight as an index of the reliability of a local motion vector (LMV) associated with each block are obtained, and the rate of contribution of each block is set in accordance with the corresponding block weight to estimate a global motion vector (GMV). To calculate a block weight for each block, indices from various points of view, for example, the size of a local motion vector (LMV), the sum of absolute difference (SAD), a variance of pixel values of pixels constituting each block, and a covariance obtained from pixel values of pixels constituting each block in a processing target frame and those constituting the corresponding block in a reference frame are used. Advantageously, a global motion vector (GMV) having high reliability can be obtained.
An image processing apparatus according to an embodiment of the present invention, an image processing method therefor, and a computer program therefor will be described in detail with reference to the drawings.
The image processing apparatus according to the embodiment of the present invention inputs moving image data and performs a process for obtaining a global motion vector associated with the moving image data. Specifically, the image processing apparatus according to this embodiment first obtains a local motion vector for each block and obtains a global motion vector using the local motion vectors.
According to the present embodiment, reliability is set for each block associated with a local motion vector, a weight corresponding to the reliability is defined, and a global motion vector is obtained in consideration of the weights of the respective local motion vectors.
The outline of a technique for deriving a global motion vector in the image processing apparatus according to the present embodiment will now be described with reference to
According to the technique shown in
This technique for obtaining a global motion vector using local motion vectors can be performed as an extension of related-art local motion vector estimation. Advantageously, already-existing components can be used. However, when the number of local motion vectors having high reliability is small, the reliability of a global motion vector remarkably decreases.
According to the technique in accordance with the embodiment of the present invention shown in
A specific example of the technique in accordance with the present embodiment will now be described. When a global motion vector describes, for example, only translation (parallel displacement), the relation between coordinates (x, y) in the current frame image and corresponding coordinates (x′, y′) in a reference image is expressed using two parameters [a0, a1] as the following Expression 1 as described above.
x′=x+a
0
y′=y+a
1 (1)
As for any block, indicated at n, in the image frame shown in
u
n
=x
n
+MVX
n
v
n
=y
n
+MVY
n (2)
When the number of blocks is, for example, p, the relational expressions associated with the p local motion vectors [LMV]=(MVXn, MVYn) are set.
The difference [en] between a global motion vector associated with one image frame and the local motion vector [LMVn] of the block [n] included in the frame is defined as the following Expression 3.
e
n=√{square root over ((un−(a0+xn))2+(vn−(a1+yn))2)}{square root over ((un−(a0+xn))2+(vn−(a1+yn))2)} (3)
A global motion vector cost (GMV cost) [Q] is calculated using the vector difference [en] associated with each block [n] and a weight [wn] set for the block [n] in accordance with the following Expression 4.
Q=Σwnen (4)
Two parameters [a0, a1] that minimize the GMV cost [Q] calculated by the above Expression 4 are obtained. The obtained parameters [a0, a1] are used to determine the above-described global motion vector expressed as follows by the foregoing Expression 1:
x′=x+a
0
y′=y+a
1.
As for the process of obtaining the parameters [a0, a1] that minimize the cost [Q] in accordance with the above Expressions 3 and 4, the process uses the method of least squares based on weights associated with respective blocks.
In the above-described process example, the global motion vector describes only translation (parallel displacement) and two parameters [a0, a1] are obtained. As described above, a global motion vector may be set as information containing translation, rotation, enlargement, reduction, Affine transformation, or projection transformation. The number of parameters varies in accordance with setting. In this case, the difference [en] between the global motion vector associated with a frame and the local motion vector [LMVn] of each block [n] included in the frame is obtained in a manner similar to the above process, parameters [a0, a1, a2, a3, . . . ] that minimize the GMV cost [Q] on the basis of weights associated with the respective blocks are obtained, and the global motion vector is determined using the parameters.
The process for obtaining a global motion vector according to the embodiment of the present invention will now be described in detail with reference to
The global motion vector generation mechanism set in the image processing apparatus according to this embodiment includes a local motion vector estimation unit (LME) 101, a block weight calculation unit 102, and a global motion vector estimation unit (GME) 103 as shown in
The local motion vector estimation unit 101 receives the current frame image and a reference frame image to estimate a motion vector associated with each of blocks obtained by segmenting one frame, i.e., a local motion vector (LMV). As for a process used in the local motion vector estimation unit 101, a well-known process, for example, block matching is used to estimate a local motion vector associated with each block.
Each local motion vector obtained by the local motion vector estimation unit 101 is input to the block weight calculation unit 102 and the global motion vector estimation unit 103.
In addition, a motion compensated image subjected to motion compensation (MC) and a minimum residual (SAD: sum of absolute difference) are supplied to the block weight calculation unit 102. The motion compensated (MC) image is generated upon estimating a local motion vector in the local motion vector estimation unit 101. The minimum residual (SAD) serves as the sum of the absolute values of the differences between pixel information elements related to a block in the current image frame and those related to a corresponding block in the reference image frame.
The block weight calculation unit 102 calculates a weight for each block set in the current frame. The detailed structure and process of the block weight calculation unit 102 will now be described with reference to
Referring to
(a) LMV-based weight calculation section 211;
(b) residual-based weight calculation section 222;
(c) variance-based weight calculation section 223;
(d) covariance-based weight calculation section 224; and
(e) LMV-correlation-based weight calculation section 225.
The block weight calculation unit 102 further includes a multiplication section 231.
According to this embodiment, the block weight calculation unit 102 is configured to calculate block weights based on five different data elements obtained by the above-mentioned sections (a) to (e) and multiply those five different block weights to obtain a final block weight. Processes for obtaining the block weights based on the five different data elements obtained by the above sections (a) to (e) will now be sequentially described below.
The LMV-based weight calculation section 211 receives a local motion vector (LMV) associated with each block from the local motion vector estimation unit (LME) 101 shown in
The LMV-based weight calculation section 211 holds an LMV-based weight calculation table and calculates an LMV-based weight in accordance with the table.
In the present process example, the value [LMV2] is obtained as follows.
LMV
2
=LMVx
2
+LMVy
2
LMVx represents an x component of a local motion vector (LMV) and LMVy represents a y component thereof.
Weights set in the LMV-based weight calculation table shown in
The LMV-based weight calculation section 211 may be configured to calculate an LMV-based weight in accordance with a flowchart shown in
LmvSize=√{square root over (LMVx2+LMVy2)} (5)
Subsequently, in step S102, an LMV-based weight is calculated on the basis of the size [LmvSize] of the local motion vector obtained in step S101 in accordance with a predetermined transformation. For example, a weight is calculated by transformation in accordance with a transformation table shown in
The LMV-based weight obtained as described above is set as shown in
The residual-based weight calculation section 222 receives a minimum residual (SAD) associated with each block from the local motion vector estimation unit 101 shown in
As described above, a minimum residual (SAD) is the sum of the absolute values of the differences between pixel information elements related to a block in the current image frame and those related to a corresponding block in the reference frame. The residual-based weight calculation section 222 performs the process according to the flowchart of
First, in step S201, the size [LmvSize] of a local motion vector (LMV) associated with each block supplied from the local motion vector estimation unit 101 shown in
Subsequently, in step S202, a residual-based weight is calculated on the basis of the size [LmvSize] of the local motion vector calculated in step S201 by a predetermined transformation. For example, the weight is calculated by transformation in accordance with a transformation table shown in
The residual-based weight obtained as described above is set as shown in
The variance-based weight calculation section 223 receives a block variance associated with each block of the current frame from the block variance calculation section 211 to calculate a weight (hereinafter, a variance-based weight) based on the block variance. This process will now be described with reference to
First, step S301 of the flowchart in
where pi represents an ith pixel value in the block, overbarred pi represents an average of pixel values in the block, and n represents the number of pixels in the block.
Processing in step S302 corresponds to a process performed by the variance-based weight calculation section 223. The variance-based weight calculation section 223 receives the block variance [VarBlk], obtained in step S301 by the block variance calculation section 211, and calculates a variance-based weight on the basis of the block variance [VarBlk] by a predetermined transformation. For example, weight calculation is performed by transformation in accordance with a transformation table shown in
The variance-based weight calculated in this manner is set as shown in
The covariance-based weight calculation section 224 receives a covariance, obtained by analyzing a block in the current frame and a corresponding block in a motion compensated (MC) image, from the inter-image covariance calculation section 212 to calculate a covariance-based weight. This process will now be described with reference to
First, step S401 in the flowchart of
First, an average [overbarred pi] of pixel values [pi] in a processing target block 331 in a current frame image 321 is calculated.
Subsequently, an average [overbarred qi] of pixel values [qi] in a corresponding block 332 in a motion-compensated reference image (MC image) 322 is calculated.
A covariance is obtained on the basis of those calculated values in accordance with the following Expression 7:
where pi represents an ith pixel value in the block of the current frame, overbarred pi represents an average of pixel values in the block of the current frame, qi denotes an ith pixel value in the corresponding block in the motion-compensated reference image (MC image), overbarred qi represents an average of pixel values in the corresponding block of the motion-compensated reference image (MC image), and n represents the number of pixels in each block.
Step S402 corresponds to processing by the covariance-based weight calculation section 224. The covariance-based weight calculation section 224 receives the covariance [CoVarBlk], obtained in step S401 by the inter-image covariance calculation section 212, and calculates a covariance-based weight on the basis of the covariance [CoVarBlk] in accordance with a predetermined transformation. For example, weight calculation is performed by transformation in accordance with a transformation table shown in
The covariance-based weight calculated in this manner is set as shown in, for example,
In the above-described process, a covariance is determined and a covariance-based weight is calculated on the basis of the covariance using the transformation. Alternatively, a correlation coefficient may be calculated from pixel value data related to a block constituting the current frame image and that related to a corresponding block constituting the motion-compensated (MC) reference image, and a correlation-coefficient-based weight may be calculated on the basis of the obtained correlation coefficient. This process will now be described with reference to
First, in step S421 of the flowchart shown in
where pi represents an ith pixel value in the block of the current frame, overbarred pi represents an average of pixel values in the block of the current frame, qi represents an ith pixel value in the corresponding block of the motion-compensated reference image (MC image), overbarred qi represents an average of pixel values in the corresponding block of the motion-compensated reference image (MC image), and n represents the number of pixels in each block.
In step S422, the correlation coefficient obtained in step S421 is input and a correlation-coefficient-based weight is calculated on the basis of the correlation coefficient in accordance with a predetermined transformation. For example, weight calculation is performed by transformation in accordance with a transformation table shown in
The correlation-coefficient-based weight obtained in this manner is set as shown in, for example,
The LMV-correlation-based weight calculation section 225 receives a local motion vector (LMV) correlation associated with each block of the current frame from the neighborhood-LMV correlation calculation section 213, and calculates an LMV-correlation-based weight. This process will now be described with reference to
Step S501 of the flowchart in
This process will now be described with reference to
where AveLmvX represents the average (horizontal direction) of LMVs of neighborhood blocks adjacent to the processing target block, AveLmvY represents the average (vertical direction) of the LMVs of the neighborhood blocks adjacent to the target block, LMVx represents the LMV (horizontal direction) of the target block, and LMVy represents the LMV (vertical direction) of the target block.
Step S502 corresponds to processing by the LMV-correlation-based weight calculation section 225. According to this process, the LMV correlation [Lmv_cor] obtained in step S501 by the neighborhood-LMV correlation calculation section 213 is input and an LMV-correlation-based weight is calculated on the basis of the LMV correlation [Lmv_cor] using a predetermined transformation. For example, weight calculation is performed by transformation in accordance with a transformation table shown in
The LMV-correlation-based weight obtained in this manner is set as shown in
The processes performed by the block weight calculation unit 102 in the global motion vector generation mechanism shown in
In the block weight calculation unit 102, as shown in
When let [W_lmv] denote an LMV-based weight calculated by (a) the LMV-based weight calculation section 211, let [W_sad] be a residual-based weight calculated by (b) the residual-based weight calculation section 222, let [W_var] denote a variance-based weight obtained by (c) the variance-based weight calculation section 223, let [W_cor] be a covariance-based weight calculated by (d) the covariance-based weight calculation section 224, and let [W_lmvcor] denote an LMV-covariance-based weight obtained by (e) the LMV-correlation-based weight calculation section 225, the multiplication section 231 receives those weights to calculate a block weight [W_block] in accordance with the following Expression 10.
W_block=W—lmv×W—sad×W—var×W—cor×W—lmvcor (10)
Again referring to
The process for calculating a global motion vector in the global motion vector estimation unit 103 will now be described with reference to
The global motion vector estimation unit 103 receives data regarding block weights [W_block] calculated by the block weight calculation unit 102, for example, data shown in
W_block=W—lmv×W—sad×W—var×W—cor×W—lmvcor.
The global motion vector estimation unit 103 further receives local motion vectors associated with the respective blocks obtained by the local motion vector estimation unit 101 in addition to the block weights shown in
The process performed by the global motion vector estimation unit 103 will now be described with reference to a flowchart shown in
Initially, in step S601, the difference [en] between a local motion vector [LMVn] associated with each block [n] constituting a processing target frame and a global motion vector is calculated.
In the case where a global motion vector describes, for example, only translation (parallel displacement), the relation between coordinates (x, y) in the current frame image and coordinates (x′, y′) in a reference image is expressed using two parameters [a0, a1] as the following expression, as described above.
x′=x+a
0
y′=y+a
1
When a local motion vector [LMVn] associated with each block represents only translation (parallel displacement) and the local motion vector [LMVn] is expressed as [LMVn]=(MVXn, MVYn), the relation between coordinates (xn, yn) of the block [n] in the current frame image and coordinates (un, vn) of the corresponding block [n] in the reference image is expressed by the following expression.
u
n
=x
n
+MVX
n
v
n
=y
n
+MVY
n
The difference [en] between a global motion vector associated with one image frame and a local motion vector [LMVn] of a block [n] included in the frame is expressed by the following Expression 11, as described above.
e
n=√{square root over ((un−(a0+xn))2+(vn−(a1+yn))2)}{square root over ((un−(a0+xn))2+(vn−(a1+yn))2)} (11)
In step S602, a cost [Q] serving as the data indicating the sum of the products of the block weights [wn] for the blocks [n] and the differences [en] is calculated. In other words, a global motion vector cost (GMV cost) [Q] is calculated using the vector difference [en] associated with each block [n] obtained by the above-described Expression 11 and a weight set in association with each block [n] in accordance with the following Expression 12.
Q=Σwnen (12)
Subsequently, in step S603, parameters a0 to ak that minimize the GMV cost [Q] obtained by the above-described Expression 12 are calculated. In this example, the global motion vector represents only translation (parallel displacement) and is expressed as the following expression using the two parameters a0 and a1.
x′=x+a
0
y′=y+a
1
Since the global motion vector is expressed by the above expression using those two parameters a0 and a1, the two parameters a0 and a1 that minimize the GMV cost [Q] obtained by Expression 12 are obtained.
Finally, in step S604, the global motion vector expressed using the obtained parameters a0 to ak is determined as a global motion vector associated with a processing target frame. When the vector describes only translation (parallel displacement), the global motion vector is determined using the two parameters a0 and a1 that minimize the GMV cost [Q] in accordance with the following expression.
x′=x+a
0
y′=y+a
1
As described above, the process for calculating the parameters a0 and a1 that minimize the cost [Q] in accordance with the foregoing Expressions 11 and 12 utilizes the method of least squares with consideration of weights assigned to respective blocks. The above-described process example relates to the case where the global motion vector is a vector describing only translation (parallel displacement) and the two parameters a0 and a1 are obtained in accordance with the process. As described above, a global motion vector may be set as information containing translation, rotation, enlargement, reduction, Affine transformation, or projection transformation. The number of parameters is varied depending on setting. In this case, the difference [en] between a global motion vector associated with a frame and a local motion vector [LMVn] associated with each block [n] included in the frame is calculated, parameters [a0, a1, a2, a3, . . . ] that minimize the GMV cost [Q] in consideration of weights for respective blocks are calculated, and the global motion vector is determined using the calculated parameters.
As described above, the image processing apparatus according to the embodiment of the present invention is configured to calculate a block weight corresponding to the reliability of a local motion vector associated with each block, set the rate of contribution of the local motion vector associated with each block in accordance with the corresponding block weight, and determine a global motion vector. Accordingly, the global motion vector having high reliability that surely reflects the reliabilities of the local motion vectors associated with the respective blocks can be determined.
The hardware configuration of a personal computer will now be described as an example of the hardware configuration of the apparatus for performing the above-described processes with reference to
The CPU 701 is connected to an input/output interface 705 through the bus 704. The input/output interface 705 is connected to an input unit 706 and an output unit 707. The input unit 706 includes a keyboard, a mouse, and a microphone. The output unit 707 includes a display and a speaker. The CPU 701 performs various processes in accordance with instructions supplied from the input unit 706 and outputs the results of processing to, for example, the output unit 707.
The storage unit 708, connected to the input/output interface 705, includes, for example, a hard disk and stores a program performed by the CPU 701 and various pieces of data. A communication unit 709 communicates with an external device via a network, such as the Internet or a local area network.
A drive 710, connected to the input/output interface 705, drives a removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, and obtains a program or data recorded on the medium. The obtained program or data is transferred and stored to the storage unit 708 as necessary.
The invention has been described in detail with reference to the specific embodiments. However, it is obvious that those skilled in the art can make modifications and/or substitutions of the embodiments without departing from the scope and sprit of the invention. That is, the embodiments of the present invention have been described for illustrative purpose only, and the contents of the specification should not be interpreted restrictively. To understand the scope of the invention, the appended claims should be taken into consideration.
The series of processes explained in this specification can be executed by hardware, software, or any combination thereof. When the series of processes is executed by software, a program including the processing sequences may be installed into a memory in a computer incorporated in dedicated hardware and be executed. Alternatively, the program may be installed into a multi-purpose computer capable of executing various functions and be executed. For example, the program may be prestored on a recording medium. The program may be installed from the recording medium to the computer. Alternatively, the computer may receive the program via a network, such as a local area network (LAN) or the Internet, and install the program onto a recording medium, such as a built-in hard disk.
The various processes described in this specification may be performed not only in a time-series manner as described herein but also in parallel or separately in accordance with the processing performance of an apparatus, which executes the processes, or as necessary. The term “system” in this specification is a logical set of devices and the devices each serving as a component are not necessarily accommodated in a single casing.
Number | Date | Country | Kind |
---|---|---|---|
P2007-230053 | Sep 2007 | JP | national |