mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
Merge pull request #25075 from mshabunin:cleanup-imgproc-1
C-API cleanup: apps, imgproc_c and some constants #25075 Merge with https://github.com/opencv/opencv_contrib/pull/3642 * Removed obsolete apps - traincascade and createsamples (please use older OpenCV versions if you need them). These apps relied heavily on C-API * removed all mentions of imgproc C-API headers (imgproc_c.h, types_c.h) - they were empty, included core C-API headers * replaced usage of several C constants with C++ ones (error codes, norm modes, RNG modes, PCA modes, ...) - most part of this PR (split into two parts - all modules and calib+3d - for easier backporting) * removed imgproc C-API headers (as separate commit, so that other changes could be backported to 4.x) Most of these changes can be backported to 4.x.
This commit is contained in:
@@ -209,7 +209,7 @@ static void binary_op( InputArray _src1, InputArray _src2, OutputArray _dst,
|
||||
swap(sz1, sz2);
|
||||
}
|
||||
else if( !checkScalar(*psrc2, type1, kind2, kind1) )
|
||||
CV_Error( CV_StsUnmatchedSizes,
|
||||
CV_Error( cv::Error::StsUnmatchedSizes,
|
||||
"The operation is neither 'array op array' (where arrays have the same size and type), "
|
||||
"nor 'array op scalar', nor 'scalar op array'" );
|
||||
haveScalar = true;
|
||||
@@ -673,7 +673,7 @@ static void arithm_op(InputArray _src1, InputArray _src2, OutputArray _dst,
|
||||
oclop = OCL_OP_RDIV_SCALE;
|
||||
}
|
||||
else if( !checkScalar(*psrc2, type1, kind2, kind1) )
|
||||
CV_Error( CV_StsUnmatchedSizes,
|
||||
CV_Error( cv::Error::StsUnmatchedSizes,
|
||||
"The operation is neither 'array op array' "
|
||||
"(where arrays have the same size and the same number of channels), "
|
||||
"nor 'array op scalar', nor 'scalar op array'" );
|
||||
@@ -698,7 +698,7 @@ static void arithm_op(InputArray _src1, InputArray _src2, OutputArray _dst,
|
||||
else
|
||||
{
|
||||
if( !haveScalar && type1 != type2 )
|
||||
CV_Error(CV_StsBadArg,
|
||||
CV_Error(cv::Error::StsBadArg,
|
||||
"When the input arrays in add/subtract/multiply/divide functions have different types, "
|
||||
"the output array type must be explicitly specified");
|
||||
dtype = type1;
|
||||
@@ -1289,7 +1289,7 @@ void cv::compare(InputArray _src1, InputArray _src2, OutputArray _dst, int op)
|
||||
return;
|
||||
}
|
||||
else if(is_src1_scalar == is_src2_scalar)
|
||||
CV_Error( CV_StsUnmatchedSizes,
|
||||
CV_Error( cv::Error::StsUnmatchedSizes,
|
||||
"The operation is neither 'array op array' (where arrays have the same size and the same type), "
|
||||
"nor 'array op scalar', nor 'scalar op array'" );
|
||||
haveScalar = true;
|
||||
@@ -1791,7 +1791,7 @@ static bool ocl_inRange( InputArray _src, InputArray _lowerb,
|
||||
ssize != lsize || stype != ltype )
|
||||
{
|
||||
if( !checkScalar(_lowerb, stype, lkind, skind) )
|
||||
CV_Error( CV_StsUnmatchedSizes,
|
||||
CV_Error( cv::Error::StsUnmatchedSizes,
|
||||
"The lower boundary is neither an array of the same size and same type as src, nor a scalar");
|
||||
lbScalar = true;
|
||||
}
|
||||
@@ -1800,7 +1800,7 @@ static bool ocl_inRange( InputArray _src, InputArray _lowerb,
|
||||
ssize != usize || stype != utype )
|
||||
{
|
||||
if( !checkScalar(_upperb, stype, ukind, skind) )
|
||||
CV_Error( CV_StsUnmatchedSizes,
|
||||
CV_Error( cv::Error::StsUnmatchedSizes,
|
||||
"The upper boundary is neither an array of the same size and same type as src, nor a scalar");
|
||||
ubScalar = true;
|
||||
}
|
||||
@@ -1914,7 +1914,7 @@ void cv::inRange(InputArray _src, InputArray _lowerb,
|
||||
src.size != lb.size || src.type() != lb.type() )
|
||||
{
|
||||
if( !checkScalar(lb, src.type(), lkind, skind) )
|
||||
CV_Error( CV_StsUnmatchedSizes,
|
||||
CV_Error( cv::Error::StsUnmatchedSizes,
|
||||
"The lower boundary is neither an array of the same size and same type as src, nor a scalar");
|
||||
lbScalar = true;
|
||||
}
|
||||
@@ -1923,7 +1923,7 @@ void cv::inRange(InputArray _src, InputArray _lowerb,
|
||||
src.size != ub.size || src.type() != ub.type() )
|
||||
{
|
||||
if( !checkScalar(ub, src.type(), ukind, skind) )
|
||||
CV_Error( CV_StsUnmatchedSizes,
|
||||
CV_Error( cv::Error::StsUnmatchedSizes,
|
||||
"The upper boundary is neither an array of the same size and same type as src, nor a scalar");
|
||||
ubScalar = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user