Author | Message |
---|---|
intregrisist
Posts: 41
|
Posted 14:10 May 28, 2011 |
Ok, so I was finishing up part one of the hw when I realized that what if the best batching block is partly outside the image/frame. I created a diagram to make my question clear:
So lets say we are looking at the first block in the target image at (0,0). If the ball in the reference image is half outside the image do we check block (-8,0)? Do we account for this? The formula would still work, I think, because 1/mn can just be 1/(# of pixels inside the image) times the sum of the error if the pixels we summed up. Can someone please confirm this so I can continue to the nest part of the hw. Thanks. |
hmodi
Posts: 27
|
Posted 14:36 May 28, 2011 |
I think as per the algorithm you have to keep looking within your search area, i.e., [-12,12]. In your example, you will get best matching block at (0,0) because the algorithm keeps first encountered best matched block. |
intregrisist
Posts: 41
|
Posted 15:15 May 28, 2011 |
So you are saying not to search block (-8,0)? I'm confused because you say you have to search [-12,12] and if that were the case (0,0) would not be the best match - it would be (-8,0). |
cbort
Posts: 95
|
Posted 15:35 May 28, 2011 |
(-8,0) doesn't exist so it cant be the best fit... I suspect that example would result in the motion vector being outside of the search area. |
kknaur
Posts: 540
|
Posted 16:25 May 29, 2011 |
So im still confused on this question. When the search area lies outside of the picture do you still search that area and only consider the part of the macro block that is inside the image, or do you just not consider those areas.. Like for example: Lets say your macro block on the target image starts at (0,0) and goes to (15,15) (corresponding to the first macro block). Now you want to search the reference image from (-12, -12) to (27, 27) since the search area is 12. Do you ignore all x, y, starting locations outside of the image area, or do you still place the block at that location and still search any pixels that fall within the range of the image i.e. I place the block at (-1, -1) which means you lose the first row and column of the target block. Would you still search the area of the block that falls inside the image or do you just ignore that position entirely and move the block until the entire block falls within the image? Last edited by kknaur at
16:26 May 29, 2011.
|
eykang
Posts: 95
|
Posted 08:00 May 30, 2011 |
Do not match the target block with non-existing block in the reference frame. Thus, for boundary target blocks, the search area is constrained. For example, the target block at (0,0) upper left corner should not be matched with a block at [-8,0) in the reference frame as it does not exist. |