フィルターのクリア

how to implement LTP Feature extract

9 ビュー (過去 30 日間)
jacky huynh
jacky huynh 2021 年 10 月 17 日
編集済み: jacky huynh 2021 年 10 月 19 日
Hi everyone,
i have see code in matlab " extractLBPFeatures" , code as bellow, if LTP how to change (LTP is are an extension ), pls help me and explain how to thanks everybody
{
% -----------------------------------------------------------------
function lbp = computeMultibyteLBP(I, x, y, numNeighbors, interpolation, numBytes, offsets, weights)
coder.inline('always');
lbp = zeros(1,numBytes,'uint8');
center = I(y,x);
p2 = coder.internal.indexInt(numNeighbors);
p1 = coder.internal.indexInt((8*numBytes)-7+1);
for n = coder.unroll(1:numBytes) % MSB [xxxx] LSB
for p = p2:-1:p1 % reverse order b/c of bitshift to left
if strcmpi(interpolation, 'linear')
neighbor = vision.internal.LBPImpl.bilinearInterp(I, x, y, p, offsets, weights);
else
neighbor = vision.internal.LBPImpl.nearestInterp(I, x, y, p, offsets);
end
lbp(n) = bitor(lbp(n), uint8(neighbor >= center));
lbp(n) = bitshift(uint8(lbp(n)),uint8(1));
end
% bit p1-1
if strcmpi(interpolation, 'linear')
neighbor = vision.internal.LBPImpl.bilinearInterp(I, x, y, p1-1, offsets, weights);
else
neighbor = vision.internal.LBPImpl.nearestInterp(I, x, y, p1-1, offsets);
end
lbp(n) = bitor(lbp(n), uint8(neighbor >= center));
% next byte
p2 = p1-2;
p1 = p2-7+1;
end
end
}

採用された回答

Image Analyst
Image Analyst 2021 年 10 月 18 日

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeComputer Vision Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by