# Image ROI 설정. 과거저번은 찾으면 많으니 패스! 2.4.3 의 버전에서는 아래와 같음. Mat roi = dst(m_Rect); imshow("ROI", roi); 결과는 맘에듬~
homepage : gotohttp://www.csie.ntu.edu.tw/~cjlin/libsvm/ version : 3.14( Nov.2012)zip : download.zip versiontar.gz : download.tar.gz version 기타 SVM library- SVMLight http://svmlight.joachims.org/ - LIBSVM http://www.csie.ntu.edu.tw/~cjlin/libsvm/index.html - mySVM http://www-ai.cs.uni-dortmund.de/SOFTWARE/MYSVM/index.html - BioSVM http://biojava.org/wiki/Main_Page 사용방법 on matlabhttp://blog.naver..
SVM C/C++ code >> 주의사항 - svm 에 초기값을 제대로 넣어주어야 결과가 제대로 나온다. dataclass 의 type 수를 2개만 줄건지 그 이상 줄건지 확실히 하도록 하자. 그렇지 않으면 svm 의 predict() 함수의 return 값이 원하는 값이 아닐 거다! >> 코드 - 초기화 // Set up training data float labels[4] = {1.0, 2.0, 2.0, 1.0}; Mat labelsMat(4, 1, CV_32FC1, labels); float trainingData[4][2] = { {501, 10}, {255, 10}, {501, 255}, {10, 501} }; Mat trainingDataMat(4, 2, CV_32FC1, trainingDat..
ROI method #include #include #include #include #include using namespace std; using namespace cv; #define PATCH_SIZE 64 #define PATCH_WIDTHSTEP 64 #define PATCH_HEIGHTSTEP 64 void main() { Mat img = imread( "test.jpg"); int rows = img.rows-PATCH_WIDTH-2; int cols = img.cols-PATCH_HEIGHT-2; for( int i=0; i
영상에 글자 출력 for Android Native code CvFont m_font; // OpenCV font // get fps and Output if(IS_DEBUG){ fTime = (cvGetTickCount() - fTime)/(cvGetTickFrequency()*1000); DPRINTF("Excution Time = %g ms", fTime); char outputString[30] = {0,}; sprintf( outputString, "fps = %lf", fTime ); putText( *pMatRgb, outputString, Point(10, 30), FONT_HERSHEY_SIMPLEX, 1.0, CV_RGB(0,255,0), 2.0); } // init Font - 혹시나..
using a FunctiongetTickCount()getTickFrequency()cvGetTickCount()- native Code 를 위해서 찾아보았는데 GetTickCount() 를 사용하지 않고 cv 의 함수를 사용하여서 불필요한 include header 를 할 필요가 없어진다. float fTime = cvGetTickCount(); // To do list DetectMarker(pMatGr); DrawSquares(pMatRgb); // get fps and Output if(IS_DEBUG){ fTime = (cvGetTickCount() - fTime)/(cvGetTickFrequency()*1000); DPRINTF("Excution Time = %g ms", fTime); } ..
using openCV2.4.3 for Detect Rectangle(제목이 문법이 맞는가 모르겠네~ for 빼는게 나아보이는데 ) openCV version : 2.4.3 using Visual studio 2010 소스코드 #include #include #include #include using namespace std; using namespace cv; // example : Creating Bounding rotated boxes and ellipses for contours // http://docs.opencv.org/doc/tutorials/imgproc/shapedescriptors/bounding_rotated_ellipses/bounding_rotated_ellipses.html M..
OpenCV :groupRectangles() OpenCV version : 2.4.3 #include "" 부분은 태그를 방해하므로~ #include #include #include #include using namespace std;using namespace cv; 함수원형 CV_EXPORTS void groupRectangles(CV_OUT CV_IN_OUT vector& rectList, int groupThreshold, double eps=0.2); CV_EXPORTS_W void groupRectangles(CV_OUT CV_IN_OUT vector& rectList, CV_OUT vector& weights, int groupThreshold, double eps=0.2); CV_EXPO..
Rectangle Detection 현재 OpenCV 2.4.3 버전 기존의 Detection 방법 Referencehttp://dasl.mem.drexel.edu/~noahKuntz/openCVTut7.html http://opencv-users.1802565.n2.nabble.com/findContours-in-OpenCV-2-0-beta-td3740052.html Mat 를 이용하는 방법http://stackoverflow.com/questions/7838487/executing-cvwarpperspective-for-a-fake-deskewing-on-a-set-of-cvpoint http://stackoverflow.com/questions/8667818/opencv-c-obj-c-detecti..
IplImage or CvMat to Mat > IplImage or CvMat -----> cv::Mat: > from definition of cv::Mat // converts old-style CvMat to the new matrix; the data is not copied by default Mat(const CvMat* m, bool copyData=false); // converts old-style IplImage to the new matrix; the data is not copied by default Mat(const IplImage* img, bool copyData=false); IplImage *myIplImage = cvCreateImage(...); Mat myIplIm..
아나 너무 어이가 없군요 ㅜ_ㅜ 정작 하루를 날리면서...이클립스만 잔뜩 setting 하게되네요 흑흑.... opencv 2.4.3 버전을 셋팅하고나서 컴파일이 잘되었습니다. 근데...이유모를 에러가 생기는데 cpp 에서 자동컴파일로 인해 에러가 발생하였는데...그건 eclipse 에서 빌드를 못하도록 막았습니다. 근데..-_-; 에러가 남는데 로그가 남지않아서 이리저리 찾다가. ndk-build 를 못찾는다라고 나오는데...eclipse 메뉴를 다 뒤져서 -_-; build 명령어를 지워줬더니 원상복귀되네요. 으아아아악. opencv 2.4.3 을 꼭 써야해 =ㅅ= 흑..!! 그래도 찾아따. 맥에서 편집하는거라 상태가 영...마우스도 없고, 편집하는 콘트롤은 맥에서는 꽝이니..ㄸㄷ무튼 표시해둔곳에서 ..