matlab实现矩形到给定形状/边界的最小二乘拟合

收录时间:2018-12-06
资源分类:Matlab 工具:MATLAB 7.6 (R2008a)

matlab实现矩形到给定形状/边界的最小二乘拟合

 

Least squares fit of a rectangle to a given shape/boundary

% Based on - A simple method for fitting of bounding rectangle to closed regions - D. Chaudhuri a , A. Samal b.

% fit_rectangle - Function provides a least squares fit to the

% given boundary points of an object of unknown shape.

%

% Inputs - Boundary elements that must be a Nx2 array. (atleast 3 required)

% Output -

% Bounding_points(4x2):

% Function will return a struct consisting of the bounding points

% equation_of_diagonals(2x2):

% Function will return the equation of the diagonal in the form

% y = mx +c (giving back m and c foreach diagonal).

% equation_of_bounding_sides(4x2):

% Equation of the Bounding sides in the form y = mx +c

% centroid(1x2):

% Location of the centroid in cartesian coordinates

文件下载列表
fit_rectangle.zip (1.85KB)  
附件内容(只显示2中的1个)
fit_rectangle.m  
更多

目前尚无评论

用户反馈   关于我们
Copyright (©) ZHIHUISHI.COM 2013 All Rights Reserved.
京ICP备14040384号