Skip to content

Instantly share code, notes, and snippets.

@unot
unot / cv2trackbar_test.py
Created February 16, 2023 08:04
a test script for OpenCV trackbar
from matplotlib import pyplot as plt
import numpy as np
import cv2
import sys
def printing(position):
#print(position)
return
@unot
unot / 01_aggregation.py
Created November 30, 2015 08:16 — forked from mia-0032/01_aggregation.py
Pythonで基本的な統計量を出力してみる
# -*- coding:utf-8 -*-
import numpy
from scipy import stats
n = 200
#正規分布にあてはまる乱数を生成
score_x = numpy.random.normal(171.77, 5.54, n)
score_y = numpy.random.normal(62.49, 7.89, n)
@unot
unot / 0_reuse_code.js
Created November 20, 2015 08:04
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@unot
unot / meanLab.sh
Created November 10, 2015 06:08
calculate mean values of multiple Lab files.
#!/bin/bash
# calculate mean values of Lab
# $ cat file1
# L1_1 a1_1 b1_1
# L1_2 a1_2 b1_2
# $ cat file2
# L2_1 a2_1 b2_1
# L2_2 a2_2 b2_2
# $ cat file3
# L3_1 a3_1 b3_1
@unot
unot / index.html
Last active August 29, 2015 14:22
情報処理研修資料

情報処理研修

発表者:細木、宇埜


目次

  • 情報処理基礎
  • 画像処理
@unot
unot / create_RGB.sh
Created February 21, 2014 03:10
16刻みで255までの三次元配列を生成。for文だと非常に遅かったので、bashのブレース展開を利用して一行に。
#!/bin/bash
#for i in {0..16}; do
# for j in {0..16}; do
# for k in {0..16}; do
# echo $(expr $i \* 16), $(expr $j \* 16), $(expr $k \* 16)
# done
# done
#done
@unot
unot / shading.cpp
Last active December 20, 2015 19:19
スキャン画像の面内むらを補正
/** \file shading.cpp
* \author unot
* \date 2013/08/08
* */
#include <iostream>
#include <string>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
@unot
unot / LUT_K.plt
Created June 5, 2013 03:15
gnuplot file to plot a RGBCMYK table and save png files
#!/gnuplot
#
#
# G N U P L O T
# Version 4.6 patchlevel 3 last modified April 2013
# Build System: MS-Windows 32 bit
#
# Copyright (C) 1986-1993, 1998, 2004, 2007-2013
# Thomas Williams, Colin Kelley and many others
#
@unot
unot / lut2gbindex.sh
Last active December 18, 2015 00:19
format RGB-CMYK LUT
#!/bin/bash -e
#trap "rm -f cmyk.csv rgb.txt" EXIT
if [ $# -ne 1 ]; then
echo "Usage: `basename $0` rgb_lab.h"
exit 1
fi
if [ ! -e "$1" ]; then

Install OpenCV Into AWS

概要

これは、OpenCV の opencv_traincascade を マルチコアで高速に行うために, AWS EC2を使うための設定メモです。 EC2 の 「Amazon Linux AMI 2012.03」に OpenCV2.4.0 を TBB 付きでInstallします。 使い方のイメージは「HiCPUのEC2インスタンスで学習を実行し、実行結果のXMLをS3にUploadしたらEC2インスタンスをshutdownする」です。

なんか、色々非効率なことをしている部分もあると思いますが、ご了承ください。 ちなみに、このAMIイメージを選んだ理由は特にないです。