This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
An implementation of SVD from Numerical Recipes in C and Mike Erhdmann's lectures | |
*/ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <math.h> | |
#define SIGN(a,b) ((b) > 0.0 ? fabs(a) : - fabs(a)) | |
static double maxarg1, maxarg2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>audio test</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script> | |
$(document).ready(function () { | |
$("#puyon1Button").click(function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* tbbTest.cpp | |
* | |
* Created on: 2014/11/05 | |
* Author: sase | |
*/ | |
#include <iostream> | |
#include <math.h> | |
#include <sys/time.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* main.cu | |
* | |
* Created on: 2014/11/05 | |
* Author: sase | |
*/ | |
/* | |
* tbbTest.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<meta charset="utf-8"> | |
<title>logistic</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function () { | |
var canvas = document.getElementById('myCanvas'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<meta charset="utf-8"> | |
<title>logistic</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// グレースケール化 | |
// canvasコンテキスト contextIn をグレースケール化して contextOut に書き出す | |
// ただしアルファ値が 0 のピクセルはそのままにする | |
function grayScale(contextIn, contextOut, width, height) { | |
var imgData = contextIn.getImageData(0, 0, width, height); | |
var gray; | |
for(var i=0; i<imgData.width*imgData.height; ++i) { | |
if(imgData.data[4*i+3]!=0) { | |
gray = 0.299*imgData.data[4*i]+0.587*imgData.data[4*i+1]+0.114*imgData.data[4*i+2]; | |
gray = Math.floor(gray); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 二値化 | |
// canvasコンテキスト contextIn を閾値 threshold の元で二値化して contextOut に書き出す | |
// 入力画像はグレースケール画像であることを想定している(RGB値がすべて同じ) | |
// アルファ値が 0 のピクセルは閾値に関わらず白にする | |
function binarization(contextIn, contextOut, width, height, threshold) { | |
var imgData = contextIn.getImageData(0, 0, width, height); | |
var gray; | |
for(var i=0; i<imgData.width*imgData.height; ++i) { | |
if(imgData.data[4*i+3]==0) { | |
imgData.data[4*i] = 255; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 輪郭追跡を行い,輪郭部のみに色を出力する | |
function contourDetection(contextIn, contextOut, width, height) { | |
var imgData=contextIn.getImageData(0, 0, width, height); | |
// 読み取り用ピクセルデータ(書き換えない) | |
var pixelData = new Array(width); | |
for(var i=0; i<width; ++i) { | |
pixelData[i] = new Array(height); | |
for(var j=0; j<height; ++j) { | |
pixelData[i][j] = imgData.data[4*(width*j+i)]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <fstream> | |
#include <list> | |
#include <math.h> | |
#define N 2000 | |
#define PI 3.141592 | |
using namespace std; |
OlderNewer