curvefun.m

来自「车道检测中弯道的检测」· M 代码 · 共 8 行

M
8
字号
function [a,b,c] = CurveFun(pt1,pt2,pt3)
%由点pt1,pt2,pt3确定二次曲线的系数
temp23 = pt2.x-pt3.x;
temp31 = pt3.x-pt1.x;
temp12 = pt1.x-pt2.x;
a=(pt1.y*temp23+pt2.y*temp31+pt3.y*temp12)/(pt1.x*pt1.x*temp23+pt2.x*pt2.x*temp31+pt3.x*pt3.x*temp12);
b=(pt1.y-pt2.y-a*(pt1.x*pt1.x-pt2.x*pt2.x))/(pt1.x-pt2.x);
c=pt1.y-a*pt1.x*pt1.x-b*pt1.x;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?