Wednesday, November 4, 2009

Image Difference

Following Images show the difference of two images in mainwin1

mainwin show the edges of the second image

One of the most common and frequent problem in front of us is to extract the information from the real time data because of real time data is dynamic in nature, so for that there is a need of efficient algorithm which can intelligently interact with your real time data and solve your problem , rather I can say that there is need to train your algorithm by taking the data from the well defined data set and train your system for every possible input for this we can use the different training techniques like ANN but for this post my concern is not about ANN but to solve a problem of detecting the object from the real time data .

in this Post I discuss about to detect the object from the real time data ,for example you want to detect the model of car running on the road so first you click the snap from a particular location without shaking or shivering click another snap of the road from same position without a car .so finally you have two snap one is of road with car and another is of only road now follow the procedure

1)convert both images in to Gray scale, you can use this formula for this
Y = 0.3*R + 0.59*G + 0.11*B
2)after that subtract two images I(Final)= I(Reference) -I(Real-time)
3)classify the pixels in two black or white ,for 8 bit gray scale value > 100 is a white color else it should be black
if [value > 100]
I = 255
I = 0

4) finally further smoothness will be provided on the basic of neighbour hood
5) Filter the shadow

now after that much thing , now you can extract information like height of car width of car, radius of wheel from the final image and providing this information to ANN and you will come up with a model of car