C#QR位arrays解码

我想知道是否有任何库可以解码QR码位arrays而不是图像。 例如:

{ {1,1,1,1,1,1,1,0,0,0,1,0,1,0,1,1,1,1,1,1,1}, {1,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,1}, {1,0,1,1,1,0,1,0,1,0,1,1,0,0,1,0,1,1,1,0,1}, {1,0,1,1,1,0,1,0,0,0,0,0,1,0,1,0,1,1,1,0,1}, {1,0,1,1,1,0,1,0,1,1,1,1,1,0,1,0,1,1,1,0,1}, {1,0,0,0,0,0,1,0,1,1,1,0,0,0,1,0,0,0,0,0,1}, {1,1,1,1,1,1,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1}, {0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0}, {1,1,0,1,0,0,1,1,0,0,1,1,1,0,1,1,1,0,1,1,0}, {1,1,1,1,1,1,0,0,1,0,0,1,0,1,0,1,0,1,1,1,1}, {0,1,1,0,0,0,1,1,0,1,1,1,0,0,1,1,1,1,1,0,1}, {1,0,0,1,1,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1}, {0,1,1,0,1,1,1,1,0,0,1,1,0,1,1,1,0,0,1,0,0}, {0,0,0,0,0,0,0,0,1,1,0,0,0,1,1,0,1,0,1,0,0}, {1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,0,1,1,0,1,0}, {1,0,0,0,0,0,1,0,0,1,1,0,0,0,1,0,0,0,1,1,1}, {1,0,1,1,1,0,1,0,0,0,0,0,1,1,1,0,0,0,1,1,1}, {1,0,1,1,1,0,1,0,1,0,0,0,0,1,1,1,0,0,0,1,1}, {1,0,1,1,1,0,1,0,0,1,1,1,0,1,1,1,0,1,1,0,1}, {1,0,0,0,0,0,1,0,1,0,1,1,1,0,0,1,0,1,0,0,0}, {1,1,1,1,1,1,1,0,1,0,1,0,0,1,0,1,0,0,1,1,0} } 

会变成“嗨”。

我不需要任何图像function。

您可以使用zxing来解码位矩阵。 但是,您需要将多维整数数组转换为锯齿状布尔数组 。 只需将'1'转换为'true' ,将'0''false' 。 执行以下操作(假设您已引用正确的库)以获取结果。

 bool[][] bData; //this should be the converted bit matrix com.google.zxing.qrcode.decoder.Decoder dec = new com.google.zxing.qrcode.decoder.Decoder(); com.google.zxing.common.DecoderResult result = dec.decode(bData); 

从QrCode.Net的介绍来看 ,它似乎会做你正在寻找的东西,因为它的一个特点是:

解码作为位矩阵给出的QR码