projects
/
zxing.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
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
diff --git
a/javase/src/com/google/zxing/client/j2se/GUIRunner.java
b/javase/src/com/google/zxing/client/j2se/GUIRunner.java
index
3432240
..
78e7732
100644
(file)
--- a/
javase/src/com/google/zxing/client/j2se/GUIRunner.java
+++ b/
javase/src/com/google/zxing/client/j2se/GUIRunner.java
@@
-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.MultiFormatReader;
import com.google.zxing.ReaderException;
import com.google.zxing.Result;
-import com.google.zxing.common.
GlobalHistogram
Binarizer;
+import com.google.zxing.common.
Hybrid
Binarizer;
-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 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.
/**
* <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);
return "Could not decode image";
}
LuminanceSource source = new BufferedImageLuminanceSource(image);
- BinaryBitmap bitmap = new BinaryBitmap(new
GlobalHistogram
Binarizer(source));
+ BinaryBitmap bitmap = new BinaryBitmap(new
Hybrid
Binarizer(source));
Result result;
try {
result = new MultiFormatReader().decode(bitmap);
Result result;
try {
result = new MultiFormatReader().decode(bitmap);