barcode

ZXingObjc - Converting object c to swift

偶尔善良 提交于 2019-12-01 00:05:19
I'm a newbie with Ios. i'm learning swift and overlooked object c. Currently, i'm writing an demo with swift and xcode 6.1 which can scan qrcode and barcode from camera or an image from image library. before, i tried using zbar SDK to do this, but it happened error and i didn't know how to fix it, i posted this error in post: Scan qrcode and barcode from camera and image which picked from image library in swift , but nobody answered. i'm trying using ZXingObjC to scan qrcode and barcode from image and camera https://github.com/TheLevelUp/ZXingObjC , i read its usage and tried to convert to

使用C/C++编写PHP Extension

老子叫甜甜 提交于 2019-11-30 22:38:37
和Python,JavaScript等高级语言一样,PHP也可以通过C/C++编写扩展功能。这里分享下如何构建一个简单的PHP扩展,以及如何调用第三方DLL库。 参考原文: Making PHP Barcode Extension with Dynamsoft Barcode SDK 使用Visual Studio 2012构建PHP扩展 Windows PHP的安装包本身不包涵头文件,所以要构建PHP扩展,必须下载PHP的源码。在Windows上,要编译PHP,以及构建PHP扩展都必须使用对应的Visual Studio,不然会出现大量的错误。在这里我们使用Visual Studio 2012去构建PHP 5.6的扩展。步骤如下: 下载 PHP 5.6 的源码以及VC11 build版本。 创建一个空的Win32工程,应用类型选择DLL。 添加头文件路径: F:\php_pack\php-5.6.10-src F:\php_pack\php-5.6.10-src\Zend F:\php_pack\php-5.6.10-src\win32 F:\php_pack\php-5.6.10-src\TSRM F:\php_pack\php-5.6.10-src\main 添加库路径: F:\php_pack\php-5.6.10-Win32-VC11-x86\dev 添加依赖:

使用Visual Studio,几步实现Python C++扩展,以及DLL调用

一个人想着一个人 提交于 2019-11-30 22:38:20
在网上搜了下Python扩展教程,很多提到第三方开源库,而官方推荐的是用setup.py。其实用Visual Studio很简单!来看一下如何一步步编写一个Python扩展,以及如何通过扩展来调用DLL。 参考原文: Wrapping C/C++ Methods of Dynamsoft Barcode SDK for Python Visual Studio环境配置 在Visual Studio中创建一个Win32工程 DynamsoftBarcodeReader 。打开工程属性,添加头文件和库文件路径: 添加依赖库 python27.lib : 把扩展改成 .pyd : 这样就可以去build工程了。不过如果是使用Debug去build,会出现错误: 原因是因为官方发布的python安装包不包涵debug的库,如果需要可以自己下载源码编译。所以把配置切换到release,成功生成 DynamsoftBarcodeReader.pyd : DLL调用举例:封装Dynamsoft Barcode SDK C++接口 在Python脚本中导入 DynamsoftBarcodeReader ,Python会搜索 DynamsoftBarcodeReader.pyd ,并且调用 initDynamsoftBarcodeReader() 做初始化。 在工程配置中先加入Dynamsoft

简单的Windows Webcam应用:Barcode Reader

不打扰是莪最后的温柔 提交于 2019-11-30 22:36:28
在Windows上用WinForm创建一个Webcam应用需要用到DirectShow。DirectShow没有提供C#的接口。如果要用C#开发,需要创建一个桥接DLL。Touchless SDK是一个免费开源的.NET库,对DirectShow进行了简单的封装。使用 Touchless 可以很方便的在WinForm应用中调用camera。这里分享下如何创建一个调用webcam的barcode reader。 参考原文: WinForm Barcode Reader with Webcam and C# 作者: Xiao Ling 翻译:yushulx WinForm Barcode Reader 下载 Touchless SDK 。 Dynamsoft Barcode Reader SDK 用于barcode识别. 如要想用免费开源的,可以选择 ZXing.NET 。 打开 Visual Studio 2015 创建一个 WinForm工程. 通过 Nuget 可以在工程中直接下载安装Dynamsoft Barcode Reader: 在引用中添加 TouchlessLib.dll : 把 WebCamLib.dll 添加到工程中。属性中设置拷贝。这样工程编译之后就会把DLL拷贝到输出目录中,不需要再手动拷贝。 初始化 Touchless 和 Dynamsoft Barcode

如何用React, Webcam和JS Barcode SDK创建Web扫码App

孤者浪人 提交于 2019-11-30 22:36:14
这篇文章分享下如何结合 React Webcam 和 Dynamsoft JavaScript Barcode SDK 来创建Web扫码App。 Web实时扫码 从GitHub上下载 react-webcam.js 放到React工程中。 打开这个JS文件。在 render() 函数中添加一个 button 和 canvas : render() { return ( <div id='videoview' width={this.props.width} height={this.props.height}> <button onClick={this.scanBarcode}>Scan Barcodes</button> <video autoPlay width={this.props.width} height={this.props.height} src={this.state.src} muted={this.props.audio} className={this.props.className} playsInline style={this.props.style} ref={(ref) => { this.video = ref; }} /> <canvas id="overlay" width={this.props.width} height={this

Xamarin工程中调用Android AAR

怎甘沉沦 提交于 2019-11-30 22:32:29
最近想尝试下用Xamarin来写Android app,通过调用 Android Barcode SDK (AAR文件)创建一个简单的条形码读取工具。 绑定Android AAR文件 基本步骤 参考 Binding an AAR ,基本步骤如下: 创建一个Java Bindings Library工程。 添加Android AAR文件。 设置正确的Build Action。 选择目标框架。 编译工程。 DynamsoftBarcodeReader.aar转换成DBRAndroid.dll 运行 Visual Studio 2015 ,创建工程 Bindings Library (Android) . 下载 SDK package for Android 。把 DynamsoftBarcodeReader.aar 拖入工程中。Build Action设置成 LibraryProjectZip: 编译工程可以生成 DBRAndroid\bin\Debug\DBRAndroid.dll 。 创建简单的Android Barcode Reader 新建一个Android工程,把刚才生成的DBRAndroid.dll添加到Reference中: 双击DBRAndroid可以看到具体的类,成员以及方法: 我这里比较偷懒,只是为了测试接口,所以就放了一张QR的图到drawable中。 如何用C

How to reliably detect a barcode's 4 corners?

孤者浪人 提交于 2019-11-30 21:03:39
I'm trying to detect this Code128 barcode with Python + zbar module: (Image download link here ). This works: import cv2, numpy import zbar from PIL import Image import matplotlib.pyplot as plt scanner = zbar.ImageScanner() pil = Image.open("000.jpg").convert('L') width, height = pil.size plt.imshow(pil); plt.show() image = zbar.Image(width, height, 'Y800', pil.tobytes()) result = scanner.scan(image) for symbol in image: print symbol.data, symbol.type, symbol.quality, symbol.location, symbol.count, symbol.orientation but only one point is detected: (596, 210) . If I apply a black and white

Web pages and barcode fonts

纵饮孤独 提交于 2019-11-30 20:36:06
I'm working on a small app where I can generate a list of barcodes. I have the correct fonts installed on my computer. Right now I am printing them directly to a webpage and it works properly in Chrome and IE 7, but not Firefox. Does anyone know what Firefox would be doing differently than IE and Chrome? Here is my code: <html> <head> <title>Barcode Font Test</title> <style type="text/css" media="screen"> .barcode { font-family: "wasp 39 m", verdana, calibri; font-size: 36pt; } </style> </head> <body> <div class="barcode">*574656*</div> </body> </html> EDIT: I probably should have mentioned

how to use onActivityResult(..) if the activity is called from a menu

梦想的初衷 提交于 2019-11-30 20:20:24
This is my problem: class main extends menuActivity{ // .. // public void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode == 0) camera_barcode = INTENT.getStringExtra("SCAN_RESULT"); } } } the INTENT is created in the menuActivity class: public class menuActivity extends Activity { public INTENT; @Override public boolean onCreateOptionsMenu(Menu menu) { } @Override public boolean onOptionsItemSelected(MenuItem item) { // INTENT = new Intent("com.google.zxing.client.android.SCAN"); INTENT.putExtra("SCAN_MODE", "QR_CODE_MODE"); startActivityForResult(INTENT, 0); /

Zxing sometimes picks up the wrong data from barcode

元气小坏坏 提交于 2019-11-30 19:16:25
问题 I know this might be rather a simple issue to ask for and we can also set the barcode format to be scanned by Zxing, like this: (1) intent.putExtra("SCAN_MODE", "QR_CODE_MODE"); //or any other format if we do this: (2) intent.putExtra("SCAN_MODE", "SCAN_MODE"); //for all modes` While doing the #2 mentioned right above this line, the scanner sometimes seems to scan part of the barcode and picks up wrong information. For example if I try to simply scan a UPC barcode, 98% of the times it works