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 lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>WebCam</title> | |
</head> | |
<body> | |
<div id="capture-area"> | |
</div> | |
<script src="http://codeorigin.jquery.com/jquery-2.0.3.min.js"></script> |
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
require 'opencv' | |
require 'em-websocket' | |
require 'base64' | |
EM::run do | |
cap = OpenCV::CvCapture.open | |
det_file = "/usr/local/share/OpenCV/haarcascades/haarcascade_frontalface_default.xml" | |
det = OpenCV::CvHaarClassifierCascade::load det_file | |
connections = Array.new |
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
require 'opencv' | |
capture = OpenCV::CvCapture.open | |
mat = capture.query.to_CvMat | |
mat.save('output.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
# -*- coding: utf-8 | |
require 'rubygems' | |
require 'tesseract-ocr' | |
engine = Tesseract::Engine.new{ |engine| | |
engine.language = :jpn | |
} | |
puts "==== 画像全体から文字を取得します" |
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
# -*- encoding: utf-8 -*- | |
require 'rubygems' | |
require 'yaml' | |
require 'date' | |
require "google/api_client" | |
oauth_yaml = YAML.load_file('.google-api.yaml') | |
client = Google::APIClient.new({:application_name => "gcalxx",:application_version => "1.0"}) | |
client.authorization.client_id = oauth_yaml["client_id"] |
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
# -*- encoding: utf-8 -*- | |
require 'net/imap' | |
require 'kconv' | |
SVR='sample.server.com' | |
USR='user' | |
PWD='pppppp' | |
ADR='[email protected]' |
NewerOlder