mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
fixed colorizing disparity
This commit is contained in:
parent
9c05a74fee
commit
faee18961d
@ -35,6 +35,10 @@ void colorizeDisparity( const Mat& gray, Mat& rgb, double maxDisp=-1.f, float S=
|
||||
}
|
||||
|
||||
rgb.create( gray.size(), CV_8UC3 );
|
||||
rgb = Scalar::all(0);
|
||||
if( maxDisp < 1 )
|
||||
return;
|
||||
|
||||
for( int y = 0; y < gray.rows; y++ )
|
||||
{
|
||||
for( int x = 0; x < gray.cols; x++ )
|
||||
|
Loading…
Reference in New Issue
Block a user