Hi, I'm developing a project in Java. The problem is :- In a steel plant steel blocks are generated one by one and they go through a platform on by one continuously. There is a fixed camera ,watching the motion of the blocks continuously.I've to determine the speed of the blocks. I'm approaching in the following manner:-
1)I'm capturing the frames of the real time movie(through a digital camera).I've approached in this way to capture frames separately ,The movie is being displayed in a computer monitor in (200x200) dimension.With the help of java robot class's screen capture method I'm capturing frames displayed in the screen continuously(not from total monitor size,but only the portion on which the movie is being displayed),I'm capturing frames,average 1frame/sec(Pentium 4,
2Gz) speed.Roughly 60 pictures / sec (My Query:- Is this approach ok?(I've not seen such approach anywhere till now in internet. Am I doing any major mistake?)
2)I'm saving the grabbed frames in hard disk simultaneously.
3)Another program is collecting these picture frames one by one ,processing it by converting it to gray scale with edge detection and then binarizing it(above color value150 everything is white else black). (Query:-1)Should I use FFT for such applications?2)Should I change threshold value dynamically?)
4)After that I'm tracking some particular pixel continuously , measuring displacements between quardinate.If I know the time difference between capture of two picture frames I can find the speed.(Suppose 1 pixel shift=100 meter or like that).
My Problem:-How can I get exact time difference between two frames?(is it possible to get it in mili second?)
Request:- Please give me some guidance don't have any experience in such applications. Is it any relevant way in which I'm approaching?Please suggest some better way(not very complex) which can make my job better.
Thanks and Regards
Subhadip Mukherjee