Finished work on the local binarizer and renamed it to HybridBinarizer. It uses the...
[zxing.git] / javase / src / com / google / zxing / client / j2se / GUIRunner.java
index 3432240..78e7732 100644 (file)
@@ -21,16 +21,24 @@ import com.google.zxing.LuminanceSource;
 import com.google.zxing.MultiFormatReader;
 import com.google.zxing.ReaderException;
 import com.google.zxing.Result;
-import com.google.zxing.common.GlobalHistogramBinarizer;
+import com.google.zxing.common.HybridBinarizer;
 
-import java.awt.*;
+import java.awt.Container;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
 import java.awt.image.BufferedImage;
 import java.io.File;
 import java.io.IOException;
 import java.net.MalformedURLException;
 
 import javax.imageio.ImageIO;
-import javax.swing.*;
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.JFileChooser;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextArea;
 
 /**
  * <p>Simple GUI frontend to the library. Right now, only decodes a local file.
@@ -87,7 +95,7 @@ public final class GUIRunner extends JFrame {
       return "Could not decode image";
     }
     LuminanceSource source = new BufferedImageLuminanceSource(image);
-    BinaryBitmap bitmap = new BinaryBitmap(new GlobalHistogramBinarizer(source));
+    BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
     Result result;
     try {
       result = new MultiFormatReader().decode(bitmap);