代码之家  ›  专栏  ›  技术社区  ›  Michael

对于不同大小的图像,“extractLBPFeatures”返回的特征向量长度

  •  1
  • Michael  · 技术社区  · 8 年前

    我用过 extractLBPFeatures

    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
    

    b d

    提取LBP特征 ? (我知道这可能会影响分类任务)。

    1 回复  |  直到 8 年前
        1
  •  1
  •   Sardar Usama Francesco.s    8 年前

    为什么两者都是1x59 a c

    documentation ,

    N 表示功能的数量。。。整体LBP特征长度, N ,取决于单元格的数量和箱子的数量, B

    N = numCells x B
    

    其中,默认情况下,我们有:

    细胞大小等于大小(I);其中我是图像





    B=59

    N=1x59(默认)


    extractLBPFeatures ?

    如上述计算所示,通过减少 number of neighbours P ,更改 Rotation invariance flag the number of bins , ,你可以减少。但是你应该确定你在做什么。

    extractLBPFeatures(a,'Upright',false,'NumNeighbors',4);