Skip to content

Instantly share code, notes, and snippets.

View snegovick's full-sized avatar

Konstantin Kirik snegovick

View GitHub Profile
@victorbstan
victorbstan / video_pyopencv.py
Created March 20, 2012 02:07 — forked from kriben/video_pyopencv.py
Python opencv feed from webcam
import opencv
#this is important for capturing/displaying images
from opencv import highgui
import pygame
import sys
camera = highgui.cvCreateCameraCapture(0)
def get_image():
im = highgui.cvQueryFrame(camera)
# Add the line below if you need it (Ubuntu 8.04+)
@snegovick
snegovick / sutil.lua
Created September 10, 2015 02:30
Serial utils for lua
local sutil = {}
function sutil.getchar(ttyfile)
return ttyfile:read(1)
end
function sutil.readall_timeout(ttyfile, n, time)
local data = ""
local ret = true
local ctr = 0