Skip to content

Instantly share code, notes, and snippets.

View redlotus's full-sized avatar
💭
YOLO!!! 🚀

redlotus redlotus

💭
YOLO!!! 🚀
View GitHub Profile
@redlotus
redlotus / zvnrt
Created February 25, 2015 10:54
zvnrt
! Zvnrt
*cursor: #c6c6c6
*foreground: #d6d6d6
*foreground_bold: #d6d6d6
*background: #141414
*color0: #303030
*color1: #666666
*color2: #404040
from SimpleCV import Color, Camera, Display
cam = Camera()
display = Display()
message = 'Last item scanned: '
result = 'None'
while (display.isNotDone()):
img = cam.getImage()
@redlotus
redlotus / how to compile zbar
Created January 29, 2015 15:27
how to compile zbar
*note: depends=('imagemagick' 'libxv' 'python2' 'gtk2' 'qt4' 'pygtk' 'v4l-utils') (apply for archlinux, use proper package with other distro. Something linke libv4l-devel alter v4l-utils)
get package:
wget http://downloads.sourceforge.net/project/zbar/zbar/0.10/zbar-0.10.tar.bz2
tar xvf zbar-0.10.tar.bz2
cd zbar-0.10
put v4l1.path to the zbar-0.10 directory too
patch -p1 < v4l1.patch
./configure --prefix=/usr --without-qt --without-gtk --without-python --without-java CFLAGS=-DNDEBUG
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
/****************************************************************
* Constants
****************************************************************/