Stringerror_message="The data is expected as InputArray::STD_VECTOR_MAT (a std::vector<Mat>) or _InputArray::STD_VECTOR_VECTOR (a std::vector< std::vector<...> >).";
CV_Error(CV_StsBadArg,error_message);
CV_Error(Error::StsBadArg,error_message);
}
// number of samples
size_tn=src.total();
...
...
@@ -67,7 +67,7 @@ static Mat asRowMatrix(InputArrayOfArrays src, int rtype, double alpha=1, double
// make sure data can be reshaped, throw exception if not!
if(src.getMat(i).total()!=d){
Stringerror_message=format("Wrong number of elements in matrix #%d! Expected %d was %d.",i,d,src.getMat(i).total());
Stringerror_msg=format("This FaceRecognizer (%s) does not support updating, you have to use FaceRecognizer::train to update it.",this->name().c_str());
Stringerror_message=format("In the Eigenfaces method all input samples (training images) must be of equal size! Expected %d pixels, but was %d pixels.",_src.getMat(i-1).total(),_src.getMat(i).total());
// check data alignment just for clearer exception messages
Stringerror_message=format("Wrong input image size. Reason: Training and Test images must be of equal size! Expected an image with %d elements, but got %d.",_eigenvectors.rows,src.total());
Stringerror_message=format("In the Fisherfaces method all input samples (training images) must be of equal size! Expected %d pixels, but was %d pixels.",src.getMat(i-1).total(),src.getMat(i).total());
Stringerror_message="This Fisherfaces model is not computed yet. Did you call Fisherfaces::train?";
CV_Error(CV_StsBadArg,error_message);
CV_Error(Error::StsBadArg,error_message);
}elseif(src.total()!=(size_t)_eigenvectors.rows){
Stringerror_message=format("Wrong input image size. Reason: Training and Test images must be of equal size! Expected an image with %d elements, but got %d.",_eigenvectors.rows,src.total());
Stringerror_msg=format("Using Original Local Binary Patterns for feature extraction only works on single-channel images (given %d). Please pass the image data as a grayscale image!",type);
CV_Error(CV_StsNotImplemented,error_msg);
CV_Error(Error::StsNotImplemented,error_msg);
break;
}
}
...
...
@@ -687,7 +687,7 @@ static Mat histc(InputArray _src, int minVal, int maxVal, bool normed)
returnhistc_(src,minVal,maxVal,normed);
break;
default:
CV_Error(CV_StsUnmatchedFormats,"This type is not implemented yet.");break;
CV_Error(Error::StsUnmatchedFormats,"This type is not implemented yet.");break;
Stringerror_message="The images are expected as InputArray::STD_VECTOR_MAT (a std::vector<Mat>) or _InputArray::STD_VECTOR_VECTOR (a std::vector< std::vector<...> >).";
CV_Error(CV_StsBadArg,error_message);
CV_Error(Error::StsBadArg,error_message);
}
if(_in_src.total()==0){
Stringerror_message=format("Empty training data was given. You'll need more than one sample to learn a model.");
Stringerror_message=format("The number of samples (src) must equal the number of labels (labels). Was len(samples)=%d, len(labels)=%d.",src.size(),_labels.total());
CV_Error(CV_StsBadArg,error_message);
CV_Error(Error::StsBadArg,error_message);
}
// if this model should be trained without preserving old data, delete old model data
Stringerror_message="The data is expected as InputArray::STD_VECTOR_MAT (a std::vector<Mat>) or _InputArray::STD_VECTOR_VECTOR (a std::vector< std::vector<...> >).";
CV_Error(CV_StsBadArg,error_message);
CV_Error(Error::StsBadArg,error_message);
}
// number of samples
size_tn=src.total();
...
...
@@ -71,7 +71,7 @@ static Mat asRowMatrix(InputArrayOfArrays src, int rtype, double alpha=1, double
// make sure data can be reshaped, throw exception if not!
if(src.getMat(i).total()!=d){
Stringerror_message=format("Wrong number of elements in matrix #%d! Expected %d was %d.",i,(int)d,(int)src.getMat(i).total());
CV_Error(CV_StsBadArg,error_message);
CV_Error(Error::StsBadArg,error_message);
}
// get a hold of the current row
Matxi=data.row(i);
...
...
@@ -87,7 +87,7 @@ static Mat asRowMatrix(InputArrayOfArrays src, int rtype, double alpha=1, double
CV_Error(CV_StsUnsupportedFormat,"input image must be single channel (gray levels), bgr format (color) or bgra (color with transparency which won't be considered");
CV_Error(Error::StsUnsupportedFormat,"input image must be single channel (gray levels), bgr format (color) or bgra (color with transparency which won't be considered");
returnimageNumberOfChannels>1;// return bool : false for gray level image processing, true for color mode