How to solved it? |
The algorithm:
- Convert the color images into black and white (B&W) images.
- Create the median image of the B&W sequence (each pixel is
the value of the median of the values of the corresponding pixels
in the whole sequence).
- Create a new sequence which is the B&W sequence minus the
median image (each pixel is the value of the pixel of the image
in the sequence minus the value of that pixel in the median
image).
- Look at the x,y projections (it is easier to look at the
projections when they are nomalized and moved - the maximum projection
is 100 and the minimum projection is 0).
- Indicate the maximum projection in each direction, in each
image.
- Follow the algorithm for selecting the whole object: On each
projection is a blue line indicating the HEIGHT parameter. On
each image in each direction, we highlight the section from
the maximum to the blue line. There are two additional parameters -
EPSILON and WIDTH. From the point were the projection is HEIGHT,
we calculate the maximum and minimum projection in the next
WIDTH projections. We continue highlighting the pixels for which
the maximum minus the minimum is greater than epsilon.
- Create a box around the moving object in the original sequence
and create a movement vector.

|
|