Skip to content

Instantly share code, notes, and snippets.

↓のように書く
unix {
CONFIG += link_pkgconfig
PKGCONFIG += <パッケージ名>
}
<パッケージ名>の部分に,例えばopencvなどを書く
unix {
CONFIG += link_pkgconfig
PKGCONFIG += opencv
#思いついたやり方
#!/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
#!/bin/zsh
y=0; for x in `ls`; do; z=`printf "%04d" $y`; ((y=$y+1)); mv $x ${z}.jpg; done
#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){
" 文字コードの自動判定
if &encoding !=# 'utf-8'
set encoding=japan
endif
test
my first gist commit
my second gist commit