Skip to content

Commit

Permalink
Bug fixes from Dong Li
Browse files Browse the repository at this point in the history
git-svn-id: file://localhost/Volumes/Storage/SVNRepository/Research/RANSAC@51 876389e7-766b-4580-87e5-4a53071d1477
  • Loading branch information
zuliani committed Nov 20, 2011
1 parent 5f8a863 commit 88d4b83
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 15 deletions.
1 change: 0 additions & 1 deletion Examples/VERSION.txt

This file was deleted.

2 changes: 1 addition & 1 deletion Examples/test_RANSAC_RST.m
Expand Up @@ -27,7 +27,7 @@
options.man_fun = @error_RST;
options.mode = 'MSAC';
options.Ps = [];
options.notify_iter = [];
options.notify_iters = [];
options.min_iters = 1000;
options.fix_seed = false;
options.reestimate = true;
Expand Down
9 changes: 5 additions & 4 deletions Examples/test_RANSAC_affine.m
Expand Up @@ -27,7 +27,7 @@
options.man_fun = @error_affine;
options.mode = 'MSAC';
options.Ps = [];
options.notify_iter = [];
options.notify_iters = [];
options.min_iters = 1000;
options.fix_seed = false;
options.reestimate = true;
Expand All @@ -50,7 +50,7 @@
Aphi = 30;
phi = Aphi*pi*(rand()-0.5);
T = rand(2, 1);
gamma = 0.05*randn(1);
gamma = 0.30*randn(1);

C = s*cos(phi);
S = s*sin(phi);
Expand Down Expand Up @@ -103,8 +103,9 @@
results.Theta(2) results.Theta(1)];
T = results.Theta(3:4);

X1_map = R*X1 + repmat(T, 1, size(X1,2));
X2_map = R\(X2 - repmat(T, 1, size(X1,2)));
A = H(1:2, 1:2);
X1_map = A*X1 + repmat(T, 1, size(X1,2));
X2_map = A\(X2 - repmat(T, 1, size(X1,2)));

figure;

Expand Down
2 changes: 1 addition & 1 deletion Examples/test_RANSAC_homography.m
Expand Up @@ -28,7 +28,7 @@
options.man_fun = @error_homography;
options.mode = 'MSAC';
options.Ps = [];
options.notify_iter = [];
options.notify_iters = [];
options.min_iters = 1000;
options.fix_seed = false;
options.reestimate = true;
Expand Down
2 changes: 1 addition & 1 deletion Examples/test_RANSAC_line_01.m
Expand Up @@ -27,7 +27,7 @@
options.man_fun = @error_line;
options.mode = 'MSAC';
options.Ps = [];
options.notify_iter = [];
options.notify_iters = [];
options.min_iters = 1000;
options.fix_seed = false;
options.reestimate = true;
Expand Down
2 changes: 1 addition & 1 deletion Examples/test_RANSAC_line_02.m
Expand Up @@ -21,7 +21,7 @@
options.man_fun = @error_line;
options.mode = 'MSAC';
options.Ps = [];
options.notify_iter = [];
options.notify_iters = [];
options.min_iters = 100;
options.fix_seed = false;
options.reestimate = true;
Expand Down
2 changes: 1 addition & 1 deletion Examples/test_RANSAC_plane.m
Expand Up @@ -27,7 +27,7 @@
options.man_fun = @error_plane;
options.mode = 'MSAC';
options.Ps = [];
options.notify_iter = [];
options.notify_iters = [];
options.min_iters = 1000;
options.fix_seed = false;
options.reestimate = true;
Expand Down
4 changes: 2 additions & 2 deletions Models/Affine/mapping_affine.m
Expand Up @@ -57,8 +57,8 @@
dx = xs-b1;
dy = ys-b2;
det = a11*a22 - a12*a21;
xd = ( a22*xs - a12*ys)/det;
yd = (-a21*xs + a11*ys)/det;
xd = ( a22*dx - a12*dy)/det;
yd = (-a21*dx + a11*dy)/det;
end;

% make sure the points are returned as row vectors
Expand Down
5 changes: 3 additions & 2 deletions RANSAC.m
Expand Up @@ -239,10 +239,11 @@
return;
end

% get the noise threshold via Chi squared distribution
[dummy T_noise_squared d] = feval(options.man_fun, [], [], options.sigma, options.P_inlier);

% calculate the probability for the inlier detection.
if ~isfield(options, 'T_noise_squared')
% get the noise threshold via Chi squared distribution
[dummy T_noise_squared d] = feval(options.man_fun, [], [], options.sigma, options.P_inlier);
options.T_noise_squared = T_noise_squared;
if (options.verbose)
fprintf('\nSquared noise threshold = %f, (assuming Gaussian noise, for sigma = %f)', T_noise_squared, options.sigma);
Expand Down
2 changes: 2 additions & 0 deletions README.txt
Expand Up @@ -85,6 +85,8 @@ of templates for bibtex:
Updates History
---------------

- Nov 2011: Fixed some bugs in the example scripts.

- August 2011: General fixes. Added affine model.

- 18 October 2009: Fixed a bug in get_minimal_sample_set.m to handle
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
@@ -1 +1 @@
07-Aug-2011
20-Nov-2011

0 comments on commit 88d4b83

Please sign in to comment.