8000
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 void onPreviewFrame(final byte[] data, final int width, final int height) { super.onPreviewFrame(data, width, height); threadPoolManager.addTask(new Runnable() { @Override public void run() { findQRCode(data, width, height); } }); } private void findQRCode(byte[] data, int width, int height) { YuvImage img = new YuvImage(data, ImageFormat.NV21, width, height, null); ByteArrayOutputStream stream = new ByteArrayOutputStream(); img.compressToJpeg(new android.graphics.Rect(0, 0, width, height), 100, stream); Bitmap bitmap = BitmapFactory.decodeByteArray(stream.toByteArray(), 0, stream.size()); CV4JImage cv4JImage = new CV4JImage(bitmap); QRCodeScanner qrCodeScanner = new QRCodeScanner(); //这一行会导致OOM Rect qrCodeBounding = qrCodeScanner.findQRCodeBounding(cv4JImage.getProcessor(), width, height); bitmap.recycle(); Log.i(getClass().getSimpleName(), "findQRCode: width" + qrCodeBounding.width + ",height:" + qrCodeBounding.height); }
请问还有什么别的方法能找寻二维码区域吗
The text was updated successfully, but these errors were encountered:
+1
Sorry, something went wrong.
No branches or pull requests
请问还有什么别的方法能找寻二维码区域吗
The text was updated successfully, but these errors were encountered: