function rect = boxToRect(box)
%BOXTORECT Convert box data to rectangle data
%
%   RECT = boxToRect(BOX)
%   Converts from boxrepresentation to rectangle representation.
%   BOX is given by [XMIN XMAX YMIN YMAX].
%   RECT is given by [X0 Y0 WIDTH HEIGHT], with WIDTH and HEIGHT > 0
%
%   See also
%   boxes2d, boxToPolygon, drawBox
%

% ------
% Author: David Legland
% e-mail: david.legland@inra.fr
% Created: 2012-08-23,    using Matlab 7.9.0.529 (R2009b)
% Copyright 2012 INRA - Cepia Software Platform.

rect = [box(:,1) box(:,3) box(:,2)-box(:,1) box(:,4)-box(:,3)];

rpng
github-repos/MATLAB/rpng-lips/lips-a97157e586b509c9c2e3e01e64e4347f36d0b63e/lips_matlab/matlab/functions/matGeom/geom2d/boxToRect.m
lips
github-repos/MATLAB/rpng-lips
a97157e586b509c9c2e3e01e64e4347f36d0b63e