Skip to content

Instantly share code, notes, and snippets.

@ajonnet
ajonnet / build-opencv.sh
Created March 27, 2019 07:14 — forked from willprice/README.md
Install OpenCV 3.4.2 on Raspberry Pi Raspbian Stretch
#!/usr/bin/env bash
pushd ~/opencv/opencv-3.4.2
mkdir -p build
pushd build
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D CMAKE_BUILD_TYPE=RELEASE \
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.4.2/modules \
-D OPENCV_ENABLE_NONFREE=ON \
@ajonnet
ajonnet / gaborFilterDemo.cpp
Created August 30, 2018 12:49
Function to demo Gabor Filter params
void gaborFilterDemo() {
string inpImgFPath = "testImg.png";
cv::Mat inpImg = imread(inpImgFPath);
cv::Mat grayInpImg;
cvtColor(inpImg,grayInpImg,CV_BGR2GRAY);
cv::Mat grayInpImg_F;
grayInpImg.convertTo(grayInpImg_F,CV_32F);
@ajonnet
ajonnet / depth_type_cvmat.cpp
Created August 23, 2018 09:57 — forked from ashwin/depth_type_cvmat.cpp
Useful functions to get the depth or type of a cv::Mat
std::string GetMatDepth(const cv::Mat& mat)
{
const int depth = mat.depth();
switch (depth)
{
case CV_8U: return "CV_8U";
case CV_8S: return "CV_8S";
case CV_16U: return "CV_16U";
case CV_16S: return "CV_16S";
@ajonnet
ajonnet / opencv320.sh
Created December 14, 2017 13:50 — forked from dapperfu/opencv320.sh
Build .deb package for OpenCV 3 w/Python3 bindings.
#!/usr/bin/env bash
# Config
MAINTAINER="Jed Frey"
VERSION=3.2.0
# Adapted from http://www.pyimagesearch.com/2016/10/24/ubuntu-16-04-how-to-install-opencv/
apt-get install --yes libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev libavcodec-dev libavformat-dev \
libswscale-dev libxvidcore-dev libx264-dev libv4l-dev liblapacke-dev libgtk-3-dev \
libopenblas-dev libhdf5-dev libtesseract-dev libleptonica-dev \
@ajonnet
ajonnet / checkOpencvVer.cpp
Created November 20, 2017 13:25
Get Opencv build information
// https://www.solarianprogrammer.com/2014/04/21/opencv-beaglebone- black-ubuntu/
// Test to check the OpenCV version
// Build on Linux with:
// g++ test_1.cpp -o test_1 -lopencv_core
#include <opencv2/opencv.hpp>
#include <iostream>
int main() {
std::cout << "Hello, OpenCV version "<< CV_VERSION << std::endl;
@ajonnet
ajonnet / docker-cleanup-resources.md
Created November 11, 2017 12:02 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@ajonnet
ajonnet / raspiCam.pc
Created October 27, 2017 12:59
raspiCam.pc
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
mmalLibDir=/opt/vc/lib
Name: raspiCam
Description: RaspiCam library
Version: 0.1.6
Libs: -L${mmalLibDir} -L${exec_prefix}/lib -lraspicam -lraspicam_cv -lmmal -lmmal_core -lmmal_util
gsutil rsync -rd -x \.git . gs://your-bucket
@ajonnet
ajonnet / NavCtlrBackTitleHider.h
Created April 9, 2016 11:53
NavigationController BackButton Title hider
#import <Foundation/Foundation.h>
@interface NavCtlrBackTitleHider : NSObject <UINavigationControllerDelegate>
@end
@ajonnet
ajonnet / info.txt
Last active May 9, 2016 05:46
ViewController Callbacks
-->ViewController Callbacks
loadView Called
viewDidLoad called
ViewWillAppear called
WillLayoutSubviews called
DidLayoutSubviews called
viewDidAppear called
-->Location for XCode Plugins
~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/