private void btn_Test_Click(object sender, RoutedEventArgs e)
{
CogFitCircle cogFitCircle = new CogFitCircle();
cogFitCircle.AddPoint(0, 10);
cogFitCircle.AddPoint(10, 0);
cogFitCircle.AddPoint(0, -10);
cogFitCircle.AddPoint(-10, 0);
CogFitCircleResult res = cogFitCircle.Execute("@");
CogCircle cogCircle = res.GetCircle();
MessageBox.Show($"cx = {cogCircle.CenterX:F3} cy = {cogCircle.CenterY:F3} r = {cogCircle.Radius}");
CogNPointToNPoint cogNP = new CogNPointToNPoint();
cogNP.AddPointPair(100, 100, 10, 10);
cogNP.AddPointPair(150, 100, 15, 10);
cogNP.AddPointPair(200, 100, 20, 10);
cogNP.AddPointPair(200, 150, 20, 15);
cogNP.Ad服务器托管网dPointPair(150, 150, 15, 15);
cogNP.AddPointPair(100, 150, 10, 15);
cogNP.AddPointPair(100, 200, 10, 20);
cogNP.AddPointPair(150, 200, 15, 20);
cogNP.AddPointPair(200, 200, 20, 20);
ICogTransform2D trans = cogNP.ComputeGroupAFromGroupBTransform(out double rmsError);
cogNP.ComputationMode = CogCalibFixComputationModeConstants.Linear;
cogNP.DOFsToCompute = CogNPointToNPointDOFConstants.ScalingAspectRotationSkewAndTranslation;
double or_x = 13, or_y = 14;
trans.MapPoint(or_x, or_y, ou服务器托管网t double x, out double y);
CogTransform2DLinear linear = trans as CogTransform2DLinear;
double r = linear.MapAngle(Math.PI);
MessageBox.Show($"or_x = {x:F3} or_y = {y:F3} r = {r:F3} RMSERROR = {rmsError}");
}
输出:
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
机房租用,北京机房租用,IDC机房托管, http://www.fwqtg.net
相关推荐: windows + ubuntu + vscode开发环境配置安装
一、卸载WSL/WSL2 如果安装了windows子系统的朋友,可以选择继续使用。或者提前卸载WSL,再选择安装虚拟机。虚拟机占用内存较大,WSL可能对于开发的一些需求还有欠缺。根据自己的实际情况进行选择。 WIN10/11安装WSL(请参考官方资料,很详细)…