Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 LBP 进行“人脸手势的机器检测”。我刚刚使用此代码将 RGB 图像转换为 LBP 图像。我的任务的下一步是将 LBP 图像划分为 3x3 并显示每个块的直方图以检测手势位置,如下图所示:
图像及其直方图
试试mat2cell。假设您的矩阵是NXN方阵:
NXN
matSize = size(inputMatrix,1); subMatrix = mat2cell(inputMatrix,3*ones(1,matSize/3),3*ones(1,matSize/3));