C#ZXing读者的例子

Stu*_*t P 4 c# decode zxing

有人在C#下使用最新版本的ZXing取得了成功吗?

我正在尝试使用ZXing来处理我从网络摄像头中提取的图像,理想情况是在"实际"时间,但我找到的使用ZXing解码的所有示例似乎都已过时.开始有点疯了.

据我所知,如果我可以将我的凸轮图像变为BinaryBitmap,我会没事的,但在我能找到的示例中用于转换的方法/类似乎都不存在了.

这是目前让我头疼的代码:

Binarizer barney = new HybridBinarizer(new LuminanceSource(image));
Result result = reader.decode(new BinaryBitmap(barney));
Run Code Online (Sandbox Code Playgroud)

LuminanceSource现在似乎是我的减速带.我找不到在C#下实例化的相应类,BufferedLuminance和AWTImageLuminanceSource似乎在C#下不存在.

任何人都能指出我应该做什么......?

我正在运行Win7 64b,ZXing 1.7,VS2008.

Duc*_*tro 5

我最近用过C#端口.LuminanceSource是一个抽象类.

你需要:

  • 子类LuminanceSource并实现其方法,或
  • 利用已经包含的RGBLuminanceSource类来代替.

我用后者来取得成功.