如何在Go中从图像中检测QR码?

huangapple go评论94阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年2月19日 06:26:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/75496774.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定