diff options
author | Joe Zhao <ztuowen@gmail.com> | 2015-05-15 18:18:59 +0800 |
---|---|---|
committer | Joe Zhao <ztuowen@gmail.com> | 2015-05-15 18:18:59 +0800 |
commit | 81d9c2360fd88422fcf7c8bd176f0ae07af2a9bf (patch) | |
tree | bae7b6f5ded34e5d9e5244b3e51861620c9b64a4 /getFeatureExt.m | |
parent | c02789c3194059233b275a2de76c33f5456f0a11 (diff) | |
download | featext-81d9c2360fd88422fcf7c8bd176f0ae07af2a9bf.tar.gz featext-81d9c2360fd88422fcf7c8bd176f0ae07af2a9bf.tar.bz2 featext-81d9c2360fd88422fcf7c8bd176f0ae07af2a9bf.zip |
updated range
Diffstat (limited to 'getFeatureExt.m')
-rw-r--r-- | getFeatureExt.m | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/getFeatureExt.m b/getFeatureExt.m new file mode 100644 index 0000000..791a7aa --- /dev/null +++ b/getFeatureExt.m @@ -0,0 +1,63 @@ +function [ minc,maxc ] = getFeatureExt( img ) + ncnls = 8; + secs = 6; + cnls = zeros(size(img,1), size(img,2),ncnls); + cnls(:,:,1:3) = 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 + % Schmid + scVec=[ + 1,2; + 1,4; + 2,4; + 1,6; + 2,6; + 3,6; + 1,8; + 2,8; + 3,8; + 1,10; + 2,10; + 3,10; + 4,10]; + gbVec = [ + 0.3,0,4,2; + 0.3,0,8,2; + 0.4,0,4,1; + 0.4,0,8,2; + 0.3,pi/2,4,2; + 0.3,pi/2,8,2; + 0.4,pi/2,4,1; + 0.4,pi/2,8,2;]; + gb = length(gbVec); + sc = length(scVec); + minc = []; + maxc = []; + 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 + 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 + end + end +end + |