Skip to content

Instantly share code, notes, and snippets.

View thorikawa's full-sized avatar

Takahiro "Poly" Horikawa thorikawa

View GitHub Profile
@thorikawa
thorikawa / helloworld.cpp
Created August 14, 2012 06:44
OpenCV Hello World
#include <opencv2/opencv.hpp>
int main () {
cvNamedWindow( "My Window", 1 );
IplImage *img = cvCreateImage( cvSize( 640, 480 ), IPL_DEPTH_8U, 1 );
CvFont font;
double hScale = 2.0;
double vScale = 2.0;
int lineWidth = 5;
cvInitFont(&font, CV_FONT_HERSHEY_SIMPLEX | CV_FONT_ITALIC, hScale, vScale, 0, lineWidth);
@thorikawa
thorikawa / build.xml
Created February 26, 2012 18:42
improved build.xml for Android SDK r16
<?xml version="1.0" encoding="UTF-8"?>
<project name="android_rules" default="debug">
<!--
This build file is imported by the project build file. It contains
all the targets and tasks necessary to build Android projects, be they
regular projects, library projects, or test projects.
At the beginning of the file is a list of properties that can be overridden
by adding them to your ant.properties (properties are immutable, so their
#include <opencv2/opencv.hpp>
#include <iostream>
#include <fstream>
#include <vector>
#include <cmath>
#include <assert.h>
#define mp make_pair
#define pb push_back
@thorikawa
thorikawa / poisson.cpp
Created September 4, 2011 14:42
Poisson Image Editing OpenCV
#include <opencv2/opencv.hpp>
#include <iostream>
#include <vector>
#include <cmath>
#include <assert.h>
using namespace std;
using namespace cv;
@thorikawa
thorikawa / theme.xml
Created June 18, 2011 00:28
Android Dark Theme
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="MyDark" parent="android:Theme.Black">
<item name="android:textColorPrimary">#FFFFFF</item>
<item name="android:textColorSecondary">#FFFFFF</item>
<item name="android:textColorTertiary">#FFFFFF</item>
<item name="android:textColorPrimaryInverse">#000000</item>
<item name="android:textColorSecondaryInverse">#000000</item>
<item name="android:textColorTertiaryInverse">#000000</item>
<item name="android:textColorPrimaryDisableOnly">#FFFFFF</item>
@thorikawa
thorikawa / Top.java
Created June 6, 2011 14:04
Android DrmFramework Sample
package com.polysfactory.DrmFrameworkTest;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import android.app.Activity;
import android.drm.DrmManagerClient;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;