Skip to content

Instantly share code, notes, and snippets.

tracking.type.HUMAN.data.frontal_face = [[-1,0.822689414024353,[[3,7,14,4,-1,3,9,14,2,2,0.004014195874333382,0.0337941907346249,0.8378106951713562],[1,2,18,4,-1,7,2,6,4,3,0.0151513395830989,0.1514132022857666,0.7488812208175659],[1,7,15,9,-1,1,10,15,3,3,0.004210993181914091,0.0900492817163467,0.6374819874763489]]],[0,6.956608772277832,[[5,6,2,6,-1,5,9,2,3,2,0.0016227109590545297,0.0693085864186287,0.7110946178436279],[7,5,6,3,-1,9,5,2,3,3,0.002290664939209819,0.1795803010463715,0.6668692231178284],[4,0,12,9,-1,4,3,12,3,3,0.005002570804208517,0.1693672984838486,0.6554006934165955],[6,9,10,8,-1,6,13,10,4,2,0.007965989410877228,0.5866332054138184,0.0914145186543465],[3,6,14,8,-1,3,10,14,4,2,-0.003522701095789671,0.1413166970014572,0.6031895875930786],[14,1,6,10,-1,14,1,3,10,2,0.0366676896810532,0.3675672113895416,0.7920318245887756],[7,8,5,12,-1,7,12,5,4,3,0.009336147457361221,0.6161385774612427,0.2088509947061539],[1,1,18,3,-1,7,1,6,3,3,0.008696131408214569,0.2836230993270874,0.6360273957252502],[1,8,17,2,-1,1,
canvas.forEach(imageData, function(r, g, b, a, w, i, j) {
pixel = ~~(r*0.299 + b*0.587 + g*0.114);
if (i === 0 & j === 0) {
pixelSum = pixel;
pixelSumSquare = pixel*pixel;
}
else if (i === 0) {
pixelSum = pixel + integralImage[i*width + (j - 1)];
pixelSumSquare = pixel*pixel + integralImageSquare[i*width + (j - 1)];
var rx1=i+Math.floor(scale*r.x1);
var rx2=i+Math.floor(scale*(r.x1+r.y1));
var ry1=j+Math.floor(scale*r.x2);
var ry2=j+Math.floor(scale*(r.x2+r.y2));
@eduardolundgren
eduardolundgren / gist:3880863
Created October 12, 2012 19:01
HAAR convertor analysis
[
// s1
{
t: [
{
rect: [
3, 7, 14, 4, -1,
3, 9, 14, 2, 2
],
t: 4.0141958743333817e-003,
var SECOND = 1000,
MINUTES = 60*SECOND,
HOURS = 60*MINUTES,
DAY = 24*HOURS;
var targetDate = new Date( Date.parse('Thu, 17 Oct 2012 18:00:00 GMT+0200') );
var diff = ( targetDate.getTime() - Date.now() );
var days = Math.floor(diff / DAY),
@eduardolundgren
eduardolundgren / fib.js
Created October 12, 2012 03:46
Different algorithms to calculate Fibonacci number
// Fibonacci
// n = 1 2 3 4 5 6 7
// 1 1 2 3 5 8 13...
// O(K)
var fibc = function(n) {
var sqrt5 = Math.sqrt(5),
phi = (1 + sqrt5)*0.5;
<?xml version="1.0"?>
<root available-locales="en_US" default-locale="en_US">
<dynamic-element autoGeneratedName="true" dataType="string" indexType="" name="text1846" type="text">
<dynamic-element autoGeneratedName="true" dataType="string" indexType="" name="text2393" type="text">
<dynamic-element autoGeneratedName="true" dataType="string" indexType="" name="text2895" type="text">
<dynamic-element autoGeneratedName="true" dataType="string" indexType="" name="text3413" type="text">
<dynamic-element autoGeneratedName="true" dataType="string" indexType="" name="radio4612" type="radio">
<dynamic-element name="option_1" type="option" value="value 1">
<meta-data locale="en_US">
This file has been truncated, but you can view the full file.
{
"opencv_storage": {
"haarcascade_frontalface_alt": {
"@attributes": {
"type_id": "opencv-haar-classifier"
},
"size": "20 20",
"stages": {
"_": [
{
@var content
--
<!DOCTYPE html>
<html>
<head>
<script src="/js/alloy-ui/aui/aui.js"></script>
<link rel="stylesheet" href="/js/alloy-ui/aui-skin-classic/css/aui-skin-classic-all-min.css" type="text/css" />
<link rel="stylesheet" href="assets/css/basic.css" type="text/css" />
</head>
<body>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<script src="jquery-ui-1.8.23.custom/js/jquery-1.8.0.min.js"></script>
<script src="jquery-ui-1.8.23.custom/js/jquery-ui-1.8.23.custom.min.js"></script>
<script src="jquery.tools.min.js"></script>
<link rel="stylesheet" href="jquery-ui-1.8.23.custom/css/ui-lightness/jquery-ui-1.8.23.custom.css">