1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2021-12-18 13:53:46 +00:00
14 changed files with 1949 additions and 121 deletions
+6 -6
View File
@@ -2979,9 +2979,9 @@ struct RGB2Luvfloat
for( ; i < n; i++, src += scn, dst += 3 )
{
float R = src[0], G = src[1], B = src[2];
R = std::min(std::max(R, 0.f), 1.f);
G = std::min(std::max(G, 0.f), 1.f);
B = std::min(std::max(B, 0.f), 1.f);
R = clip(R);
G = clip(G);
B = clip(B);
if( gammaTab )
{
R = splineInterpolate(R*gscale, gammaTab, GAMMA_TAB_SIZE);
@@ -3205,9 +3205,9 @@ struct Luv2RGBfloat
float G = X*C3 + Y*C4 + Z*C5;
float B = X*C6 + Y*C7 + Z*C8;
R = std::min(std::max(R, 0.f), 1.f);
G = std::min(std::max(G, 0.f), 1.f);
B = std::min(std::max(B, 0.f), 1.f);
R = clip(R);
G = clip(G);
B = clip(B);
if( gammaTab )
{
File diff suppressed because it is too large Load Diff
+1 -3
View File
@@ -757,16 +757,14 @@ thresh_32f( const Mat& _src, Mat& _dst, float thresh, float maxval, int type )
}
setIppErrorStatus();
break;
#if 0 // details: https://github.com/opencv/opencv/pull/16085
case THRESH_TOZERO:
if (0 <= CV_INSTRUMENT_FUN_IPP(ippiThreshold_LTVal_32f_C1R, src, (int)src_step*sizeof(src[0]), dst, (int)dst_step*sizeof(dst[0]), sz, thresh + FLT_EPSILON, 0))
if (0 <= CV_INSTRUMENT_FUN_IPP(ippiThreshold_LTVal_32f_C1R, src, (int)src_step*sizeof(src[0]), dst, (int)dst_step*sizeof(dst[0]), sz, nextafterf(thresh, std::numeric_limits<float>::infinity()), 0))
{
CV_IMPL_ADD(CV_IMPL_IPP);
return;
}
setIppErrorStatus();
break;
#endif
case THRESH_TOZERO_INV:
if (0 <= CV_INSTRUMENT_FUN_IPP(ippiThreshold_GTVal_32f_C1R, src, (int)src_step*sizeof(src[0]), dst, (int)dst_step*sizeof(dst[0]), sz, thresh, 0))
{