Has anyone had success using a recent version of ZXing under C#?
I’m attempting to use ZXing to process images I’m pulling in from the webcam, ideally in “real”time, but all the examples I can find for using ZXing to decode appear to be outdated. Starting to go a little nuts.
As far as I can tell, if I can get my cam image to be a BinaryBitmap I’ll be fine, but none of the methods/classes used for converting in the examples I can find seem to exist anymore.
Here’s the code 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 bump right now. I can’t find the appropriate class to instantiate under C#, BufferedLuminance and AWTImageLuminanceSource don’t seem to exist under C#.
Anyone able to point out what I should be doing…?
I’m running Win7 64b, ZXing 1.7, VS2008.
I’ve used the C# port recently.
LuminanceSourceis an abstract class.You need to either:
LuminanceSourceand implement its methods, orRGBLuminanceSourceclass instead.I’ve used the latter to success.