Skip to content

Instantly share code, notes, and snippets.

View drhirsch's full-sized avatar

Michael Hirsch drhirsch

View GitHub Profile
@drhirsch
drhirsch / oct42configureout.txt
Last active February 28, 2017 02:33
Octave 4.2 ./configure output
configure:
Octave is now configured for x86_64-pc-linux-gnu
Source directory: .
Installation prefix: /opt/octave4
C compiler: gcc -pthread -fopenmp -Wall -W -Wshadow -Wformat -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wcast-align -Wcast-qual -g -O2
C++ compiler: g++ -pthread -fopenmp -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -g -O2
Fortran compiler: gfortran -g -O2
Fortran libraries: -L/usr/lib/gcc/x86_64-linux-gnu/6 -L/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/6/../../.. -lgfortran -lm -lquadmath
@drhirsch
drhirsch / opencv3.2_cmake_output.txt
Last active April 4, 2017 20:04
OpenCV 3.2 Cmake output on Ubuntu 16.04
cmake -DBUILD_TIFF=ON -DBUILD_opencv_java=OFF -DWITH_CUDA=OFF -DENABLE_AVX=ON -DWITH_OPENGL=ON -DWITH_OPENCL=ON -DWITH_IPP=ON -DWITH_TBB=ON -DWITH_EIGEN=ON -DWITH_V4L=ON -DWITH_VTK=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_opencv_python2=OFF -DCMAKE_INSTALL_PREFIX=$(python3 -c "import sys; print(sys.prefix)") -DPYTHON3_EXECUTABLE=$(which python3) -DPYTHON3_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") -DPYTHON3_PACKAGES_PATH=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") ..
-- Detected version of GNU GCC: 62 (602)
-- FP16: Compiler support is available
-- Found ZLIB: ~/miniconda3/lib/libz.so (found suitable version "1.2.8", minimum required is "1.2.3")
-- Found ZLIB: ~/miniconda3/lib/libz.so (found version "1.2.8")
-- Found OpenEXR: /usr/lib/x86_64-linux-gnu/libIlmImf.so
-- Checking for module 'gtk+-3.0'
-- No package 'gtk+-3.0' found
-- Checking for module 'gtk+-2.0'
-- F
@drhirsch
drhirsch / demo_multipage_tiff_write_skimage.py
Created September 7, 2016 18:50
Multipage TIFF with skimage/freeimage (recommend tifffile instead)
from skimage.io._plugins import freeimage_plugin as freeimg
"""
imgs is a Numpy ndarray:
Nimg x Y x X (grayscale)
Nimg x Y x X x 3 (RGB color)
"""
freeimg.write_multipage(imgs,'myimages.tiff')
@drhirsch
drhirsch / unifi_ubuntu.sh
Created September 5, 2016 16:31
Ubiquiti Unifi on Ubuntu 16.04
#!/bin/bash
echo "deb http://www.ubnt.com/downloads/unifi/debian unifi5 ubiquiti" > /etc/apt/sources.list.d/ubnt.list
apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50
apt-get update
apt-get install unifi
@drhirsch
drhirsch / montage_demo.m
Created September 5, 2016 15:20
Montage() for Matlab and Octave
% note images must be exactly identically sized width x height
path = '~'
flist = {'1.png','2.png'}; % create this list with another function for real use
Nimg = length(flist);
finf = imfinfo([path,'/',flist(1).name]);
% this axis ordering needed by montage()
% third dimension is 1 for grayscale, 3 for color
oneorthree = 3;
@drhirsch
drhirsch / draftsight.desktop
Created September 5, 2016 05:30
Draftsight Ubuntu desktop start menu icon ~/.local/share/applications/draftsight.desktop
[Desktop Entry]
Name=DraftSight (Linux)
Comment=Edit DWG/DXF files
GenericName=DraftSight
Exec="/opt/dassault-systemes/DraftSight/Linux/DraftSight"
Type=Application
Terminal=false
Icon=dassault-systemes.draftsight
Categories=Application;Graphics;
@drhirsch
drhirsch / minimal_opencv3_cmake.sh
Created September 5, 2016 03:08
Minimal OpenCV 3.1 cmake command
cmake -DBUILD_TIFF=ON -DBUILD_opencv_java=OFF -DWITH_CUDA=OFF -DENABLE_AVX=OFF -DWITH_OPENGL=OFF -DWITH_OPENCL=OFF -DWITH_IPP=OFF -DWITH_TBB=OFF -DWITH_EIGEN=OFF -DWITH_V4L=OFF -DWITH_VTK=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=$(python3 -c "import sys; print(sys.prefix)") -DPYTHON3_EXECUTABLE=$(which python3) -DPYTHON3_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") -DPYTHON3_PACKAGES_PATH=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") ..
@drhirsch
drhirsch / cmake_opencv3.sh
Created September 5, 2016 02:55
Cmake commands for OpenCV 3.1
#/bin/sh
cd /tmp
wget https://github.com/Itseez/opencv/archive/3.1.0.zip
unzip 3*.zip
cd /opencv*
mkdir release
cd release
@drhirsch
drhirsch / prereq_opencv3_mac.sh
Created September 5, 2016 02:53
Prerequisites for OpenCV 3.1 on MacOS
#!/bin/sh
brew install git cmake pkg-config jpeg libpng libtiff openexr eigen tbb
@drhirsch
drhirsch / prereqopencv3.sh
Created September 5, 2016 02:51
OpenCV 3.1 prerequisites on Linux
#!/bin/sh
apt-get install git libjpeg-dev libpng-dev libtiff5-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev pkg-config cmake libgtk2.0-dev libeigen3-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev sphinx-common libtbb-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libopenexr-dev libgstreamer-plugins-base1.0-dev libavcodec-dev libavutil-dev libavfilter-dev libavformat-dev libavresample-dev