ons, 18 03 2009 kl. 13:03 +0600, skrev Sergey Kirgizov:
> i write a patch which fix this error.

Thanks for reporting this. I applied the attached patch instead.

Søren
Index: inst/im2bw.m
===================================================================
--- inst/im2bw.m	(revision 5617)
+++ inst/im2bw.m	(working copy)
@@ -51,17 +51,17 @@
   endif
 
   ## Do the thresholding
-  if (isscalar (a))
-    if (a < 0 || a > 1)
+  if (isscalar (t))
+    if (t < 0 || t > 1)
       error("im2bw: threshold must be in the interval [0, 1]");
     endif
     switch (class(img))
-      case {"double", "single"} % octave doesn't support single yet, but it shouldn't hurt...
-        BW = (img >= a);
+      case {"double", "single"}
+        BW = (img >= t);
       case {"uint8"}
-        BW = (img >= 255*a);
+        BW = (img >= 255*t);
       case {"uint16"}
-        BW = (img >= 65535*a);
+        BW = (img >= 65535*t);
       otherwise
         error("im2bw: unsupport image class");
     endswitch
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to