This file contains 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
CC = g++ | |
CFLAGS = -g -Wall | |
SRCS = HelloWorld.cpp | |
PROG = HelloWorld.exe | |
OPENCV = -I"C:\opencv\build\include" -L"C:\opencv\build\x86\mingw\lib" -lopencv_core243 -lopencv_highgui243 | |
$(PROG) : $(SRCS) | |
$(CC) $(CFLAGS) -o $(PROG) $(SRCS) $(OPENCV) |
This file contains 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
CC = g++ | |
CFLAGS = -g -Wall | |
SRCS = HelloWorld.cpp | |
PROG = HelloWorld | |
OPENCV = `pkg-config opencv --cflags --libs` | |
LIBS = $(OPENCV) | |
$(PROG):$(SRCS) | |
$(CC) $(CFLAGS) -o $(PROG) $(SRCS) $(LIBS) |
This file contains 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
# add these lines to your .pro file | |
INCLUDEPATH += /usr/local/lib | |
LIBS +=`pkg-config opencv --cflags --libs` |
This file contains 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
cmake_minimum_required(VERSION 2.8 FATAL_ERROR) | |
project(HelloWorld) | |
set(EXE HelloWorld) | |
find_package(PCL 1.6 REQUIRED) | |
include_directories(${PCL_INCLUDE_DIRS}) | |
link_directories(${PCL_LIBRARY_DIRS}) | |
add_definitions(${PCL_DEFINITIONS}) |
This file contains 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
#!/bin/bash | |
set -e | |
cd $(readlink -f $(dirname $0)) | |
exec ./exe $* |
This file contains 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
#include "FlyCapture2.h" | |
#include <opencv2/core/core.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include <iostream> | |
using namespace FlyCapture2; | |
int main() |
This file contains 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
using namespace Eigen; | |
typedef Matrix< float64_t, Dynamic, Dynamic, ColMajor > EMatrix; | |
using std::cout; | |
using std::endl; | |
void print(EMatrix A) | |
{ | |
int n = A.rows(); | |
int m = A.cols(); |
This file contains 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
using namespace Eigen; | |
// these are the typedefs I like to work with | |
typedef Matrix< double, Dynamic, 1, ColMajor > EVector; | |
typedef Matrix< double, Dynamic, Dynamic, ColMajor > EMatrix; | |
// Mean | |
EVector mean = X.rowwise().sum() / X.rows(); | |
// Standard Deviation |
This file contains 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
/* Using OpenCV and Shogun Machine Learning | |
* gist by Kevin Hughes | |
*/ | |
#include <opencv2/core/core.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include <shogun/base/init.h> | |
#include <shogun/lib/common.h> | |
#include <shogun/lib/SGMatrix.h> |
This file contains 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 | |
# robust_pca_project.py | |
# | |
# Author: Kevin Hughes | |
# Date: May 2013 | |
""" | |
An Implementation of the robust subspace projection technique described in: |
OlderNewer