Read QRcode from scanned document in R

可紊 提交于 2021-02-20 15:31:41

问题


I am using the qrcode_gen() function from the qrcode package in R to generate a QR code, then place it on the top of a document (example linked below). The document is printed, written on, scanned, and stored as an image (.png) file. I would like to be able to read the QR code in R to get the imbedded text back. Eventually the whole process will be semi-automated in an Rshiny app, so I am hoping to keep everything in R, and not need to use an outside web tool to read the code.

Has anyone done this? I'm open to using the reticulate package to interface R with Python if necessary, but do not have coding experience in Python.

Example:

# produce a QR code

library(qrcode)
example_text <- "this is a test"
qrcode_test <- qrcode_gen(dataString = example_text, plotQRcode=T, dataOutput=T)

Example of QR code printed on one of our documents.

来源:https://stackoverflow.com/questions/54952700/read-qrcode-from-scanned-document-in-r

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!