lane-detection-evaluation

来源:互联网 发布:js验证用户名重复 编辑:程序博客网 时间:2024/05/21 10:54

python 计算点到直线的距离
点(a,b)到直线Ax+By+C=0的距离为d=|Aa+Bb+C|/√(A^2+B^2)

/// <summary>/// 点到直线的距离public static float PointToStraightlineDistance(Vector3 lineStartPoint, Vector3 lineEndPoint, Vector3 targetPoint){    //需要转到2维平面计算    Vector2 startVe2 = IgnoreYAxis(lineStartPoint);    Vector2 endVe2 = IgnoreYAxis(lineEndPoint);    float A = endVe2.y - startVe2.y;    float B = startVe2.x - endVe2.x;    float C = endVe2.x * startVe2.y - startVe2.x * endVe2.y;    float denominator = Mathf.Sqrt(A * A + B * B);    Vector2 pointVe2 = IgnoreYAxis(targetPoint);    return Mathf.Abs((A * pointVe2.x + B * pointVe2.y + C) / denominator);}/// <summary>/// 去掉三维向量的Y轴,把向量投射到xz平面。/// </summary>/// <param name="vector3"></param>/// <returns></returns>public static Vector2 IgnoreYAxis(Vector3 vector3){    return new Vector2(vector3.x, vector3.z);}

evaluation
多点确定一条直线

https://www.cnblogs.com/sumai/p/5211558.html
python求线性回归斜率-在Python中使用线性回归预测数据http://python.jobbole.com/81215/
距离度量以及python实现(一)
https://www.cnblogs.com/denny402/p/7027954.html

ImportError: No module named model_selection

 guess you have the wrong version of scikit-learn, a similar situation was described here on GitHub. Previously (before v0.18), train_test_split was located in the cross_validation module:from sklearn.cross_validation import train_test_splitHowever, now it's in the model_selection module:from sklearn.model_selection import train_test_splitso you'll need the newest version.To upgrade to at least version 0.18, do:pip install -U scikit-learn(Or pip3, depending on your version of Python). If you've installed it in a different way, make sure you use another method to update, for example when using Anaconda.
原创粉丝点击