12/08/2016

convert char* to LPWSTR

refer to below example


char text[] = "something";
wchar_t wtext[20];
mbstowcs(wtext, text, strlen(text)+1);//Plus null
LPWSTR ptr = wtext;

12/07/2016

convert tchar * to char * / char * to tchar*

tchar* -> char*

"Tch" is tchar*
"pStrTch" is char*


TCHAR Tch[MAX_PATH + 1];
int lenOftch = (wcslen(Tch) + 1) * 2;
char * pStrTch = (char*)malloc(sizeof(char)*MAX_PATH);

//tchar* to char*
WideCharToMultiByte(CP_UTF8, 0, Tch, -1, pStrTch, lenOftch, NULL, NULL);
//


char* -> tchar*


char charBuff[]="test";
TCHAR szUniCode[256]={0,};
MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, charBuff, strlen(charBuff), szUniCode, 256);

12/01/2016

Create a console window in MFC

Insert code in stdafx.h

#pragma comment(linker, "/entry:WinMainCRTStartup /subsystem:console")

The print result is output.



string to LPCTSTR

Very simple way~


string s;
CString cs(s.c_str()); //< - lpctstr


11/30/2016

Set up VisualStudio to run programs as an administrator



Enter the project properties and change the Configuration Properties -> Linker -> Manifest File -> UAC Execution Level item to requireAdministrator.


11/21/2016

Keycode and ascii code

KEY
KeyCode
ASCII
KEY
KeyCode
ASCII
0
48
48
Numpad 0
96
48
1
49
49
Numpad 1
97
49
2
50
50
Numpad 2
98
50
3
51
51
Numpad 3
99
51
4
52
52
Numpad 4
100
52
5
53
53
Numpad 5
101
53
6
54
54
Numpad 6
102
54
7
55
55
Numpad 7
103
55
8
56
56
Numpad 8
104
56
9
57
57
Numpad 9
105
57
A
65
65
Multiply
106
42
B
66
66
Add
107
43
C
67
67
Enter
13
13
D
68
68
Subtract
109
45
E
69
69
Decimal
110
46
F
70
70
Divide
111
47
G
71
71
F1
112
 
H
72
72
F2
113
 
I
73
73
F3
114
 
J
74
74
F4
115
 
K
75
75
F5
116
 
L
76
76
F6
117
 
M
77
77
F7
118
 
N
78
78
F8
119
 
O
79
79
F9
120
 
P
80
80
F10
121
 
Q
81
81
F11
122
 
R
82
82
F12
123
 
S
83
83
Backspace
8
8
T
84
84
Tab
9
9
U
85
85
Enter
13
13
V
86
86
Shift
16
0
W
87
87
Left Control
17
0
X
88
88
Right Control
25
0
Y
89
89
Left Alt
18
0
Z
90
90
Right Alt
21
0
a
65
97
Caps Lock
20
0
b
66
98
Esc
27
27
c
67
99
Spacebar
32
32
d
68
100
Page Up
33
0
e
69
101
Page Down
34
0
f
70
102
End
35
0
g
71
103
Home
36
0
h
72
104
Left Arrow
37
0
i
73
105
Up Arrow
38
0
j
74
106
Right Arrow
39
0
k
75
107
Down Arrow
40
0
l
76
108
Insert
45
0
m
77
109
Delete
46
127
n
78
110
Num Lock
144
0
o
79
111
ScrLk
145
0
p
80
112
Pause/Break
19
0
q
81
113
; :
186
59
r
82
114
= +
187
61
s
83
115
– _
189
45
t
84
116
/?
191
47
u
85
117
‘~
192
96
v
86
118
[
219
91
w
87
119
|
220
92
x
88
120
]
221
93
y
89
121
” ‘
222
39
z
90
122
< ,
188
44
 
 
 
> .
190
46

10/31/2016

Real-time N camera stitching Class.

As you can see in the following video,
I created a class that stitching n cameras in real time.
https://www.youtube.com/user/feelmare/search?query=stitching

refer to this label, about stitching in my blog.
http://study.marearts.com/search/label/Stitching

The class name is CMareStitching.
This class was created to stitching_detailed examples of opencv by referencing.
So if you try, everybody can create this result.

The principle of class ... it is the main idea of ​​separating the calculation online and offline calculations such as url.
http://study.marearts.com/2015/02/real-time-stitching-multi-video-to-one.html


Main part to use this class is as follows.
< gist code start >

< gist code end >

First enter the index to camera stitching.
Press "p" is a real-time panoramic image after matching relations calculation.
Pressing "r" again return to the camera image.
It is quit by pressing the "q".

When you press a key it must be pressed on the video screen active.
The command window active, and not input the key.

As you see the main source code, there is no easy interface only code. so, you have to modify the code for your purpose, ex) the camera number.

The project code is uploaded privately on github but not free.
https://github.com/MareArts/Realtime_N_camera_Stitching
Why not share FREE asked, 2 reasoning, an little effort of me and Fundraising operating costs of blog(for other planed project)... very Sorry.

Below url is header, lib, dll files for developing.
You have to set path in visual studio.
https://www.amazon.com/clouddrive/share/zv7xEoQ0iBm0Cnaw76aTdQuTE1pdPskba0hgqJdb42n?ref_=cd_ph_share_link_copy

And this url is demo files. you can test to download.
The url includes execute file and related dlls.
https://www.amazon.com/clouddrive/share/zOZXmvrYTb4Er0OYg5qezmk24OPKq0znWlZKly4ZC01?ref_=cd_ph_share_link_copy


And this project coded by win32, opencv 249, visual studio 2012.

Thank you.


updating 42/06/2018
I have decided to sell source code ^^
If you have interest, go to here, you can buy source code


** 2021.06 updated ** 
realtime stitching SDK: 




#tags
VideoCapture, CMareStitching, stitching, realtime stitching