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
%% 読み込みファイル (uigetfileを使うと良い) | |
clear all; | |
imname = 'Registered_03.tif'; | |
%% Tiff header情報の の読み取り | |
tObj = Tiff(imname, 'r'); | |
tags = tObj.getTagNames; | |
info = imfinfo(imname); | |
tic |
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
function [p, r, z, stat] = ranksum_eff(A, B) | |
% [p, r, z, stat] = ranskum_eff(A, B) | |
% | |
% | |
% Ryosuke Takeuchi 2017 | |
% | |
% 参考: http://www.mizumot.com/files/EffectSize_KELES31.pdf | |
[p, ~, stat] = ranksum(A, B); | |
z = stat.zval; |
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
imroot = '\\NSQNAP2\Public\Intrinsic\Data\160523-182344'; | |
files = dir([imroot filesep '*.tiff']); | |
% collect filename idx | |
for i = 1:length(files) | |
filename = files(i).name; | |
idx(i) = str2num(filename(1:end-5)); | |
end | |
[hoge, idx] = sort(idx); | |
files = files(idx); |
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
% DR-sample codes | |
clear all; close all | |
load fisheriris | |
method{1} = 'PCA'; | |
method{2} = 'MDS'; | |
method{3} = 'FactorAnalysis'; | |
method{4} = 'tSNE'; | |
for i = 1:length(method) |
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
>> addpath(genpath('path¥to¥libsvm')) |
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
% % SVMtest | |
load('fisheriris.mat') | |
labels = unique(species); | |
specIdx = zeros(150,1); | |
for i = 1:length(labels) | |
specIdx(find(strcmp(species, labels{i})))=i; | |
end | |
test1 = randperm(150); |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import codecs | |
import sys | |
import os | |
import glob | |
import time | |
import matplotlib.pyplot as plt | |
import numpy as np |
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
root = 'F:\Datas\intrinsic\160515-165123'; | |
root = '\\nsqnap2\Public\Intrinsic\Data\160523-185221' | |
imgfiles = dir([root filesep '*.tiff']); | |
clear frames; close all; | |
% frames = uint16(zeros([1024 1280 length(imgfiles)])); | |
for i = 1:length(imgfiles) | |
idx = num2str(imgfiles(i).name(1:end-5)); | |
buf = imread([root filesep imgfiles(i).name]); | |
frames(:,:,str2num(imgfiles(i).name(1:end-5))) = buf; |
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
# coding: utf-8 | |
import glob | |
import sys | |
import os | |
from collections import OrderedDict | |
import caffe | |
import time | |
import pylab | |
import matplotlib.image as mimg | |
import matplotlib.pyplot |
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
set dirname to (getTimeStamp() as string) -- 時間で | |
do shell script "mkdir ~/Data/scrs/" & dirname & "/" -- ディレクトリ作成 | |
repeat with p from 1 to 110 -- ページ数 | |
set pstr to p | |
set pstr to text -3 thru -1 of ("00" & pstr) | |
set tgt_file to "ssw" & "scr" & "_" & (pstr) & ".jpg" | |
-- 出力するファイル名を「sswyyyymmddhhmmss.jpg」に。 | |
tell application "Kindle 2" -- 通常 "Kindle" でよい | |
activate -- ウインドウフォーカスを移す |