Code covered by the BSD License
-
calc_ortho_extreme( T,r,epsil...
CALC_ORTHO_EXTREME examines the orthogonal or "normal" on the curve
-
calc_refined_field( tf, im, s...
-
calc_sparse_field( image )
-
calc_vote_ball(T,im,sigma)
-
calc_vote_stick(T,sigma,cache...
CALC_VOTE_STICK votes using stick tensors returning a new
-
convert_tensor_ev( i1, i2, i3...
CONVERT_TENSOR_EV converts the tensor field to eigenvectors and
-
create_ball_tensorfield( sigm...
CREATE_BALL_TENSORFIELD creates a ball tensor field, sigma
-
create_cached_vf( sigma )
-
create_stick_tensorfield( uv,...
CREATE_STICK_TENSORFIELD Creates a second order tensor
-
demo(file)
-
find_features( im, sigma )
FIND_FEATURES returns the tensorfield after voting on the binary image im
-
read_dot_edge_file( filen )
READ_DOT_EDGE_FILE reads in the file and outputs a tensor
-
show_tensorfield( T )
SHOW_TENSORFIELD displays in a new figure the tensor field
-
View all files
from
Tensor Voting Framework
by Trevor Linton
Implementation of the 2D medioni tensor framework
|
| find_features( im, sigma ) |
function [ T ] = find_features( im, sigma )
%FIND_FEATURES returns the tensorfield after voting on the binary image im
% using the sigma supplied.
%
% T = find_features(im,sigma)
%
% IM should be a binary (logical) image.
% SIGMA should be the scale used in voting, i.e. 18.25.
%
% Returns a tensor field T
%
% Calculate cached voting field at various angles, this way we can save
% a lot of time by preprocessing this data.
cached_vtf = create_cached_vf(sigma);
% normalize the gray scale image from 0 to 1
im = double(im) / double(max(im(:)));
% First step is to produce the initially encode the image
% as sparse tensor tokens.
sparse_tf = calc_sparse_field(im);
% First run of tensor voting, use ball votes weighted by
% the images grayscale.
refined_tf = calc_refined_field(sparse_tf,im,sigma);
% third run is to apply the stick tensor voting after
% zero'ing out the e2(l2) components so that everything
% is a stick vote.
[e1,e2,l1,l2] = convert_tensor_ev(refined_tf);
l2(:) = 0;
zerol2_tf = convert_tensor_ev(e1,e2,l1,l2);
T = calc_vote_stick(zerol2_tf,sigma,cached_vtf);
end
|
|
Contact us at files@mathworks.com