C # ZXing Reading Example

Has anyone had success using the latest version of ZXing under C #?

I am trying to use ZXing to process images that I take out of a webcam, ideally in "real" time, but all the examples that I can find to use ZXing for decoding seem outdated. Start a little nut.

As far as I can tell, if I can get the image of my camera as a BinaryBitmap, everything will be fine, but none of the methods / classes used for conversion in the examples that I can find seem to already exist.

Here the code is currently causing me a headache:

Binarizer barney = new HybridBinarizer(new LuminanceSource(image)); Result result = reader.decode(new BinaryBitmap(barney)); 

LuminanceSource seems to be my speed right now. I cannot find the appropriate class to instantiate under C #, BufferedLuminance and AWTImageLuminanceSource do not seem to exist in C #.

Anyone who can indicate what I should do ...?

I am running Win7 64b, ZXing 1.7, VS2008.

+4
source share
2 answers

I recently used a C # port. LuminanceSource is an abstract class.

You need to either:

  • subclass LuminanceSource and implement its methods, or
  • use the already included RGBLuminanceSource class.

I used the latter for success.

+5
source

Take a look at my project

http://windowqr.codeplex.com/

It can scan qr codes from a webcam and uses zxing from qr decoding.

+1
source

Source: https://habr.com/ru/post/1393923/


All Articles