This file contains hidden or 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
//============================================================================ | |
// Name : Sample243_01.cpp | |
// Author : | |
// Version : | |
// Copyright : Your copyright notice | |
// Description : Hello World in C++, Ansi-style | |
//============================================================================ | |
#include <cv.h> | |
#include <highgui.h> |
This file contains hidden or 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
// アフィン変換の未知数 | |
$a = ''; | |
$b = ''; | |
$c = ''; | |
$d = ''; | |
$l = ''; | |
$m = ''; | |
// 連立方程式を解く | |
$a = ($point[0]['x2'] * $point[1]['y1'] + $point[1]['x2'] * $point[2]['y1'] + $point[2]['x2'] * $point[0]['y1'] - $point[0]['x2'] * $point[2]['y1'] - $point[1]['x2'] * $point[0]['y1'] - $point[2]['x2'] * $point[1]['y1']) / ($point[0]['x1'] * $point[1]['y1'] + $point[1]['x1'] * $point[2]['y1'] + $point[2]['x1'] * $point[0]['y1'] - $point[0]['x1'] * $point[2]['y1'] - $point[1]['x1'] * $point[0]['y1'] - $point[2]['x1'] * $point[1]['y1']); |
This file contains hidden or 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
PHPからAWSのS3を使う。 | |
○準備(CentOS6.3が前提 | |
#pear upgrade pear | |
#pear channel-discover pear.amazonwebservices.com | |
#pear channel-discover guzzlephp.org/pear | |
#pear channel-discover pear.symfony.com | |
#pear install aws/sdk |
This file contains hidden or 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
<?php | |
// load SDK | |
require '/usr/share/pear/AWSSDKforPHP/aws.phar'; | |
use Aws\Common\Aws; | |
use Aws\Common\Enum\Region; | |
use Aws\S3\Enum\CannedAcl; | |
use Aws\S3\Exception\S3Exception; | |
use Guzzle\Http\EntityBody; |
This file contains hidden or 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
<?php | |
class FileReadURL{ | |
function getUrl(){ | |
$aws_access_key_id = '[読み取り用のAWSキー]'; | |
$aws_secret_key = '[読み取り用のAWSシークレットキー]'; | |
$aws_bucket = 'バケット名'; | |
$downloadAudioTimeout = '作成したURLの有効時間'; | |
$file_path = '[ディレクトリパス]/[ファイル名]'; | |
This file contains hidden or 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
package jp.sp.jni; | |
public class HelloWorldJNI { | |
static { | |
System.loadLibrary("HelloWorldJNI"); | |
} | |
public native String sayHelloWorld(); | |
public static void main(String[] args){ |
This file contains hidden or 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
//============================================================================ | |
// Name : HelloWorldJNI.cpp | |
// Author : | |
// Version : | |
// Copyright : Your copyright notice | |
// Description : Hello World in C++, Ansi-style | |
//============================================================================ | |
#include "jp_sp_jni_HelloWorldJNI.h" |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<!-- WARNING: Eclipse auto-generated file. | |
Any modifications will be overwritten. | |
To include a user specific buildfile here, simply create one in the same | |
directory with the processing instruction <?eclipse.ant.import?> | |
as the first entry and export the buildfile again. --> | |
<project basedir="." default="build" name="jni"> | |
<property environment="env" /> | |
<property name="ECLIPSE_HOME" value="../../eclipse" /> | |
<property name="debuglevel" value="source,lines,vars" /> |
This file contains hidden or 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
JNI Javaからcppを呼び出してみる。 | |
■まずはJavaでコード書きます | |
https://gist.github.com/masazdream/5560075 | |
<script src="https://gist.github.com/masazdream/5560075.js"></script> | |
■対応するCppファイルを書きます | |
https://gist.github.com/masazdream/5560082 |
This file contains hidden or 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
//============================================================================ | |
// Name : CombinationImages.cpp | |
// Author : | |
// Version : | |
// Copyright : Your copyright notice | |
// Description : Hello World in C++, Ansi-style | |
//============================================================================ | |
#include <cv.h> | |
#include <cvaux.h> |
OlderNewer