From 65d9b06a025732def37bdbf92bb9ff574c333fe8 Mon Sep 17 00:00:00 2001 From: Julieta Date: Mon, 9 Feb 2015 17:08:03 -0800 Subject: [PATCH] Update bbApply.m --- detector/bbApply.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detector/bbApply.m b/detector/bbApply.m index 66ad9a7e..c24593a3 100644 --- a/detector/bbApply.m +++ b/detector/bbApply.m @@ -347,7 +347,7 @@ for b=1:n M=char2img(sprintf('%.4g',bb(b,5)),fh); M=M{1}==0; [h,w]=size(M); y0=bb(b,2); y1=y0+h-1; x0=bb(b,1); x1=x0+w-1; - if( x0>=1 && y0>=1 && x1<=size(I,2) && y1<=size(I,2)) + if( x0>=1 && y0>=1 && x1<=size(I,2) && y1<=size(I,1)) Ir=I(y0:y1,x0:x1,1); Ig=I(y0:y1,x0:x1,2); Ib=I(y0:y1,x0:x1,3); Ir(M)=fcol(b,1); Ig(M)=fcol(b,2); Ib(M)=fcol(b,3); I(y0:y1,x0:x1,:)=cat(3,Ir,Ig,Ib);