master
周文涛 2 years ago
parent 46e22c6ab5
commit f62c0d1bf3

@ -694,9 +694,17 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
String outputImagePath = fileUrl + imgPath.substring(i + 1, imgPath.length());
if (semanticResult2!=null) {
List<List<Point>> resultToPoints = ImageUtils.semanticResultToPoints(semanticResult2);
boolean hasPoints=true;
if (CollectionUtils.isNotEmpty(resultToPoints)) {
ImageUtils.drawDashedRectangleOnImages(file.getAbsolutePath(), resultToPoints, outputImagePath);
imgPath = outputImagePath;
for (List<Point> resultToPoint : resultToPoints) {
if (CollectionUtils.isEmpty(resultToPoint)) {
hasPoints=false;
}
}
if (hasPoints){
ImageUtils.drawDashedRectangleOnImages(file.getAbsolutePath(), resultToPoints, outputImagePath);
imgPath = outputImagePath;
}
}
}
//============================

@ -62,6 +62,9 @@ public class CallBackWlyUtils {
result.setImageTagRetrievePercentage(imageTagRetrievePercentage + "");
result.setRetrieveReviewCompliance(imageTagRetrievePercentage+"");
result.setFailureReason(ocrIdentify.getErrorMsg());
if (CollectionUtils.isEmpty(jsonObjects)) {
return false;
}
result.setOcrResult(jsonObjects);
log.info("请求无量云回调接口");

Loading…
Cancel
Save