-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDisplayFrames.c
More file actions
45 lines (37 loc) · 881 Bytes
/
DisplayFrames.c
File metadata and controls
45 lines (37 loc) · 881 Bytes
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
//Display images through OpenCV
#include "DisplayFrames.h"
using namespace cv;
//Display a single image, need to supply the frame's name, the Mat file
//and the position, where there are 6 positions.
void disImage(char* winName, Mat Image, int Position) {
#ifndef WINDOWX
#define WINDOWX 500
#define WINDOWY 400
#endif
namedWindow(winName, WINDOW_NORMAL);
imshow(winName, Image);
resizeWindow(winName, WINDOWX, WINDOWY);
switch (Position) {
case 1:
moveWindow(winName, 0, 0);
break;
case 2:
moveWindow(winName, WINDOWX+5, 0);
break;
case 3:
moveWindow(winName, (WINDOWX*2)+10, 0);
break;
case 4:
moveWindow(winName, 0, WINDOWY+25);
break;
case 5:
moveWindow(winName, WINDOWX+5, WINDOWY+25);
break;
case 6:
moveWindow(winName, (WINDOWX*2)+10, WINDOWY+25);
break;
default:
moveWindow(winName, 0, 0);
break;
}
}