Commit 56cedfc4 authored by vskarlsruhe's avatar vskarlsruhe Committed by GitHub

Update AddingImages.cpp

If-condition was always true (alpha = 0.5 is set in Line 19).
Now the user input is checked to be between 0 and 1.
This is correct in the tutorial code for OpenCV 2.4.
parent ee9c0f5f
......@@ -27,7 +27,7 @@ int main( void )
std::cin>>input;
// We use the alpha provided by the user if it is between 0 and 1
if( alpha >= 0 && alpha <= 1 )
if( input >= 0 && input <= 1 )
{ alpha = input; }
//![load]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment