11-03-2011 05:59 PM
@saqib_zahir wrote:
Could you post a picture of it on the carpet that you are testing with?
11-03-2011 06:04 PM
@saqib_zahir wrote:
4) Also how can I capture the time from the webcams in Labview? (to work out speed)
This may be of use
http://zone.ni.com/reference/en-XX/help/371361E-01/glang/tick_count_ms/ (v8.6)
http://zone.ni.com/reference/en-XX/help/371361G-01/glang/tick_count_ms/ (v2010)
Note, it won't get it from the webcam itself.
11-03-2011 06:23 PM
Thanks for your reply: I think that timer will do the trick actually. If I start the timer from the begining of the program then I should be able to capture time at any time of the program. Thanks for the direction, ill see what I can do for that.
Vision:
I have attatched the folder of images I was using including with the ball on the carpet. The background image is simply the "Final Back image" inside the zip. If I correctly remember, everytime I thresholded the shadow of the ball was included. I spent hours trying different ypes of Adv. Morphology etc, but could not hack it. I tried remove the shadow from the image, in addition to the original background, with ideally the ball lefft behind. Unfortuntaly no success from my side
Thanks for your interest and help up until now
Saqib
11-03-2011 10:23 PM
saqib_zahir wrote:If I correctly remember, everytime I thresholded the shadow of the ball was included.
Saqib
I'd suggest getting more even lighting in there. (ie get a light from other directions too), this should help remove the shadows.
11-07-2011 11:42 AM
Hi there - thanks for your suggestion and will do that soon.
Got an email from logitec (Finally!) and they have said:
"Thank you for contacting Logitech's Customer Care.
Your camera is a standard fixfocus webcam with a focus range from 40cm to infinity. I hope this helps."
Well, I emailed them back asking more specifically, is fully clockwise at 40cm or at infinity. I also asked how the behaviour of the focul length occurs when turn the lens on the webcam. Unless somebody knows how the behaviour is of focul length between these two extremes.
Query 1:
Thanks for the links for obtaining the time. I found an example and used it in my current penny detection VI. It works out the time so thats good.
But the VI have attatched shows the results are very slow. I mean, without the timer and the sequence, the webcam was at 30 frames per second, but now the Live webcam takes 2 seconds to update. Is there not another way to get the time than the way I have done?
Query 2:
I got to compute speed too, in the VI. BUT:
it is wrongly computed as it is not using the change in position. Can anyone help me with determing the change in position of the object of interest.
I tried using the "geometric coordinates" but I can not appreciate how to store this inforation in memory, so that I can then on the next round perform New position - old position, and thus the speed is continously updated.
Query 3:
Why is it that I now have to click on "continous play" to run VI. I have a while loop, and I dont anually press stop so why does it stop when you hit run once?
11-08-2011 07:10 PM
I use an older version of LabVIEW so I can't open your attached code but....
1)
Can't really look at this without an 8.6 version of the code.
2)
Without looking at the code, a loop with feedback nodes would let you store the current output to be used in the next loop iteration.
3)
You'd have to look at the loop entry/exit conditions to work this out.
11-09-2011 08:47 AM
OK Thanks for that. I did not know that Feedback could do it and from what I have looked in the "detailed help" it most certainly looks like it will work with it.
I will have a go and give it a try. But I will be back though.
I attatched an 8.6 version of the code in the meantime for you to look at my current camera problems. To use the template, open up my zip file in my original post and look for the "good penny.png" template. So if you want to test it, you can also use a penny coin to. The code will not run because I added the feedback node you suggested.
Thanks for your help so far, Its keeping the project moving.
Saqib
11-09-2011 08:40 PM
@saqib_zahir wrote:
Query 3:
Why is it that I now have to click on "continous play" to run VI. I have a while loop, and I dont anually press stop so why does it stop when you hit run once?
Looking at your code, it's because you have thhe loop set to continue only if the stop button ("exit program" on the diagram) is pressed.
If you want it to keep looping until you hit that button, change it to "stop if true" rather than "continue if true"
11-09-2011 08:53 PM
saqib_zahir wrote:The code will not run because I added the feedback node you suggested.
Saqib
You could also use a shift register, but that could get messy with that loop.
Post back here when you've got the distance moved thing working
remembering sqrt((new_x - old_x)^2 + (new_y - old+y)^2) , so you'll want to put in some code to get the difference between the output of the image detection, and the output of the feedback node.
The input of the feedback node would connect to the output of the image detection code. The bottom input would connect to the same place.
11-09-2011 08:53 PM
@Hornless.Rhino wrote:
("exit program" on the diagram) is pressed.
That should have said, on the front panel.