diff --git a/modules/line_descriptor/src/draw.cpp b/modules/line_descriptor/src/draw.cpp index bfd1680a2..1319c4767 100644 --- a/modules/line_descriptor/src/draw.cpp +++ b/modules/line_descriptor/src/draw.cpp @@ -166,7 +166,7 @@ void drawKeylines( const Mat& image, const std::vector& keylines, Mat& { /* decide lines' color */ Scalar lineColor; - if( color != Scalar::all( -1 ) ) + if( color == Scalar::all( -1 ) ) { int R = ( rand() % (int) ( 255 + 1 ) ); int G = ( rand() % (int) ( 255 + 1 ) );