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
var op = { | |
zoom: 17, | |
center: new google.maps.LatLng(35.7078118, 139.5773074), | |
mapTypeId: google.maps.MapTypeId.ROADMAP | |
}; | |
var map = new google.maps.Map(document.getElementById("map_canvas"), op); |
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 initialize() { | |
var marker = new Array; | |
var info = new Array; | |
var json = | |
{ "spots": [ | |
{ "lat": "35.708104", "lng": "139.577644", "category_id": "189", "id": "464704", "category": "レンタカー", "distance": "44", "name": "トヨタレンタリース東京 吉祥寺" }, | |
{ "lat": "35.707729", "lng": "139.577865", "category_id": "83", "id": "698546", "category": "警察・交番", "distance": "51", "name": "武蔵野警察署八幡西宮交番" }, | |
{ "lat": "35.707023471361", "lng": "139.578433703041", "category_id": "166", "id": "486294", "category": "雑貨屋", "distance": "134", "name": "Cut Bound" }, | |
{ "lat": "35.707619", "lng": "139.579336", "category_id": "21", "id": "215488", "category": "スーパー", "distance": "184", "name": "マルエツ プチ 吉祥寺店" }, |
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
var op={ | |
zoom:15, | |
center:new google.maps.LatLng(35.7078118,139.5773074), | |
mapTypeId:google.maps.MapTypeId.ROADMAP | |
}; | |
var map=new google.maps.Map(document.getElementById("map_canvas"),op); |
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
// 「mask」として半透明な画像を使う。 | |
// 2つの画像はPImageのmask()メソッドで合成される。 | |
PImage img; | |
PImage maskImg; | |
void setup() { | |
size(200, 200); | |
img = loadImage("test.jpg"); | |
maskImg = loadImage("mask.jpg"); |
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
size(200, 200); | |
PImage img1; | |
img1 = loadImage("http://processing.org/img/processing_cover.gif"); | |
if (img1 != null) { | |
image(img1, 0, 0); | |
} |
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
// カーソルの位置が高いほど暗い色になる | |
int barWidth = 5; | |
int lastBar = -1; | |
void setup() { | |
size(200, 200); | |
colorMode(HSB, 360, 100, height); | |
noStroke(); | |
background(0); |
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
// 「coswav」という配列をつくりコサイン値を入れる | |
size(200, 200); | |
float[] coswave = new float[width]; | |
for (int i = 0; i < width; i++) { | |
// 0~widthを0~πに置き換える | |
float amount = map(i, 0, width, 0, PI); | |
// 絶対値(1~0~1)を配列に入れる |
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
void draw() | |
{ | |
// カメラ情報を更新する | |
context.update(); | |
// sceneImageの人の部分を取り出すマスク用画像を作る | |
PImage maskImg = makeImgForMask(context.sceneImage()); | |
PImage maskedImg = context.rgbImage(); // RGBカメラの映像がマスク対象 | |
maskedImg.mask(maskImg); // 人物の形で繰り抜いて |
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
import SimpleOpenNI.*; | |
SimpleOpenNI context; | |
void setup() | |
{ | |
context = new SimpleOpenNI(this); | |
// 深度カメラを有効にする | |
if(context.enableDepth() == false) | |
{ |
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
import SimpleOpenNI.*; | |
SimpleOpenNI context; | |
void setup() | |
{ | |
context = new SimpleOpenNI(this); | |
if(context.enableDepth() == false) | |
{ | |
println("Can't open the depthMap, maybe the camera is not connected!"); |