Skip to content

Instantly share code, notes, and snippets.

@martin-etchart
martin-etchart / transform_matrix_change_base.cpp
Created November 11, 2016 15:08
Change coord system of 2x3 transformation matrix estimated in opencv coord system to a coord system equivalent of doing y'=height-y
/**
* Changes the coordinate system of the transformation matrix from regular image
* coords (opencv-like) to a different coords system like this:
*
* .-------> x ^ y
* | V |
* | ---> |
* | |
* v y .-------> x
*
@martin-etchart
martin-etchart / lsd_opencv.c
Created October 28, 2012 18:56
OpenCV to LSD image type conversion (IplImage *frame -> double *image)
uchar *data = (uchar *)frame->imageData;
for (i=0;i<width;i++){
for(j=0;j<height;j++){
image[ i + j * width ] = data[ i + j * width];
}
}
@martin-etchart
martin-etchart / makefile
Created September 6, 2012 04:17
stasm makefile 2
OPENCV_HOME=/usr
INCL=\
-I$(OPENCV_HOME)/include/opencv\
@martin-etchart
martin-etchart / makefile
Created September 6, 2012 04:14
stasm makefile
#change this line
LIBS=-lm -lcv -lhighgui -lcvaux -lgsl -lgslcblas -ljpeg
#for this line
LIBS=-lm -lgsl -lgslcblas -ljpeg -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann
@martin-etchart
martin-etchart / hello.c
Last active October 10, 2015 05:37
gist test
#include <stdio.h>
int main(){
printf("Hello, World!\n");
return 0;
}