From: <car...@us...> - 2012-08-29 02:56:25
|
Revision: 10926 http://octave.svn.sourceforge.net/octave/?rev=10926&view=rev Author: carandraug Date: 2012-08-29 02:56:16 +0000 (Wed, 29 Aug 2012) Log Message: ----------- normxcorr2: check input that template is smaller than image Modified Paths: -------------- trunk/octave-forge/main/image/inst/normxcorr2.m Modified: trunk/octave-forge/main/image/inst/normxcorr2.m =================================================================== --- trunk/octave-forge/main/image/inst/normxcorr2.m 2012-08-29 02:45:12 UTC (rev 10925) +++ trunk/octave-forge/main/image/inst/normxcorr2.m 2012-08-29 02:56:16 UTC (rev 10926) @@ -26,6 +26,8 @@ function cc = normxcorr2 (temp, img) if (nargin != 2) print_usage; + elseif (rows (temp) > rows (img) || columns (temp) > columns (img)) + error ("normxcorr2: template must be same size or smaller than image"); endif cc = xcorr2 (img, temp, "coeff"); endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |