Quantcast
Channel: MATLAB Central - File Exchange - tag:"least squares"
Viewing all articles
Browse latest Browse all 522

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

$
0
0
306312011-03-03T23:55:28Z2011-03-03T23:55:28Z

% 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


Viewing all articles
Browse latest Browse all 522

Trending Articles