Image Processing project.. interesting..
Wat we r supposed to do is to capture some images from the webcam in our teacher's office remotely using Matlab.. we were supposed to detect whether there is a train by using the Matlab to code a program that can tell us that..
An image with a train captured from the webcam..
One without train..
luckily we found one more person from Iceland for our group who had pretty good knowledge in Matlab.. so he taught some tricks for Matlab.. we managed to thus complete the project finally.. hehee.. we made use of an accumulative difference method.. we subtract subsequent frames of image from a reference one.. so that we will get a product image of just black n white dots.. basically a digital image is made up of small dots called pixels each with a certain number corresponding to their color n brightness.. if the same color (i.e the same number) minus each other off, we get zero = black.. thus things that r on the image that did not move will yield zero from the subtraction.. moving stuff will yield white color..
but first, we convert the image to greyscale for easy processing..
the train is moving, hence the white parts in the black background..
we improved the Matlab so as to get rid of some of the grey specks in the picture known as noise..
a more solid image showing train movement..
these images above r for day.. the next one is captured at nite..
basically anything that moves shows up as white pixels after the subtraction.. so moving cars n moving ppl could also show up in the picture.. we thus make our Matlab to calculate the number of white pixels n if its big enuff to be a train, it PROCLAIMS: There is a train!!.. haha nice.. phew finally done..
0 Comments:
Post a Comment
<< Home