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 <iostream> | |
#include "opencv2/opencv.hpp" | |
using namespace cv; | |
using namespace std; | |
int main(int argc, char **argv) | |
{ | |
cv::Mat trainingData, trainingLabels; | |
vector<String> fn; |
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
import org.opencv.core.*; | |
import org.opencv.imgproc.*; | |
import org.opencv.imgcodecs.Imgcodecs; | |
import org.opencv.videoio.*; | |
class SimpleSample { | |
static{ System.loadLibrary(Core.NATIVE_LIBRARY_NAME); } | |
//~ static int fcc(char a, char b, char c, char d) { | |
//~ return (d<<24 | c<<16 | b<<8 | a); |
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
// | |
// facerec.cpp, this goes into your dll/so. | |
// this is just an example for lbp, but it will work similar for fisher and eigen, too. | |
// | |
#include "jni.h" | |
#include "opencv2/contrib/contrib.hpp" | |
// |
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
int tv=13; | |
namedWindow("win1"); | |
createTrackbar("win1","win1",&tv,100); | |
Mat img(400,400,CV_8UC3,Scalar(200,80,80)); | |
while(1) | |
{ | |
Mat m2 = img.clone(); | |
// do something with tv: | |
m2 += Scalar::all(tv); |
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 <opencv2/opencv.hpp> | |
using namespace std; | |
#include <cstdio> | |
#include <iostream> | |
using namespace cv; | |
// | |
// | |
// "Multimode Spatiotemporal Background Modeling for Complex Scenes" |
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 <opencv2/opencv.hpp> | |
#include <iostream> | |
using namespace cv; | |
using namespace std; | |
// | |
// try to find a frontal face 1st, if that fails, fall back to profile | |
// |
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 | |
import sys, re, os, time | |
from string import Template | |
from parse_tree import ParseTree, todict, constants | |
from filters import * | |
class MatlabWrapperGenerator(object): | |
""" | |
MatlabWrapperGenerator is a class for generating Matlab mex sources from | |
a set of C++ headers. MatlabWrapperGenerator objects can be default |
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
;try this ;) | |
void* cv_createFisherFaceRecognizer(int num_components, double threshold) | |
{ | |
typedef Ptr<FaceRecognizer> ptr_fr; | |
ptr_fr _retval_ = cv::createFisherFaceRecognizer(num_components, threshold); | |
return (void*)(new ptr_fr(_retval_)); | |
} |
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
>echo -n ../cmake-2.8.12.1/bin/cmake -G \"Unix Makefiles\" -DOPENCV_EXTRA_MODULE | |
S_PATH=../opencv_contrib/modules -DBUILD_TIFF=> cm.in | |
echo -n ON -DWITH_TIFF=ON -DWITH_IPP=ON -DBUILD_PNG=ON -DWITH_PNG=>> cm.in | |
echo -n ON -DBUILD_ZLIB=ON -DWITH_JASPER=OFF -DWITH_OPENEXR=OFF -DBUILD_OPENEXR= | |
OFF -DBUILD_SHARED_LIBS= >> cm.in | |
echo -n OFF -DCMAKE_INSTALL_PREFIX=/app/ocv3 -DBUILD_TESTS=OFF -DBUILD_PERF_TES | |
TS= >> cm.in | |
echo OFF -DBUILD_opencv_apps=OFF -DBUILD_examples=OFF -DANT_EXECUTABLE=../apach | |
e-ant-1.9.4/bin/ant >> cm.in |
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 "opencv2/opencv.hpp" | |
using namespace cv; | |
using namespace std; | |
#ifndef CV_SQR | |
# define CV_SQR(x) ((x)*(x)) | |
#endif |
OlderNewer