loading
 
IMAGE_TIME
Chris from Canada  [1 posts]
15 year
I have a question regarding IMAGE_TIME. I am currently working on a project for school and using a variety of methods to try and calculate the trajectory of a thrown object using a side camera. One of these methods is by using basic 2d kinematics.

Initially I was simply using the FPS to determine the time between camera shots, however I figured that if the camera were to miss a frame for whatever reason, it would mess with my calculations and give me bad data. Instead I tried using IMAGE_TIME. However when I try to obtain an accurate time, I simply get round integers. I created a structure of doubles in C++ and am able to read COG_X and COG_Y to a great many decimal places but IMAGE_TIME always comes out as 199.0000, 200.0000, 201.0000. Even though the variables I am displaying to the screen are to 6 or 7 decimal places. Any ideas on why this is happening??

As I mentioned before I am using 2 approaches, the second being generating a best fit parabola based on a number of points taken. So far I think that this second approach is the better or the two but during capture, I am getting flicker points which are throwing my predicted curves off. Is there a sure way to reduce random flickering COG points??

--Chris
Anonymous 15 year
Chris,

I agree with the switch to IMAGE_TIME as FPS would not be a great way to calculate this.

What API routine are you using to get the IMAGE_TIME versus the COG_X?
If it is C++ be sure that it is using the atof instead of the atoi routine to convert a char array to a float. If not can you are more of your code?

You can use the Filter_Variables (new module) to smooth the COG points over the last 5 or so samples. That will help to reduce the noise.

http://www.roborealm.com/help/Filter_Variables.php

You may also have to adjust your curve fitting routine to ignore such outlier points.

STeven.
mehdi from Iran  [32 posts] 15 year
i think a new module that send a signal,is best way to solve timing problem!
it can send a signal to report pipe end or report nth line of pipe!
i need it too!
Anonymous 15 year
mehdi,

I'm not sure if I understand your post. Perhaps you can elaborate? It does not appear to be associated with the timing question from above.

STeven.
mehdi from Iran  [32 posts] 15 year
oh! sorry!
this post should not be here!
this post is a request for end pipe notifier module!
thanks!
Anonymous 15 year
Oh, you mean this thread:

http://www.roborealm.com/forum/index.php?thread_id=3262#2

We will address that there.

STeven.
mehdi from Iran  [32 posts] 15 year
thanks!

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index