From: vskarlsruhe Date: Thu, 23 Feb 2017 10:43:30 +0000 (+0100) Subject: Update AddingImages.cpp X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~1180^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=56cedfc4d218313cf0071ce07624525c66b69140;p=platform%2Fupstream%2Fopencv.git 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. --- diff --git a/samples/cpp/tutorial_code/core/AddingImages/AddingImages.cpp b/samples/cpp/tutorial_code/core/AddingImages/AddingImages.cpp index 491ae7a..d8024cd 100644 --- a/samples/cpp/tutorial_code/core/AddingImages/AddingImages.cpp +++ b/samples/cpp/tutorial_code/core/AddingImages/AddingImages.cpp @@ -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]