Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to follow a line while moving in (x,y) plane?

In short what i want is to follow a line like the guy in this video:
https://www.youtube.com/watch?v=iHiasfAE63k

He talked a little bit about his algorithm in the description and in the comment section, but he wasn't that clear, since This type of following the line has great applications, i thought you guys might help me shed some light on it.

In the video description he said: "The line intersects the roi and the vector is calculated"
Question1: What vector he is talking about? a vector of what exactly?

In the comment section he said:

"I get the array of values from my ROI, one per degree. I then set a threshold level and turn these values into binary values. In my direction of travel I set a region (30 degrees) either side of that point and disregard anything outside of it. I find the centre value of the binary array representing line. This gives me an angle to drive to. I then turn this into a x and y velocity using sin cos functions. I feed the x any velocity into the stepper drives and the camera closes the loop."

Question2: What values he is extracting from the ROI? and what does "one per degree" mean in this context? Question3: Why would he need a threshold? isn't the image already binary?
Question4: What direction of travel?, and what point?
Question5: What does the center value of binary array mean?!
Question6: How is he getting his angle of travel?

As you guys see, i didn't understand a thing from his explanation? any help please.

How to follow a line while moving in (x,y) plane?

In short what i want is to follow a line like the guy in this video:
https://www.youtube.com/watch?v=iHiasfAE63k

He talked a little bit about his algorithm in the description and in the comment section, but he wasn't that clear, since This type of following the line has great applications, i thought you guys might help me shed some light on it.

In the video description he said: "The line intersects the roi and the vector is calculated"
Question1: What vector he is talking about? a vector of what exactly?

In the comment section he said:

"I get the array of values from my ROI, one per degree. I then set a threshold level and turn these values into binary values. In my direction of travel I set a region (30 degrees) either side of that point and disregard anything outside of it. I find the centre value of the binary array representing line. This gives me an angle to drive to. I then turn this into a x and y velocity using sin cos functions. I feed the x any velocity into the stepper drives and the camera closes the loop."

Question2: What values he is extracting from the ROI? and what does "one per degree" mean in this context? context
Question3: Why would he need a threshold? isn't the image already binary?
Question4: What direction of travel?, and what point?
Question5: What does the center value of binary array mean?!
Question6: How is he getting his angle of travel?

As you guys see, i didn't understand a thing from his explanation? any help please.