public class OcrCommonRecModelImpl extends Object implements OcrCommonRecModel
| 构造器和说明 |
|---|
OcrCommonRecModelImpl() |
| 限定符和类型 | 方法和说明 |
|---|---|
List<OcrInfo> |
batchRecognize(List<BufferedImage> imageList,
OcrRecOptions options) |
List<OcrInfo> |
batchRecognizeDJLImage(List<ai.djl.modality.cv.Image> imageList,
OcrRecOptions options) |
void |
close() |
OcrDirectionModel |
getDirectionModel() |
OcrCommonDetModel |
getTextDetModel() |
void |
loadModel(OcrRecModelConfig config)
加载模型
|
OcrInfo |
recognize(BufferedImage image,
OcrRecOptions options)
文本检测
|
OcrInfo |
recognize(byte[] imageData,
OcrRecOptions options)
文本检测
|
OcrInfo |
recognize(ai.djl.modality.cv.Image image,
OcrRecOptions options)
文本识别
|
OcrInfo |
recognize(String imagePath,
OcrRecOptions options)
文本识别
|
BufferedImage |
recognizeAndDraw(BufferedImage sourceImage,
int fontSize,
OcrRecOptions options)
识别并绘制结果
|
void |
recognizeAndDraw(String imagePath,
String outputPath,
int fontSize,
OcrRecOptions options)
识别并绘制结果
|
void |
setDirectionModel(OcrDirectionModel directionModel) |
void |
setTextDetModel(OcrCommonDetModel detModel) |
public void loadModel(OcrRecModelConfig config)
OcrCommonRecModelloadModel 在接口中 OcrCommonRecModelpublic OcrInfo recognize(String imagePath, OcrRecOptions options)
OcrCommonRecModelrecognize 在接口中 OcrCommonRecModelimagePath - 图片路径public OcrInfo recognize(ai.djl.modality.cv.Image image, OcrRecOptions options)
OcrCommonRecModelrecognize 在接口中 OcrCommonRecModelimage - options - public void recognizeAndDraw(String imagePath, String outputPath, int fontSize, OcrRecOptions options)
OcrCommonRecModelrecognizeAndDraw 在接口中 OcrCommonRecModelpublic OcrInfo recognize(BufferedImage image, OcrRecOptions options)
OcrCommonRecModelrecognize 在接口中 OcrCommonRecModelimage - BufferedImagepublic OcrInfo recognize(byte[] imageData, OcrRecOptions options)
OcrCommonRecModelrecognize 在接口中 OcrCommonRecModelimageData - 图片字节数组public BufferedImage recognizeAndDraw(BufferedImage sourceImage, int fontSize, OcrRecOptions options)
OcrCommonRecModelrecognizeAndDraw 在接口中 OcrCommonRecModelpublic List<OcrInfo> batchRecognize(List<BufferedImage> imageList, OcrRecOptions options)
batchRecognize 在接口中 OcrCommonRecModelpublic List<OcrInfo> batchRecognizeDJLImage(List<ai.djl.modality.cv.Image> imageList, OcrRecOptions options)
batchRecognizeDJLImage 在接口中 OcrCommonRecModelpublic void setTextDetModel(OcrCommonDetModel detModel)
setTextDetModel 在接口中 OcrCommonRecModelpublic OcrCommonDetModel getTextDetModel()
getTextDetModel 在接口中 OcrCommonRecModelpublic void setDirectionModel(OcrDirectionModel directionModel)
setDirectionModel 在接口中 OcrCommonRecModelpublic OcrDirectionModel getDirectionModel()
getDirectionModel 在接口中 OcrCommonRecModelpublic void close()
throws Exception
close 在接口中 AutoCloseableExceptionCopyright © 2025. All rights reserved.