function [corner_score,match_matrix] = compute_corner_score(A,B,threshold)
    [~,k]        = size(B);
    match_matrix = B\A;
    match_matrix = abs(normcol(match_matrix));
    m = match_matrix;
    
    if(threshold ~= -1)
        m(m <= threshold) = 0; 
    end
    [~,cost] = hungarian_assignment(-m);
    corner_score = -cost/k;
end