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());
Stringerror_message=format("In the Eigenfaces method all input samples (training images) must be of equal size! Expected %zu pixels, but was %zu 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("Wrong input image size. Reason: Training and Test images must be of equal size! Expected an image with %d elements, but got %zu.",_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=format("In the Fisherfaces method all input samples (training images) must be of equal size! Expected %zu pixels, but was %zu 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(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_message=format("Wrong input image size. Reason: Training and Test images must be of equal size! Expected an image with %d elements, but got %zu.",_eigenvectors.rows,src.total());
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());
Stringerror_message=format("The number of samples (src) must equal the number of labels (labels). Was len(samples)=%zu, len(labels)=%zu.",src.size(),_labels.total());
CV_Error(Error::StsBadArg,error_message);
}
// if this model should be trained without preserving old data, delete old model data