mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
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.
This commit is contained in:
parent
ee9c0f5f9c
commit
56cedfc4d2
@ -27,7 +27,7 @@ int main( void )
|
|||||||
std::cin>>input;
|
std::cin>>input;
|
||||||
|
|
||||||
// We use the alpha provided by the user if it is between 0 and 1
|
// 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; }
|
{ alpha = input; }
|
||||||
|
|
||||||
//![load]
|
//![load]
|
||||||
|
Loading…
Reference in New Issue
Block a user