|
One very important aspect that is missing here is the angle at which these webcam will measure the points.
There needs to be a levelor on the vehicle that measure the angle of webcam from horizon (Which cannot be assumed since the vehicle will be moving).
Once you have that angle, you could take the distance between those white lines at a particular angle from horizon to normalize all distances. This distance will always be correct.
|
|
|
|
|
The cameras are set at the edges of the front of the chassis of the robot at a 45 on the x, and a 45 degree on the -z. The matrix calculates the distancing regardless of known angle by comparing the four known points to the field of view of the camera. My issue is not in distancing, but rather in accurately knowing the distance and angle of the closest point of each line.
|
|
|
|
|
Hi,
I haven't done these things myself, however I would not bother about distances too much, instead I would replace the two white lines by a single line; a simple interpolation should yield that. Then aim for a point on the imaginary line, at a reasonable (but not very important) distance in front of you, and update your aiming point while moving.
|
|
|
|
|
The interpolation method would be fine if there were no obstacles that can take up 80% of the track width, I would need to allow the robot to deviate from the imaginary interpolated line almost to the point of crossing the real lines, as well as not being able to see the white lines up close where an obstacle is two feet away from a white line and that is the only method of progressing the course. I have seen a few robots fail last year in this point. The cameras interpolated the lines but when the robot got to a close pinch between obstacle and line, they merely ran through the white line and got back on course but rules state u can not pass lines...ever...
|
|
|
|
|
I see, thanks for that. I'll be looking forward to your article.
Is there a web site on the whole event?
|
|
|
|
|
Yes www.IGVC.org, we have 72 days till competition! Wish us luck!
|
|
|
|
|
Thanks.
Of course I wish you the best of luck.
Did you ask CodeProject for sponsoring and/or publicity? I'm not sure they do, they just might.
|
|
|
|
|
Good afternoon.
If I enter
FriendlyName="Policyholder's <%$ CompanyResource.SsnNinLongLabel %>" , the validation only returns “Policyholder’s is required”.
Does anyone know how to do this?
Thank you, WHEELS
|
|
|
|
|
Hi folks
Would higly appreciate your help on this.
Suppose a C# Windows Service is running with some domain user login/password...
Now suppose the user's password expires...
Will the service keep running? or will it stop as soon as the password expires?
|
|
|
|
|
Don't spam the forums. You have already asked this question and receieved a response in another forum.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
i want to find and replace img src path by regular expression. please help.
suppose i have the below html and from there i want to replace file path of all the src attribute of image tag.
<P>Hello</P>\r\n<P> </P>\r\n<P><IMG alt=\"C:\\Documents and Settings\\All Users\\Documents\\My Pictures\\Sample Pictures\\Sunset.jpg\" src=\"C:\\Documents and Settings\\All Users\\Documents\\My Pictures\\Sample Pictures\\Sunset.jpg\"></P>
here the file path is src=\"C:\\Documents and Settings\\All Users\\Documents\\My Pictures\\Sample Pictures\\Sunset.jpg\"
and i want to replace it with path like src="www.mysite.com/images/a.gif" with regular expression.
please guide me how can i do it with regular expression.
tbhattacharjee
|
|
|
|
|
Regex r = new Regex(@"(?<=src="")([^""]+)(?="")");
string s = "<P>Hello</P>\r\n<P> </P>\r\n<P><IMG alt=\"C:\\Documents and Settings\\All Users\\Documents\\My Pictures\\Sample Pictures\\Sunset.jpg\" src=\"C:\\Documents and Settings\\All Users\\Documents\\My Pictures\\Sample Pictures\\Sunset.jpg\"></P>";
string t = r.Replace(s, "new url");
Get a copy of Expresso[^] - examines and generates Regular expressions. It's free and really helps!
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
Hi Friends
I am working with windows application..using C#.
I have and MDI form which have the following variables..
public String FranchisorName = "", FranchiseeName = "", LocationName = "", UserName = "";
public String strlblProcess, strlblBatch;
public String Flag = "";
public String QBFName = "";
public String ConnectionString;
and I wand access these values in another form i.e Child form which has the following code..
public frmMDIMain objMDIMain = new frmMDIMain();
String temp = objMDIMain.ConnectionString;
But I am not able to retirive the value of ConnectionString variable...
please help me out..
thanx in advance..
|
|
|
|
|
That is because when you write
public frmMDIMain objMDIMain = new frmMDIMain(); in your child form it creates a new instance of the MDI main form. You need to access the existing MDI parent, via the MdiParent property instead.
See also DaveyM69's tip on passing data between forms.[^]
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
hey,
i need to fill two dictionaries with data, so i send each dictionary from one class to MultiThreaded Class by ref...
here how it's looks like
public EnglishDataBase()
{
MultiThread mt = new MultiThread();
englishCapLetter = new Dictionary<char, int>();
englishSmallLetter = new Dictionary<char, int>();
Thread t1 = new Thread(new ThreadStart(mt.fillCaps(ref englishCapLetter))));
Thread t2 = new Thread(new ThreadStart(mt.fillUnCaps(ref englishSmallLetter)));
t1.Start();
t2.Start();
t1.Join();
t2.Join();
}
public void fillCaps(ref Dictionary<char, int> englishCapLetter)
{
while (!sr1.EndOfStream)
{
string letter = sr1.ReadLine();
englishCapLetter.Add(char.Parse(letter.ToUpper()), char.Parse(letter.ToUpper()));
}
}
public void fillUnCaps(ref Dictionary<char, int> englishSmallLetter)
{
while (!sr2.EndOfStream)
{
string letter = sr2.ReadLine();
englishSmallLetter.Add(char.Parse(letter.ToLower()), char.Parse(letter.ToLower()));
}
}
but then i get a "Method name expected" in t1 and t2 creation compilation error...
what's wrong with implementation i did ?
tanks in advance
|
|
|
|
|
|
already saw it, that's what i did
thanks any way
|
|
|
|
|
No, that's not what you did. Read more carefully.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
i meant to "that's what i did eventually..."
|
|
|
|
|
You just have to set the name of the method that should run in you thread.
Something like this:
Thread t1 = new Thread(new ThreadStart(mt.fillCaps));
To work with parameter you have to use the ParameterizedThreadStart delegate.
Thread t1 = new Thread(new ParameterizedThreadStart(mt.fillCaps));
Thread t2 = new Thread(new ParameterizedThreadStart(mt.fillUnCaps));
t1.Start(englishCapLetter);
t2.Start(englishSmallLetter);
t1.Join();
t2.Join();
Greetings
Covean
|
|
|
|
|
that's exactly what i did...
and it did work with complex object (Dictionary\instance of class etc...) but when i tried that method with "cooler" object as string, i got null after the thread has stopped running, i tried to debug, and i see that inside the thread the string object does get data from file, but it doesn't give it back to the one who called that thread. i was thinking that ParameterizedThreadStart transfers by ref, was i wrong ?
thanks
p.s
of course, i would like to get some ideas how to solve that issue...
|
|
|
|
|
you don't need the ref keyword, all objects are passed by reference, i.e. their pointer value is shared, so every party involved can modify the object (mind you: modify, not replace).
|
|
|
|
|
then why i cant transfer string object by ref ? it's only transfers by val
|
|
|
|
|
strings (and almost all structs) are immutable, when you think you modify a string, you are actually replacing it by a new string. Most objects are not immutable, so you can pass Forms and Controls and Dictonaries around, modify them, and have the caller see your modifications without limitations.
|
|
|
|
|
Damn, I need to type faster
I know the language. I've read a book. - _Madmatt
|
|
|
|