zbar

Error installing pyzbar with Conda on Mac OS X

别说谁变了你拦得住时间么 提交于 2021-01-29 04:18:46
问题 I am attempting to convert a project from a Python 3 venv to Conda. However, it doesn't work with Conda, apparently because there is no repository that supports macOS. This is disappointing because using brew and pip to install zbar and pyzbar in the original project works fine. So clearly the files exist but are not available through Conda repos. Am I missing a repo somewhere? If not, is there a way to crowbar the packages downloaded with pip and brew into a Conda environment? Here's what I

How do I decode partially obscured QR codes?

坚强是说给别人听的谎言 提交于 2021-01-05 08:56:42
问题 I have a library of hundreds of pictures from which I need to extract information encoded in a QR code in each picture. For 70% of the pictures, pyzbar simply works. For more difficult cases, I try non-linear binarization of the image as suggested by this post: https://stackoverflow.com/a/61443430/1579211 This gets me another 15-20% of the way. But for about 10% of the images this fails: from PIL import Image from pyzbar.pyzbar import decode, ZBarSymbol from kraken.binarization import nlbin

How do I decode partially obscured QR codes?

前提是你 提交于 2021-01-05 08:56:35
问题 I have a library of hundreds of pictures from which I need to extract information encoded in a QR code in each picture. For 70% of the pictures, pyzbar simply works. For more difficult cases, I try non-linear binarization of the image as suggested by this post: https://stackoverflow.com/a/61443430/1579211 This gets me another 15-20% of the way. But for about 10% of the images this fails: from PIL import Image from pyzbar.pyzbar import decode, ZBarSymbol from kraken.binarization import nlbin

Read blurry barcode in python with pyzbar

我只是一个虾纸丫 提交于 2021-01-05 05:51:42
问题 I have been trying to read some barcodes from images uzing Python and pyzbar. Unfortunately, the images are taken from several feet away under several constraints and I cannot move or zoom the camera any closer. Is it possible to read barcodes this blurry using any existing Python libraries? So far I've tried some preprocessing including thresholding, sharpening, applying a vertical closing filter, and Wiener filtering, but none seem to help. I am probably asking for a miracle, but if you

How to reliably detect a barcode's 4 corners in real time video capture

血红的双手。 提交于 2020-12-15 05:29:15
问题 I found a Stackoverflow answer for detecting barcode in an image. I am trying to apply the method in the Stackoverflow answer to realtime video capture because my current solution only detect barcodes on clean large surface. How can I apply the method to video capture Here is my code. import cv2 import numpy as np from pyzbar.pyzbar import decode cap = cv2.VideoCapture(0) cap.set(3,640) cap.set(4,480) while True: success, img = cap.read() for barcode in decode(img): myData = barcode.data

How to reliably detect a barcode's 4 corners in real time video capture

送分小仙女□ 提交于 2020-12-15 05:26:37
问题 I found a Stackoverflow answer for detecting barcode in an image. I am trying to apply the method in the Stackoverflow answer to realtime video capture because my current solution only detect barcodes on clean large surface. How can I apply the method to video capture Here is my code. import cv2 import numpy as np from pyzbar.pyzbar import decode cap = cv2.VideoCapture(0) cap.set(3,640) cap.set(4,480) while True: success, img = cap.read() for barcode in decode(img): myData = barcode.data

linux 编译zbar

耗尽温柔 提交于 2020-10-30 07:58:42
从github上git的源码的目录下没有configure ,晕 wget http://downloads.sourceforge.net/project/zbar/zbar/0.10/zbar-0.10.tar.gz tar -zvxf zbar-0.10.tar.gz export CFLAGS=""./configure --prefix=$(pwd)/output0808 --enable-shared --enable-static --without-imagemagick --without-jpeg --without-python --without-gtk --without-qt --disable-video make&&make intsall 在output0808/lib下 file libzbar.so.0.2.0 本节环境: linux deepin 15 在编译zbar之前,请看之前博客《Linux Imagemagick 安装》,zbar 测试依赖Imagemagick工具。 一、下载zbar源码 http://zbar.sourceforge.net/download.html 二、解压文件 eric@eric-PC:~/Documents/work/linux-c/zbar-0.10$ ls aclocal.m4 config.log

ShadowSocks-Qt5 for arm64(鲲鹏、飞腾)

♀尐吖头ヾ 提交于 2020-08-13 23:18:16
操作系统:Ubuntu Kylin 优麒麟 20.04 LTS 适用平台:arm64 一、安装包 软件仓库中没有 ShadowSocks-Qt5 (简称:SS)的安装包,而且目前该项目处于停止更新的状态,因此需要下载一些“陈旧”的安装包。 1.1 Botan 请使用Debian仓库中的 2.9 版本,Ubuntu 仓库中的 2.12 与 SS 存在兼容性问题。 请从下方链接下载 botan 和 libbotan-2-9,如果想自行编译,还需要下载 libbotan-2-dev。架构选择arm64,镜像站选择亚洲的,速度快一些。 https://packages.debian.org/search?suite=buster&searchon=names&keywords=botan 安装下载好的软件包。 sudo dpkg -i *botan*.deb 1.2 ShadowSocks 请从下方链接下载 shadowsocks-qt5 和 libqtshadowsocks2,如果想使用非图形化的工具,请下载 shadowsocks。 https://packages.debian.org/search?keywords=shadowsocks&searchon=names&suite=stable&section=all 安装下载好的软件包。 sudo dpkg -i

Preprocessing images for QR detection in python

泄露秘密 提交于 2020-06-29 04:23:11
问题 I used Zbar and OpenCV to read the QR code in the image below but both failed to detect it. For ZBar, I use pyzbar library as the python wrapper. There are images that QR is detected correctly and images really similar to the successful ones that fail. My phone camera can read the QR code in the uploaded image which means it is a valid one. Below is the code snippet: from pyzbar.pyzbar import decode from pyzbar.pyzbar import ZBarSymbol import cv2 # zbar results = decode(cv2.imread(image_path)

二维码解析(编译zxing-cpp)

人走茶凉 提交于 2020-04-22 02:18:23
二维码解析使用的类库是zxing(官网 https://github.com/zxing/zxing )。 这个类库是谷歌的,原来有c++版本,后来的更新去掉了,zxing介绍了目前基于zxing的其他类库。 glassechidna/zxing-cpp ( https://github.com/glassechidna/zxing-cpp )已经好久不更新了,官网介绍也是使用的比较老的版本 nu-book/zxing-cpp ( https://github.com/nu-book/zxing-cpp )这个是最新的 ZBar/ZBar( https://github.com/ZBar/ZBar )是c语言版本,也好久没更新了。 所以我们使用nu-book nu-book在官网介绍了如何编译windows版本。但是没有使用的介绍。 所以我们先clone这个工程到本地。 安装cmake 用cmake编译zxing-cpp/example目录,生成ZXingExamples.sln 编译,生成scan_png.exe 在cmd中运行scan_png.exe xxx.png,就可以看到解析出来的url 然后按照scan_png.cpp中main的方法修改到自己工程中 缺少的头文件都可以在zxing-cpp中找到,因为一个个引用太麻烦,可以把zxing-cpp->core-