may have seen such scene in TV or movie: a car is runing on the highway, detected and marked with a red
rectange either by human or some system.
we belive that the knowledge you have learned so far in our DIP course would allow
you to explore the solution to this problem, of course within some simple settings.
There are lots of methods to obtain moving objects from a sequence of images, especially
when the background is static. Ideally, as shown below, for an input image (left),
we want an algorithm to ouput the an image (right) containing all the moving objects
(foreground) as well as remove all the background:
Obviously, this cannot be done
using only ONE image, so the input are a sequence of images, obtained by a surveillance camera with fixed position (notice that in this case the background
is also almost fixed). The input images would like:
We provide a trival solution:
substract image k+1 from image k, this procudes an image like
This is not an ideal solution, since some
backgrounds are still in the image and the foregrounds (cars) are not as good as
they are in the original input image. Can you improve this solution? Or can you
think up some other better solutions?
Complete the function bg_remove.m
to take a sequence of images
as input and output a sequence
of processed images (through
cell structure in matlab).
(All the materials can be found in Download section)