'extractLBPFeatures' 为不同大小的图像返回的特征向量的长度
Length of feature-vector returned by 'extractLBPFeatures' for different size of images
我已经使用 extractLBPFeatures
对 64*64 和 200*200 图像进行特征提取。
a=imread('f1.jpg'); % f1.jpg is of size 64*64
b=extractLBPFeatures(a);
size(b)
ans =
1 59
c = imresize(a, [200 200]); % a resized image.
d=extractLBPFeatures(c);
size(d)
ans =
1 59
我注意到,在这两种情况下,它都是 returns 长度为 1*59 的向量(上面代码中的 b
和 d
)。这是为什么?
有没有办法减少vector长度的个数?即有没有办法减少 extractLBPFeatures
返回的参数数量? (我知道这可能会影响分类任务)。
为什么 a
和 c
都是 1x59?
LBP feature vector is returned as a 1-by-N vector of length N
representing the number of features... The overall LBP feature length, N
, depends on the number of cells and the number of bins, B
:
N = numCells x B
默认情况下,我们有:
单元格大小等于大小(I);
numCells = prod(地板(尺寸(I)/ CellSize));
⇒ 细胞数 = 1
B = (P × P–1) + 3
⇒
乙 = 59
⇒ N = 1x59(默认)
有没有办法减少extractLBPFeatures
返回的参数数量?
如上计算所示,通过减少number of neighbours, P
, changing the Rotation invariance flag and hence the number of bins、B
,你可以减少它。但是你应该确定你在做什么。
一个例子:
extractLBPFeatures(a,'Upright',false,'NumNeighbors',4);
我已经使用 extractLBPFeatures
对 64*64 和 200*200 图像进行特征提取。
a=imread('f1.jpg'); % f1.jpg is of size 64*64
b=extractLBPFeatures(a);
size(b)
ans =
1 59
c = imresize(a, [200 200]); % a resized image.
d=extractLBPFeatures(c);
size(d)
ans =
1 59
我注意到,在这两种情况下,它都是 returns 长度为 1*59 的向量(上面代码中的 b
和 d
)。这是为什么?
有没有办法减少vector长度的个数?即有没有办法减少 extractLBPFeatures
返回的参数数量? (我知道这可能会影响分类任务)。
为什么 a
和 c
都是 1x59?
LBP feature vector is returned as a 1-by-N vector of length
N
representing the number of features... The overall LBP feature length,N
, depends on the number of cells and the number of bins,B
:N = numCells x B
默认情况下,我们有:
单元格大小等于大小(I);
numCells = prod(地板(尺寸(I)/ CellSize));
⇒ 细胞数 = 1
B = (P × P–1) + 3
⇒
乙 = 59
⇒ N = 1x59(默认)
有没有办法减少extractLBPFeatures
返回的参数数量?
如上计算所示,通过减少number of neighbours, P
, changing the Rotation invariance flag and hence the number of bins、B
,你可以减少它。但是你应该确定你在做什么。
一个例子:
extractLBPFeatures(a,'Upright',false,'NumNeighbors',4);