ENLARGEBB.m enlarges the size of a bounding box ENLARGEBB is a function to enlarge the size of a bounding box. Please note that this function was part of the RGBD tracker code presented in [1] and available under under Open Source MIT License at http://tracking.cs.princeton.edu/code.html INPUT: - smallBB input bounding box in the format [topLeftX, topLeftY, bottomRightX, bottomRightY] read as [columnIndexTopLeft, rowIndexTopLeft, columnIndexBottomRight, rowIndexBottomRight] -size size of the image -a increasing factor (i.e 0.1 for an increase of 10 percent) OUTPUT - bb output bounding box in the format [topLeftX, topLeftY, bottomRightX, bottomRightY] read as [columnIndexTopLeft, rowIndexTopLeft, columnIndexBottomRight, rowIndexBottomRight] See also CHECKOCCLUSIONSDSKCF_NOISEMODEL, CHECKOCCLUSIONSDSKCF_SECONDPLANE,TARGETSEARCHDSKCF, SINGLEFRAMEDSKCF [1] Shuran Song and Jianxiong Xiao. Tracking Revisited using RGBD Camera: Baseline and Benchmark. 2013.
0001 function bb = enlargeBB(smallBB,a,size) 0002 % ENLARGEBB.m enlarges the size of a bounding box 0003 % 0004 % ENLARGEBB is a function to enlarge the size of a bounding box. Please 0005 % note that this function was part of the RGBD tracker code presented in 0006 % [1] and available under under Open Source MIT License at 0007 % http://tracking.cs.princeton.edu/code.html 0008 % 0009 % INPUT: 0010 % - smallBB input bounding box in the format [topLeftX, topLeftY, 0011 % bottomRightX, bottomRightY] read as [columnIndexTopLeft, rowIndexTopLeft, 0012 % columnIndexBottomRight, rowIndexBottomRight] 0013 % -size size of the image 0014 % -a increasing factor (i.e 0.1 for an increase of 10 percent) 0015 % OUTPUT 0016 % - bb output bounding box in the format [topLeftX, topLeftY, 0017 % bottomRightX, bottomRightY] read as [columnIndexTopLeft, rowIndexTopLeft, 0018 % columnIndexBottomRight, rowIndexBottomRight] 0019 % 0020 % See also CHECKOCCLUSIONSDSKCF_NOISEMODEL, 0021 % CHECKOCCLUSIONSDSKCF_SECONDPLANE,TARGETSEARCHDSKCF, SINGLEFRAMEDSKCF 0022 % 0023 % [1] Shuran Song and Jianxiong Xiao. Tracking Revisited using RGBD 0024 % Camera: Baseline and Benchmark. 2013. 0025 % 0026 0027 x = a * (smallBB(3)-smallBB(1)); 0028 y = a * (smallBB(4)-smallBB(2)); 0029 bb(1)=max(1,smallBB(1)-x); 0030 bb(2)=max(1,smallBB(2)-y); 0031 bb(3)=min(size(2),smallBB(3)+x); 0032 bb(4)=min(size(1),smallBB(4)+y); 0033 bb=round(bb(:)); 0034 end 0035