-
gcc 4.8
-
Homebrewを使って入れた
brew install https://raw.github.com/Homebrew/homebrew-versions/master/gcc48.rb --enable-all-languages
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
↓のように書く | |
unix { | |
CONFIG += link_pkgconfig | |
PKGCONFIG += <パッケージ名> | |
} | |
<パッケージ名>の部分に,例えばopencvなどを書く | |
unix { | |
CONFIG += link_pkgconfig | |
PKGCONFIG += opencv |
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
#思いついたやり方 | |
#!/bin/zsh | |
y=0; for x in `ls`; do; z=`printf "%04d" $y`; ((y=$y+1)); mv $x ${z}.jpg; done | |
#教えてもらったやり方 | |
#!/bin/zsh | |
max=$(ls -1|wc -l); paste <(ls -1) <(seq $max | xargs printf "%04d.jpg\n") | xargs -n 2 mv |
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
#!/bin/zsh | |
y=0; for x in `ls`; do; z=`printf "%04d" $y`; ((y=$y+1)); mv $x ${z}.jpg; done |
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 <opencv2/opencv.hpp> | |
cv::Mat normalize(const cv::Mat& img, double minval, double maxval){ | |
cv::Mat vimg; | |
cv::Mat tmp=(img - minval)/(maxval-minval)*255; | |
tmp.convertTo(vimg, CV_8UC(img.channels())); | |
return vimg; | |
} | |
void dimshow(const std::string& name, const cv::Mat& img){ | |
if(img.type()==CV_8UC1 || img.type()==CV_8UC3){ |
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
" 文字コードの自動判定 | |
if &encoding !=# 'utf-8' | |
set encoding=japan | |
endif |
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
test | |
my first gist commit | |
my second gist commit |