Home > SuperSegger > Internal > getBB.m

getBB

PURPOSE ^

getBB : coordinates from start to end of bounding box

SYNOPSIS ^

function [xx,yy] = getBB( bb1 )

DESCRIPTION ^

 getBB : coordinates from start to end of bounding box
 along the x and y axis

 INPUT :
       bb1: bounding box [x, y, width, height]
 OUTPUT :
       xx : array from start to end of bounding box along x
       yy : array from start to end of bounding box along y

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [xx,yy] = getBB( bb1 )
0002 % getBB : coordinates from start to end of bounding box
0003 % along the x and y axis
0004 %
0005 % INPUT :
0006 %       bb1: bounding box [x, y, width, height]
0007 % OUTPUT :
0008 %       xx : array from start to end of bounding box along x
0009 %       yy : array from start to end of bounding box along y
0010 
0011 % Copyright (C) 2016 Wiggins Lab
0012 % Written by Paul Wiggins.
0013 % University of Washington, 2016
0014 % This file is part of SuperSegger.
0015 %
0016 % SuperSegger is free software: you can redistribute it and/or modify
0017 % it under the terms of the GNU General Public License as published by
0018 % the Free Software Foundation, either version 3 of the License, or
0019 % (at your option) any later version.
0020 %
0021 % SuperSegger is distributed in the hope that it will be useful,
0022 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0023 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0024 % GNU General Public License for more details.
0025 %
0026 % You should have received a copy of the GNU General Public License
0027 % along with SuperSegger.  If not, see <http://www.gnu.org/licenses/>.
0028 
0029 ymin = ceil(bb1(2));
0030 xmin = ceil(bb1(1));
0031 ymax = ymin+floor(bb1(4))-1;
0032 xmax = xmin+floor(bb1(3))-1;
0033 
0034 yy = ymin:ymax;
0035 xx = xmin:xmax;
0036 
0037 end

Generated on Thu 19-Jan-2017 13:55:21 by m2html © 2005