We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
用的使用手册里的二维码
代码 public Map qr(MultipartFile img) throws IOException, FormatException, ChecksumException, NotFoundException { Map<String,String> hashMap = new HashMap<>(); log.info(img.getOriginalFilename()); BufferedImage qrImg = ImageIO.read(img.getInputStream()); LuminanceSource source = new BufferedImageLuminanceSource(qrImg); BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source)); QRCodeReader qrCodeReader = new QRCodeReader(); Result result = qrCodeReader.decode(bitmap); hashMap.put("res",result.getText()); return hashMap; }
public Map qr(MultipartFile img) throws IOException, FormatException, ChecksumException, NotFoundException { Map<String,String> hashMap = new HashMap<>(); log.info(img.getOriginalFilename()); BufferedImage qrImg = ImageIO.read(img.getInputStream()); LuminanceSource source = new BufferedImageLuminanceSource(qrImg); BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source)); QRCodeReader qrCodeReader = new QRCodeReader(); Result result = qrCodeReader.decode(bitmap); hashMap.put("res",result.getText()); return hashMap; }
报错如下 { "timestamp": "2021-02-24T14:24:38.823+00:00", "status": 500, "error": "Internal Server Error", "trace": "com.google.zxing.NotFoundException\r\n", "message": "No message available", "path": "/qrdecode" }
{ "timestamp": "2021-02-24T14:24:38.823+00:00", "status": 500, "error": "Internal Server Error", "trace": "com.google.zxing.NotFoundException\r\n", "message": "No message available", "path": "/qrdecode" }
普通的二维码没事。
The text was updated successfully, but these errors were encountered:
因为改变了探测图形,zxing原生库识别率低,暂无解决办法(话说微信的二维码识别挺牛逼的,不知道怎么做的) 就看有没有大佬开源出识别率搞的识别库
Sorry, something went wrong.
No branches or pull requests
用的使用手册里的二维码
代码
public Map qr(MultipartFile img) throws IOException, FormatException, ChecksumException, NotFoundException { Map<String,String> hashMap = new HashMap<>(); log.info(img.getOriginalFilename()); BufferedImage qrImg = ImageIO.read(img.getInputStream()); LuminanceSource source = new BufferedImageLuminanceSource(qrImg); BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source)); QRCodeReader qrCodeReader = new QRCodeReader(); Result result = qrCodeReader.decode(bitmap); hashMap.put("res",result.getText()); return hashMap; }
报错如下
{ "timestamp": "2021-02-24T14:24:38.823+00:00", "status": 500, "error": "Internal Server Error", "trace": "com.google.zxing.NotFoundException\r\n", "message": "No message available", "path": "/qrdecode" }
普通的二维码没事。
The text was updated successfully, but these errors were encountered: