From ac7a813ca3fa0d7b8ddb61499fa50eca1336101c Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Sat, 27 Jun 2015 20:09:12 +0800 Subject: upload all --- getFeatureExt.m | 46 +++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 21 deletions(-) (limited to 'getFeatureExt.m') diff --git a/getFeatureExt.m b/getFeatureExt.m index 791a7aa..0b55648 100644 --- a/getFeatureExt.m +++ b/getFeatureExt.m @@ -6,9 +6,9 @@ function [ minc,maxc ] = getFeatureExt( img ) cnls(:,:,4:6) = rgb2ycbcr(img); hsv = rgb2hsv(img); cnls(:,:,7:8) = hsv(:,:,1:2); - for i=1:ncnls - cnls(:,:,i) = histeq(cnls(:,:,i)); - end + %for i=1:ncnls + % cnls(:,:,i) = histeq(cnls(:,:,i)); + %end % Schmid scVec=[ 1,2; @@ -28,35 +28,39 @@ function [ minc,maxc ] = getFeatureExt( img ) 0.3,0,4,2; 0.3,0,8,2; 0.4,0,4,1; - 0.4,0,8,2; + 0.4,0,8,1; 0.3,pi/2,4,2; 0.3,pi/2,8,2; 0.4,pi/2,4,1; - 0.4,pi/2,8,2;]; + 0.4,pi/2,8,1;]; gb = length(gbVec); sc = length(scVec); minc = []; maxc = []; + for cnl = 1:ncnls + for sec = 1:secs + section = getSection(cnls(:,:,cnl),sec,secs); + res = section; + minc = cat(2,minc,min(min(res))); + maxc = cat(2,maxc,max(max(res))); + end + end for i = 1:sc - for cnl = 1:ncnls - for sec = 1:secs - filt = schmidFilter(scVec(i,1),scVec(i,2)); - section = getSection(cnls(:,:,cnl),sec,secs); - res = imfilter(section, filt, 'symmetric'); - minc = cat(2,minc,min(min(res))); - maxc = cat(2,maxc,max(max(res))); - end + for sec = 1:secs + filt = schmidFilter(scVec(i,1),scVec(i,2)); + section = getSection(hsv(:,:,3),sec,secs); + res = imfilter(section, filt, 'symmetric'); + minc = cat(2,minc,min(min(res))); + maxc = cat(2,maxc,max(max(res))); end end for i = 1:gb - for cnl = 1:ncnls - for sec = 1:secs - filt = gaborFilter(gbVec(i,1),gbVec(i,2),gbVec(i,3),gbVec(i,4)); - section = getSection(cnls(:,:,cnl),sec,secs); - res = imfilter(section, filt, 'symmetric'); - minc = cat(2,minc,min(min(res))); - maxc = cat(2,maxc,max(max(res))); - end + for sec = 1:secs + filt = gaborFilter(gbVec(i,1),gbVec(i,2),gbVec(i,3),gbVec(i,4)); + section = getSection(hsv(:,:,3),sec,secs); + res = imfilter(section, filt, 'symmetric'); + minc = cat(2,minc,min(min(res))); + maxc = cat(2,maxc,max(max(res))); end end end -- cgit v1.2.3-70-g09d2