|
|
|
@ -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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//============================
|
|
|
|
|