From bd111fb12b33d6db60b1b649957b43e596975b6f Mon Sep 17 00:00:00 2001 From: Raghav Khanna Date: Tue, 21 Mar 2017 01:42:26 +0100 Subject: [PATCH] patches to update to MATLAB 2016b --- caltag.m | 6 +++--- license-kovesi.html | 0 ransac.m | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) mode change 100755 => 100644 license-kovesi.html diff --git a/caltag.m b/caltag.m index 778f4fa..3a12faa 100644 --- a/caltag.m +++ b/caltag.m @@ -166,8 +166,8 @@ I = im2single( I ); [imgHeight,imgWidth] = size( I ); if max( [factor(imgHeight),factor(imgWidth)] ) > 21 - disp( 'Warning: image dimensions have large prime factors' ); - disp( 'adaptivethresh is fastest on image dimensions with small factors' ); + %disp( 'Warning: image dimensions have large prime factors' ); + %disp( 'adaptivethresh is fastest on image dimensions with small factors' ); end normMatrix = [ 2/imgHeight, 0, -1; 0, 2/imgWidth, -1; 0 0 1 ]; if debug @@ -1001,7 +1001,7 @@ % dir is a unit vector function line = fitline( points ) points = points(~isnan(points(:,1)),:); - if size( points, 2 ) < 2 + if ((size( points, 2 ) < 2) || isempty(points)) % TODO: pull request to github? line = []; return; end diff --git a/license-kovesi.html b/license-kovesi.html old mode 100755 new mode 100644 diff --git a/ransac.m b/ransac.m index a1e5901..6f83b28 100644 --- a/ransac.m +++ b/ransac.m @@ -117,7 +117,8 @@ Octave = exist('OCTAVE_VERSION','var') ~= 0; % Test number of parameters - error ( nargchk ( 6, 9, nargin ) ); + %error ( nargchk ( 6, 9, nargin ) ); + narginchk(6,9); if nargin < 9; maxTrials = 1000; end; if nargin < 8; maxDataTrials = 100; end;