From: <car...@us...> - 2012-04-11 17:13:38
|
Revision: 10194 http://octave.svn.sourceforge.net/octave/?rev=10194&view=rev Author: carandraug Date: 2012-04-11 17:13:27 +0000 (Wed, 11 Apr 2012) Log Message: ----------- im2double: fix small bug where isind would be called wrongly Modified Paths: -------------- trunk/octave-forge/main/image/inst/im2double.m Modified: trunk/octave-forge/main/image/inst/im2double.m =================================================================== --- trunk/octave-forge/main/image/inst/im2double.m 2012-04-11 17:01:36 UTC (rev 10193) +++ trunk/octave-forge/main/image/inst/im2double.m 2012-04-11 17:13:27 UTC (rev 10194) @@ -36,10 +36,10 @@ ## @seealso{im2bw, im2uint16, im2uint8} ## @end deftypefn -function im = im2double (im, ind = false) +function im = im2double (im, indexed = false) ## Input checking (private function that is used for all im2class functions) - im_class = imconversion (nargin, "im2double", ind, im); + im_class = imconversion (nargin, "im2double", indexed, im); switch im_class case "double" @@ -47,9 +47,9 @@ case {"logical", "single"} im = double (im); case {"uint8", "uint16"} - if (ind) + if (indexed) im = double (im) + 1; - elseif (isind (im)) + else im = double (im) / double (intmax (im_class)); endif case "int16" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |