As we have programmed it is mandatory to create a directory named "resultats" on your computer. This directory has to be located in the same directory where your MATLAB program is. In this directory you will find all the differents pictures generated by our MATLAB program.
You need to download the "seq1" directory from this repository and to put it in the same directory where the MATLAB program is. In the seq1 directory you will find all the images from the security camera.
Figure 1 : Photograph to indicate the placement of the resultats and the seq1 directories.
You also need to download all the .m files !! 😄
The aim of this program was to analyse the datas (pictures) of a security camera in order to detect the objects in movement.
The idea is to analyze the pictures from a sequence in order to detects movements. For that, we have followed several distinct methods which will be explained in this GitHub.
To have an idea of the pictures we have to analyze, here are some of them (01, 10, 20, 30, 40 and 50) :
Figure 2 : Photographs extracted from the sequence of pictures we had.
Here is our image of interest (the picture number 13) on which the analysis will be based :
Figure 3 : Photograph of interest.
Figure 4 : Photograph of the image number 8.
Then we have made the difference between the image number 13 and the image number 8 in order to see the vehicles which have moved between the two.
Figure 5 : Photograph of the image difference (image 13 - image 8).
By thresholded the image difference, we want to highlight the objects in movement between the 2 images.
Figure 6 : Photograph of the image difference (image 13 - image 8) thresholded.
Then, we do the average of all the images of the sequence.
Figure 7 : Photograph of the image average.
Then, we save the image of standard deviations.
Figure 8 : Photograph of the image of the standard deviations.
On the two past photographs, we can observe all the trajectories.
Figure 9 : Photograph of the image (in absolute value).
From figure 9, we are able to obtain the three next figures :
Figure 10 : Photograph of the image minus median (thresholded).
We only obtain the pixels where there is movement. We use the median image because it allows us to have less noise.
Figure 11 : Photograph of the image minus median (thresholded) with Closing and then Opening.
By doing a Closing then Opening we are able to dilate white elements on a picture.
Figure 12 : Photograph of the image minus median (thresholded) with Closing and then Opening and a 4-connexity.
We liked this project because it corresponded to our expectations in terms of work to be done and it also allowed us to progress in the field of computer vision.
Indeed, we spent several hours on this project and chose to work in the following way : one of us coded and the other was there to proofread the code (and vice versa), this allowed us to progress much faster as we limited the errors of inattention. Of course it was not always the same person who coded and the same for the person in charge of proofreading.
Furthermore, we are aware that we could continue to develop this program in order to complete and improve it. The next step will be to develop an AI.
Project carried out with Maël Lemaire. You can see his GitHub here. 🤗
Please do not forget that this project is under MIT license.