/
findMin.cpp
62 lines (55 loc) · 1.11 KB
/
findMin.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* findMin.cpp
*
* Created on: Aug 3, 2015
* Author: Vidur
*/
//include opencv library files
#include "opencv2/highgui/highgui.hpp"
#include <opencv2/objdetect/objdetect.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/video/tracking.hpp>
#include "opencv2/nonfree/nonfree.hpp"
#include "opencv2/gpu/gpu.hpp"
#include <opencv2/nonfree/ocl.hpp>
#include <opencv/cv.h>
#include <opencv2/video/background_segm.hpp>
#include <opencv2/core/core.hpp>
#include "bgfg_vibe.hpp"
//include c++ files
#include <iostream>
#include <fstream>
#include <ctime>
#include <time.h>
#include <thread>
#include <chrono>
#include <stdio.h>
#include <stdlib.h>
#include <limits>
#include <math.h>
#include <algorithm>
#include <vector>
#include <pthread.h>
#include <cstdlib>
using namespace std;
using namespace cv;
//identfy minimum between numbers
int findMin(int num1, int num2) {
//if num1 is lower
if (num1 < num2) {
//return lower number
return num1;
}
//if num2 is lower
else if (num2 < num1)
{
//return lower number
return num2;
}
//if they are the same
else
{
//return num1
return num1;
}
}