cosfn.m
来自「利用ICA变换进行人脸检测,是一种新的人脸检测方法」· M 代码 · 共 15 行
M
15 行
% function [S] = cosFn(mat1,mat2),% Computes the cosine (normalized dot product) between training vectors in % columns of mat1 and test vectors in columns of mat2. Outputs a matrix of % cosines (similarity matrix). %% Written by Ian Fasel.function [S] = cosFn(mat1,mat2), denom = sum(mat1.^2,1)*sum(mat2'.^2,2); denom (find(denom==0)) = 0.00000000000000000000001; numer = mat1'*mat2; S = numer./denom;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?