Code covered by the BSD License  

Highlights from
Tensor Voting Framework

from Tensor Voting Framework by Trevor Linton
Implementation of the 2D medioni tensor framework

calc_sparse_field( image )
function [ T ] = calc_sparse_field( image )
    [h w] = size(image);
    T = zeros(h,w,2,2);
    
    [rows,cols] = find(image>0);
    
    n = size(rows,1);
    for i=1:n
        T(rows(i),cols(i),:,:) = [1,0;0,1];
    end
end

Contact us