Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
\documentclass{article} | |
\usepackage{siunitx} | |
\usepackage{booktabs} | |
\usepackage[table]{xcolor} | |
\usepackage{etoolbox} | |
% Individual \itshape or \bfseries work without this. | |
% Combinations of both need the robustified version |
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
import os.path | |
from morphocut import Call, Pipeline | |
from morphocut.contrib.ecotaxa import EcotaxaWriter | |
from morphocut.contrib.zooprocess import CalculateZooProcessFeatures | |
from morphocut.file import Glob | |
from morphocut.image import FindRegions, ImageReader, RGB2Gray | |
from morphocut.parallel import ParallelPipeline | |
from morphocut.str import Format | |
from morphocut.stream import Enumerate, Unpack |
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
import matplotlib.pyplot as plt | |
from scipy.spatial import distance | |
from fastdist import fastdist | |
import timeit | |
import numpy as np | |
import numba | |
from fastdist import __version__ as fastdist_version | |
import scipy | |
from cpuinfo import get_cpu_info |
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
''' | |
Created on 06.12.2017 | |
@author: mschroeder | |
''' | |
def create_tree(depth, n_children): | |
if depth > 0: | |
return [create_tree(depth - 1, n_children) for _ in range(n_children)] | |
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
void write_pgm(unsigned short id, unsigned char *buf, int width, int height) { | |
char filename[1024]; | |
sprintf(filename, "%simage_%d.pgm", destinationPrefix, id); | |
FILE *fp = fopen(filename, "wb"); | |
if (fp) { | |
fprintf(fp, "P5\n%d %d\n%d\n", width, height, 0xFF); | |
fwrite(buf, width * height, 1, fp); | |
fclose(fp); |