zbar

How to get the type of code from zbar?

允我心安 提交于 2019-12-12 12:07:49
问题 In my Application Zbar is decoding perfectly. But the problem is Zbar can decode both QR code and Bar code . So after decoding How do i get the type of Encoding Style ? thanks in advance 回答1: There are return codes for type in ZBarSymbol. You will be looking for ZBAR_QRCODE for QR codes ZBarSymbol documentation Something like this should help you to get the symbol out: - (void) readerView: (ZBarReaderView*) view didReadSymbols: (ZBarSymbolSet*) syms fromImage: (UIImage*) img { //do something

How to get the x, y position of a detected QR code on an image with zbar?

余生颓废 提交于 2019-12-12 10:19:24
问题 I encoded the number 1639 in the two QR codes of the image below (downloadable here). I printed it, took a photo and tried to detect it: import zbar from PIL import Image scanner = zbar.ImageScanner() pil = Image.open('20180520_170027_2.jpg').convert('L') width, height = pil.size raw = pil.tobytes() image = zbar.Image(width, height, 'Y800', raw) result = scanner.scan(image) for symbol in image: print symbol.data.decode(u'utf-8') # 1639 It works, even if the size of the QR code is small (~1x1

Detect the size of a QR Code in Python using OpenCV and Zbar

柔情痞子 提交于 2019-12-12 05:28:29
问题 I have code that takes an image from the webcam, scans it for QR codes using zBar and returns the value of the code and an image with the QR code highlighted (based off http://sourceforge.net/p/qrtracker/wiki/Home/). How can I also make it tell me the size of the code (as a pixel value or % of the screen)? Additional question: is there a way to detect how skewed it is (e.g rotation in Z about the Y-axis)? 回答1: Regarding the size of Code zBar provides a method to do this in terms of pixel

zbar missing from Python site-pakages after install

我们两清 提交于 2019-12-11 15:38:48
问题 Win 10, x64, Python 2.7, Anaconda There's at least 2 posts about this here. Neither solve my problem. I'm trying to read QR codes so have installed zbar after downloading the wheel using pip install zbar-0.10-cp27-none-win_amd64.whl I had tried installing with pip install zbar with no luck (yes I installed the appropriate version of VS). As as far as the conda comand line is concerned zbar has been installed. So I tried to run the following program.... import pyqrcode from qrtools import QR Q

Want larger camera preview using ZBar scanner Library in Android

六月ゝ 毕业季﹏ 提交于 2019-12-11 12:59:46
问题 I am using ZBarScannerActivity in my android app. but I am getting a small surface view on device. Actually I want full Screen camera preview to scan the QR code. Any help would be appreciated. Thank you. here is the code of ZbarScanner Activity package com.dm.zbar.android.scanner; public class ZBarScannerActivity extends Activity implements Camera.PreviewCallback, ZBarConstants { private static final String TAG = "ZBarScannerActivity"; private CameraPreview mPreview; private Camera mCamera;

Android : converting RGB888 to Y800

戏子无情 提交于 2019-12-11 11:53:48
问题 I am getting image captured from vuforia as RGB888 bytes[] . I want to pass this to zbar which is expecting the format to be Y800 . How can i do that. i tried Image barcode = new Image(width, height, "RGB3"); barcode.setData(imgRGB888); int result = scanner.scanImage(barcode.convert("Y800")); but its not giving right result 回答1: check this Thread and Review Your Full Code : http://sourceforge.net/p/zbar/discussion/2308158/thread/ce0d36f8 By the Way : zbar Accepts GRAY format too.. 来源: https:/

Wrong decoding of barcodes also in ZBAR SDK example

妖精的绣舞 提交于 2019-12-11 05:10:19
问题 I am using the ZBarSDK with a project for iPhone. I am using ZBar as an embeded reader. Basically hooking up a UIView in Interface Builder. Changing the class to ZBarReaderView and implementing the delegate method -(void)readerView: (ZBarReaderView*) view didReadSymbols: (ZBarSymbolSet*) syms fromImage: (UIImage*) img . This works fine most of the time. There are however barcodes that apparently do not scan correctly. The first block gets interpreted wrong. I get something like 5008914... the

Decode qr codes with python from left to right

有些话、适合烂在心里 提交于 2019-12-11 04:14:45
问题 I have a png with several qr codes which basically looks like this To decode the qr codes I use zbarlight . from PIL import Image import zbarlight file_path = './tests/qr_codes.png' with open(file_path, 'rb') as image_file: image = Image.open(image_file) image.load() codes = zbarlight.scan_codes(['qrcode'], image) print('QR codes: %s' % codes) My goal is to decode the qr codes FROM LEFT TO RIGHT, so the list should like like this: url1, url2, url3, url4, url5, ulr6. Problem: The result (list)

Python code for determining corner locations of a QR Code using Zbar

耗尽温柔 提交于 2019-12-10 05:32:11
问题 I would like to extend the code here to extract the corners of the QCodes. #!/usr/bin/python from sys import argv import zbar from PIL import Image if len(argv) < 2: exit(1) # create a reader scanner = zbar.ImageScanner() # configure the reader scanner.parse_config('enable') # obtain image data pil = Image.open(argv[1]).convert('L') width, height = pil.size raw = pil.tostring() # wrap image data image = zbar.Image(width, height, 'Y800', raw) # scan the image for barcodes scanner.scan(image) #

After update the APK supports fewer devices than previously

无人久伴 提交于 2019-12-10 04:21:22
问题 I have a relative simple App that was already in the Play-Store of Google. Now I've made an Update of this App. One Point of this Update was that I include the ZBar-Scanner. The Rest of the changes were minimal and shouldn't have any influence on my problem. I just put the newest verison of my App in the Play-Store and I get following warning: "Warning: Active APKs support fewer devices than previously active APKs. Some users will not receive updates." I've downloaded ZBarAndroidSDK-0.2.zip