Skip to content

Instantly share code, notes, and snippets.

How to install OpenCV 3.1 on Ubuntu 14.04 64bits

Update latest packages and installed

$ sudo apt-get update
$ sudo apt-get upgrade

apt-get update - 更新最新的套件資訊 apt-get upgrade - 更新套件

@tunjos
tunjos / gh-pages.md
Created July 24, 2015 16:46
Creating a clean gh-pages branch

Creating a clean gh-pages branch

cd /path/to/repo-name
git checkout --orphan gh-pages
git rm -rf .
echo "My GitHub Page" > index.html
git add .
git commit -a -m "Add index.html"
@roxlu
roxlu / opengl_wrappers.c
Last active March 18, 2018 16:05
A couple of wrappers for opengl which are handy when you want to provide some openGL features in your library. Simply embed these into your cpp file. (Note that your executable will become slightly bigger because of this.)
/*
See https://gist.github.com/roxlu/6152fccfdd0446533e1b for the latest version.
Author: roxlu
Twitter: http://www.twitter.com/roxlu
*/
/* ------------------------------------------------------------------------*/
@roxlu
roxlu / AsyncUpload.cpp
Last active April 26, 2019 09:44
Experimental code to test fast pixel transfers using PBOs.
#include <gfx/AsyncUpload.h>
namespace gfx {
AsyncUpload::AsyncUpload()
:width(0)
,height(0)
,dx(0)
,channels(0)
,n(0)
@roxlu
roxlu / GUI.cpp
Created December 29, 2013 14:19
Minimal AntTweakBar integration with GLFW
#include <assert.h>
#include <GLFW/glfw3.h>
#include <swnt/GUI.h>
GUI::GUI()
:win_w(0)
,win_h(0)
{
}
@roxlu
roxlu / Shaders.h
Created December 9, 2013 13:37
Mac 10.9 using YUV input with opengl
#ifndef PHOTOBOOTH_SHADERS_H
#define PHOTOBOOTH_SHADERS_H
#include <opengl/Headers.h>
#include <math/Math.h>
// --------------------------------------------------
static const char* P_VS = ""
"#version 150\n"
"uniform mat4 u_pm;"
@roxlu
roxlu / tinylib.h
Last active July 24, 2019 15:22
Tinylib - the most basic features for easy graphics development with GL
/*
--------------------------------------------------------------------------------
oooo
`888
oooo d8b .ooooo. oooo ooo 888 oooo oooo
`888""8P d88' `88b `88b..8P' 888 `888 `888
888 888 888 Y888' 888 888 888
888 888 888 .o8"'88b 888 888 888
@cobyism
cobyism / gh-pages-deploy.md
Last active May 23, 2024 10:55
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@n3wtron
n3wtron / simple_mjpeg_streamer_http_server
Last active December 22, 2023 13:32
Simple Python Motion Jpeg (mjpeg server) from webcam. Using: OpenCV,BaseHTTPServer
#!/usr/bin/python
'''
Author: Igor Maculan - n3wtron@gmail.com
A Simple mjpg stream http server
'''
import cv2
import Image
import threading
from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer
from SocketServer import ThreadingMixIn