This file contains hidden or 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
| http://study.marearts.com/2017/06/stl-vector-test-for-pop-back-and-pop.html | |
| #include "stdafx.h" | |
| #include <vector> | |
| using namespace std; | |
| int _tmain(int argc, _TCHAR* argv[]) | |
| { | |
| vector < int > a; |
This file contains hidden or 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
| http://study.marearts.com/2017/05/openmp-test-on-visual-studio.html | |
| #include <stdio.h> | |
| #include <time.h> | |
| #include <omp.h> //for omp_get_thread_num() | |
| void main() | |
| { | |
| ///////////////////////////////////////////////////////// | |
| printf("zero case : OpenMP Test (max thread:%d)\n ", omp_get_max_threads() ); | |
| int i; |
This file contains hidden or 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
| http://study.marearts.com/2017/05/for-each-foreach-for-auto-concept-clean.html | |
| #include <stdio.h> | |
| #include <iostream> | |
| #include <vector> | |
| #include <time.h> //rand | |
| #include <algorithm> //for_each | |
| using namespace std; | |
| #define N 10 |
This file contains hidden or 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
| http://study.marearts.com/2017/05/two-types-of-check-sum.html | |
| //intel method | |
| unsigned char CalcChecksum(unsigned char *data, int leng) | |
| { | |
| unsigned char csum; | |
| csum = 0xFF; | |
| for (; leng > 0; leng--) | |
| csum += *data++; |
This file contains hidden or 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; | |
| int main(int, char) | |
| { | |
| namedWindow("img", 1); | |
| Mat img = imread("anapji.jpg"); | |
This file contains hidden or 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
| http://study.marearts.com/2017/05/opencv-integral-function-example-code.html | |
| http://cvlecture.marearts.com/2017/05/opencv-lecture-5-6-integral.html | |
| int main(int, char) | |
| { | |
| ; | |
| Mat img = Mat(10, 10, CV_8UC1); | |
| randu(img, 0, 10); | |
| cout << "origin" << endl << img << endl; |
This file contains hidden or 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
| VideoCapture stream1(1); //0:note book, 1:usb webcam | |
| Mat frame; //current frame | |
| Mat gray, binary_otsu, binary_th, binary_ad_m, binary_ad_g; | |
| namedWindow("img", 0); | |
| namedWindow("otsu", 0); | |
| namedWindow("binary_th", 0); | |
| namedWindow("binary_adaptive_mean", 0); |
This file contains hidden or 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
| http://study.marearts.com/2017/04/opencv-background-subtraction-32.html | |
| #include "opencv2\opencv.hpp" | |
| #include "opencv2\bgsegm.hpp" //for MOG, GMG | |
| #include <iostream> | |
| #include <time.h> | |
| #ifdef _DEBUG | |
| #pragma comment(lib, "opencv_core320d.lib") | |
| #pragma comment(lib, "opencv_highgui320d.lib") |
This file contains hidden or 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
| http://study.marearts.com/2017/04/video-show-and-write-keeping-original.html | |
| void main() | |
| { | |
| VideoCapture capture("rhinos.avi"); | |
| Mat frame; | |
| //Set properties | |
| int askFileTypeBox = 0; //-1 is show box of codec |
This file contains hidden or 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 click_x=0, click_y=0; | |
| void CallBackFunc(int event, int x, int y, int flags, void* userdata) | |
| { | |
| if (event == EVENT_LBUTTONDOWN) | |
| { | |
| printf("lLBUTTONDOWN down %d, %d \n", x, y); | |
| click_x = x; | |
| click_y = y; |