The above and other aspects and features of the present invention will become more apparent by describing certain exemplary embodiments of the present invention with reference to the accompanying drawings, in which:
Throughout the drawings, the same drawing reference numerals will be understood to refer to the same elements, features and structures.
Certain exemplary embodiments of the present invention will now be described in greater detail with reference to the accompanying drawings.
The matters defined in the description, such as a detailed constructions and elements, are provided to assist in a comprehensive understanding of the embodiments of the present invention and are merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the exemplary embodiments described herein can be made without departing from the scope and spirit of the present invention. Also, descriptions of well-known functions and constructions are omitted for clarity and conciseness.
A device for detecting an occlusion area according to an exemplary embodiment of the present invention comprises a motion estimator 210, a first occlusion detector 220, an occlusion reducer 230, a second occlusion detector 240, and an occlusion recovery unit 250.
The motion estimator 210 divides a current frame into a predetermined number of blocks, estimates one or more candidate motion vectors for each of the blocks, and determines a motion vector of the block from among the candidate motion vectors. The candidate motion vectors can be obtained by a variety of detection ranges and methods, and can include full search motion vectors, line candidate motion vectors, average candidate motion vectors, zero candidate motion vectors, and so forth. The line candidate motion vectors are obtained from the average of non-zero motion vectors of a previous frame in the same horizontal line of the current block. Among the plurality of candidate motion vectors obtained above, a motion vector of each block is determined based on the sum of absolute differences (SAD) or other information.
Additionally, the motion estimator 210 generates an object flag, using SAD of the blocks computed from a certain candidate motion vector of the plurality of candidate motion vectors, and the motion vector of each block. The object flag is set as satisfying the following Equation (1) below,
SADline(m, n)>LINESAD_THRESH
SADline(m, n)−SADfinal(m, n)|>SADDIFF_THRESH (Equation1)
wherein, SADline(m, n) is a SAD of the line candidate motion vector of the current block (m, n), and SADfinal(m, n) is a SAD of the current block (m, n) computed from the motion vector which is determined to be the most appropriate among the plurality of the candidate motion vectors. Additionally, LINESAD_THRESH is a positive threshold of the line candidate motion vectors, and SADDIFF_THRESH is a positive threshold of the difference between the SAD.
The first occlusion detector 220 detects the occlusion type of the blocks, that is, determines whether each block is a covered area block or an uncovered area block, according to a predetermined condition using the motion vector of each block.
Referring to
wherein, W0, . . . , W8 are weighted values.
The direction of the motion of the current block is predicted based on the average motion vector as computed above. If the six motion vectors in the left side of the matrix, including the current block, with reference to the MVmean_left value have a degree of distribution below a predetermined threshold, it is determined that the current block has a left-bound motion. If the six motion vectors in the right side of the matrix, including the current block, with reference to the MVmean_right value have a degree of distribution below a predetermined threshold, it is determined that the current block has a right-bound motion. The current block can have either left-bound or right-bound motions, at least within the occlusion area.
If the current block has a left-bound direction and meets condition (1) of Equation (3) below, the block is determined to be a covered area block. If the current block has a left-bound direction and meets condition (2) of Equation (3) below, the block is determined to be an uncovered area block.
(1) MVmean
(2) MVmean
If the current block has a right-bound direction and meets condition (3) of Equation (4) below, the block is determined to be a covered area block. If the current block has a right-bound direction and meets condition (4) of Equation (4) below, the block is determined to be an uncovered area block,
(3) MVmean
(4) MVmean
wherein, MVDIFF_THRESH is a predetermined threshold.
The occlusion reducer 230 eliminates a covered area block or an uncovered area block which is irregularly represented, among the blocks detected at the first occlusion detector 220. The occlusions which are irregularly represented at a distance from the covered area blocks or the uncovered area blocks after the detection of the occlusion type by the first occlusion detector 220, are regarded as detection errors, and accordingly, are removed. The output from the occlusion reducer 230 is then transmitted to the second occlusion detector 240, and is also stored in order to be used in the analysis of the next frame following the current frame at the second occlusion detector 240.
The second occlusion detector 240 detects whether each block output from the occlusion reducer 230 is an object block or a background block. As the occlusion type of the blocks, that is, whether each of the blocks is a covered area block or an uncovered area block, has been determined as described above, the following exemplary embodiment will be explained using, for example, an assumption that each block output from the first occlusion detector 220 and the occlusion reducer 230 is a covered area block.
In a first exemplary method, the second occlusion detector 240 detects whether the current block is an object block or a background block using the motion vector of the discontinuous edge between blocks of the occlusion area. If the current block is an occlusion area block, there is an edge which contains the discontinuous motion vectors between the current block and peripheral blocks adjacent to the current block.
In a second exemplary method, if the current block is not detected as an object or a background using the above method, a line memory can be used. In the device for detecting an occlusion area according to an exemplary embodiment of the present invention, four line memories are used, such as an object line memory and a background line memory for the covered area, and an object line memory and a background line memory for the uncovered area, but is not limited thereto. Each line memory stores a result of detecting an occlusion area of a line prior to the current block.
For example, if the occlusion area is an object of the covered area, it is stored in the object line memory of the covered area. Since the system processes each block line by line, the line memory is updated after all of the blocks of a line prior to the horizontal line containing the current block are processed by the second occlusion detector.
In a third exemplary method, if the current block has still not been detected as an object or a background using the above methods, the occlusion area of the current block can be detected as follows. A matrix is constructed using a predetermined number of blocks as shown in
In a fourth exemplary method, if the current block has still not been detected as an object or a background using the above methods, the occlusion area of the current block can be detected as follows. An object flag generated by the motion estimator 210 is used, and the determination method is performed in substantially the same manner as in the above third exemplary method. That is, a matrix is constructed with a predetermined number of blocks, and a row (illustrated via the hashed portion) including the current block 4 of the matrix comprises the object flag. If the discontinuous peripheral blocks 0, 3, 6 or 2, 5 and 8, are not the object flags, the current block is determined to be an object block.
In a fifth exemplary method, if the current block still has not been detected as an object or a background using the above methods, the occlusion area of the current block can be detected as follows. The motion vector of the current block is compared to the line average motion vector of the current frame containing the current block, to detect whether the current block is an object block or a background block. In most images, a background motion vector is similar to the line average motion vector. The line average motion vector indicates the average of the motion vectors of the horizontal line of the current frame containing the current block.
Hereinafter, an exemplary situation is described in which each block output from the first occlusion detector 220 and occlusion reducer 230 is an uncovered area. The second occlusion detector 240 performs the following methods in stages in substantially the same manner as in the method for detecting an object and a background in the covered area.
The second occlusion detector 240 first detects whether the current block is an object block or a background block using a motion vector of a discontinuous edge between blocks of the occlusion area (see
If the current block is not detected as an object block or a background block using the above method, a line memory can be used. Accordingly, if the current block is an uncovered area, the occlusion area of the current block is detected using the object and background line memories for the uncovered area. This method is performed in substantially the same manner as in the above second exemplary method, and accordingly, additional descriptions thereof are omitted.
Next, if the current block still has not been detected as an object block or a background block using the above methods, an object flag generated by the motion estimator 210 is used. This method is performed in substantially the same manner as in the above fourth exemplary method, and accordingly, additional descriptions thereof are omitted.
If the current block still has not been detected ass an object block or a background block using the above methods, the second occlusion detector 240 determines whether the current block is an object block or a background block using the SAD of the predetermined blocks computed from the determined motion vector of the current block and the line candidate motion vector. The SAD of the background block in the uncovered area is generally higher than that of the corresponding object block. This is because it is impossible to find the portion corresponding to the background block in the previous frame. Therefore, the current block (m, n) is the object block in the uncovered area when satisfying the following Equation (5) below.
SADfinal(m, n)<FINALSAD_THRESH,
SADfinal(m, n+1)−SADfinal(m, n)>SADDIFF_THRESH: (Equation 5)
when the current block (m, n) is a leftward motion vector,
SADline(m, n+1)>LSAD_THRESH:
when the current block (m, n) is a leftward motion vector,
SADfinal(m, n−1)−SADfinal(m, n)>SADDIFF_THRESH:
when the current block (m, n) is a rightward motion vector, and
SADline(m, n−1)>LSAD_THRESH:
when the current block (m, n) is a rightward motion vector,
wherein, FINALSAD_THRESH, SADDIFF_THRESH, and LSAD_THRESH are predetermined thresholds.
Finally, if the current block still has not been detected as an object block or a background block using the above methods, the motion vector of the current block is compared to the line average motion vector of the current frame containing the current block, to detect whether the current block is an object block or a background block. This method is performed in substantially the same manner as in the above fifth exemplary method, and accordingly, additional descriptions thereof are omitted.
Even though the above methods are used in the second occlusion detector, the current block may still not be detected as an object block or a background block. In this case, the occlusion recovery unit 250 can determine whether the block is an object block or a background block according to the detection result of the peripheral blocks. For example, if it is not yet detected whether some blocks irregularly represented among the object blocks are object blocks or background blocks, this block may be designated as the object block.
The current frame is first divided into a predetermined number of blocks, a plurality of candidate motion vectors are estimated by block units, and then a motion vector of each block among the plurality of candidate motion vectors is determined in operation S910. Next, the occlusion type of the blocks, that is, whether each block is a covered area block or an uncovered area block, is detected using the motion vector of each block in operation S920. Thereafter, a covered area block or an uncovered area block which is irregularly represented, among the blocks after the occlusion type of the blocks is detected, is eliminated in operation S930. In operation S940, it is detected whether each block output after the elimination is an object block or a background block.
The exemplary embodiments of the present invention provide a device and method for detecting an occlusion area in stages, which conducts a first stage of detection by detecting the occlusion type of the block based on a determination that the block is a covered area block or an uncovered area block, and conducts a second stage of detection by detecting whether each block detected at the first stage is an object block or a background block, so that an occlusion area can be accurately detected.
The foregoing embodiments and advantages are merely exemplary and are not to be construed as limiting the present invention. The present teaching can be readily applied to other types of apparatuses. Also, the description of the embodiments of the present invention is intended to be illustrative, and not to limit the scope of the claims, and many alternatives, modifications, and variations will be apparent to those skilled in the art.
| Number | Date | Country | Kind |
|---|---|---|---|
| 10-2006-0103090 | Oct 2006 | KR | national |