|
|
|
@ -295,6 +295,7 @@ bool ImageCompareModel::save2file(string filePath)
|
|
|
|
|
|
|
|
|
|
|
|
bool ImageCompareModel::readFromFile(string filePath)
|
|
|
|
bool ImageCompareModel::readFromFile(string filePath)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
try {
|
|
|
|
FileStorage fs(filePath, FileStorage::READ);
|
|
|
|
FileStorage fs(filePath, FileStorage::READ);
|
|
|
|
if (!fs.isOpened())
|
|
|
|
if (!fs.isOpened())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -391,6 +392,10 @@ bool ImageCompareModel::readFromFile(string filePath)
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (std::exception &e) {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ImageCompareModel::preProcessImage(Mat& img, Mat &insideImg) const
|
|
|
|
void ImageCompareModel::preProcessImage(Mat& img, Mat &insideImg) const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|