英文:
How to detect QR codes from images in Go?
问题
如何在处理图像像素时检测QR码?
图像可能是像素化的(低保真度),有噪点(一行中缺少或多出像素),模糊(抗锯齿)或者倾斜(图像倾斜)。简单地遍历像素似乎需要一些线检测,然后你可以计算出三个(或四个)不同角落之间预期块的数量。
英文:
How can I detect QR codes when processing the pixels of an image?
The image might be pixelated (low-fidelity), noisy (missing or extra pixels in a line), blurry (antialiasing), or be at an angle (image skew). Simply looping through the pixels seems like it would require some sort of line detection and then you could figure out a good calculate of the number of expected blocks between the three (or four) different corners.
答案1
得分: 1
你需要使用一个图像处理库来检测二维码。我过去使用过go-zxing,它是一个完全使用Go语言编写的库。
你需要熟悉标准库中的go image包。
英文:
You will need to use an image processing library to detect QRCodes. I’ve used go-zxing in the past which is 100% native go.
You will need to be familiar with the go image package that’s part of the standard library.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论