提交 93b6e80c 编写于 作者: A Alexander Alekhin

Merge pull request #21063 from vrabaud:3.4_h_clamping

......@@ -955,12 +955,11 @@ struct HLS2RGB_f
float p1 = 2*l - p2;
h *= hscale;
if( h < 0 )
do h += 6; while( h < 0 );
else if( h >= 6 )
do h -= 6; while( h >= 6 );
// We need both loops to clamp (e.g. for h == -1e-40).
while( h < 0 ) h += 6;
while( h >= 6 ) h -= 6;
assert( 0 <= h && h < 6 );
CV_DbgAssert( 0 <= h && h < 6 );
sector = cvFloor(h);
h -= sector;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册