File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
samples/cpp/tutorial_code/core/AddingImages Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 9
9
#include < iostream>
10
10
11
11
using namespace cv ;
12
+ using namespace std ;
12
13
13
14
/* *
14
15
* @function main
@@ -21,23 +22,23 @@ int main( void )
21
22
Mat src1, src2, dst;
22
23
23
24
// / Ask the user enter alpha
24
- std:: cout<< " Simple Linear Blender " <<std:: endl;
25
- std:: cout<< " -----------------------" <<std:: endl;
26
- std:: cout<< " * Enter alpha [0-1]: " ;
27
- std:: cin>> input;
25
+ cout << " Simple Linear Blender " << endl;
26
+ cout << " -----------------------" << endl;
27
+ cout << " * Enter alpha [0-1]: " ;
28
+ cin >> input;
28
29
29
30
// We use the alpha provided by the user if it is between 0 and 1
30
31
if ( alpha >= 0 && alpha <= 1 )
31
32
{ alpha = input; }
32
33
33
34
// ![load]
34
35
// / Read images ( both have to be of the same size and type )
35
- src1 = imread (" ../data/LinuxLogo.jpg" );
36
- src2 = imread (" ../data/WindowsLogo.jpg" );
36
+ src1 = imread ( " ../data/LinuxLogo.jpg" );
37
+ src2 = imread ( " ../data/WindowsLogo.jpg" );
37
38
// ![load]
38
39
39
- if ( src1.empty () ) { std:: cout<< " Error loading src1" <<std:: endl; return -1 ; }
40
- if ( src2.empty () ) { std:: cout<< " Error loading src2" <<std:: endl; return -1 ; }
40
+ if ( src1.empty () ) { cout << " Error loading src1" << endl; return -1 ; }
41
+ if ( src2.empty () ) { cout << " Error loading src2" << endl; return -1 ; }
41
42
42
43
// ![blend_images]
43
44
beta = ( 1.0 - alpha );
You can’t perform that action at this time.
0 commit comments