test: 增加ocr接口的单元测试
Description: 增加ocr接口的单元测试 Log: no Change-Id: Ie78bb8f8d2def33ce441857daef52bdc4efa5650
This commit is contained in:
@ -125,7 +125,7 @@ RecognitionResult TessOcrUtils::getRecogitionResult(const QString &imagePath,con
|
||||
return t_result;
|
||||
}
|
||||
//获取识别结果
|
||||
return getRecogitionResult(p_image,resultType);
|
||||
return getRecognizeResult(p_image,resultType);
|
||||
}
|
||||
|
||||
//传入待识别图片的路径,获取纯字符串的识别结果
|
||||
@ -171,7 +171,7 @@ RecognitionResult TessOcrUtils::getRecogitionResult(QImage *image, const ResultT
|
||||
//p_image->colormap->n;
|
||||
p_image->data = reinterpret_cast<l_uint32*>(image->bits());
|
||||
//获取识别结果
|
||||
return getRecogitionResult(p_image,resultType);
|
||||
return getRecognizeResult(p_image,resultType);
|
||||
}
|
||||
|
||||
//传入待识别图片,获取纯字符串的识别结果
|
||||
@ -231,7 +231,7 @@ bool TessOcrUtils::setLanguagesPath(const QString langsPath)
|
||||
}
|
||||
|
||||
//获取识别结果
|
||||
RecognitionResult TessOcrUtils::getRecogitionResult(Pix * image,ResultType resultType)
|
||||
RecognitionResult TessOcrUtils::getRecognizeResult(Pix * image,ResultType resultType)
|
||||
{
|
||||
QString errorMessage = "";
|
||||
ErrorCode errorCode = ErrorCode::UNKNOWN;
|
||||
|
@ -228,7 +228,7 @@ private :
|
||||
* @param 返回的字符串结果类型
|
||||
* @return 返回识别结果
|
||||
*/
|
||||
RecognitionResult getRecogitionResult(Pix * image,ResultType resultType);
|
||||
RecognitionResult getRecognizeResult(Pix * image,ResultType resultType);
|
||||
|
||||
/**
|
||||
* @brief 设置返回结果,内部使用
|
||||
|
Reference in New Issue
Block a user