-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webcam CyberLink Webcam Splitter 0 has already been locked #174
Comments
Hi @ajay154, which webcam capture version are you using? |
@sarxos i am using webcam-capture-0.3.10-RC4 version |
@ajay154, thank you for the clarification. Can you please try with RC6? There were fixes introduced within the locking mechanism after RC4 in regards to #65, #128 and #131. Please also check if you are not running the same process in parallel - locking mechanism has been created to prevent such situations (when one webcam capture process has camera open and the second one is trying to open it again). |
@sarxos thank you...now its working,but in eclipse |
HI @ajay154,
The Signal API is restricted, but it should not give you any errors. This is most likely your Eclipse setting problem - please google for the solution or change the settings as described here.
Well, there are dozens of possible solutions. E.g. the naive one - assume you know the scale ratio between the image size and real view dimension (e.g. 640 px = 2 meters), you can get the COG (center-of-gravity) point of motion detector, which may be used to calculate the distance between two consecutive frames. Let PCOG1(x1,y1) be a center-of-gravity point of frame 1 and PCOG2(x2,y2) a center-of-gravity point of frame 2, and the distance the object moved on the image is Δpx = √(|x2 - x1|2 + |y2 - y1|2), which may be translated to view dimension by multiplying by scale factor s defined as s = dm/dpx [m/px] where dpx and dm are corresponding distances from image and real view. Multiplication gives you the number of meters per single pixel unit. If you assume that t is a time difference between two snapshots, you can calculate the object speed as v = Δpx * s / t [m/s] Please note that this is naive approach and not super accurate - you have to assume that only measured object is moving and its geometry is constant. Otherwise COG will be calculated incorrectly. If you are looking for other, more advanced solution, you may use features tracking, e.g. from awesome OpenIMAJ framework. To implement naive approach using Webcam Capture API only, you will need to change the |
Thanks,I want to use image difference between consecutive images as it is done here http://morefunscience.blogspot.in/2012/05/calculating-speed-using-webcam.html . |
Yup, exactly the same method, but bounds used instead of COG. Good luck :) |
How to change the version through maven dependency? |
when I executed DetectMotionExample.java it give me error::
The text was updated successfully, but these errors were encountered: