public class PpOCRV5RecModel extends Object implements OcrCommonRecModel
| 构造器和说明 |
|---|
PpOCRV5RecModel() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
void |
loadModel(OcrRecModelConfig config)
加载模型
|
OcrInfo |
recognize(BufferedImage image)
文本检测
|
OcrInfo |
recognize(byte[] imageData)
文本检测
|
OcrInfo |
recognize(String imagePath)
文本识别
|
BufferedImage |
recognizeAndDraw(BufferedImage sourceImage,
int fontSize)
识别并绘制结果
|
void |
recognizeAndDraw(String imagePath,
String outputPath,
int fontSize)
识别并绘制结果
|
public void loadModel(OcrRecModelConfig config)
OcrCommonRecModelloadModel 在接口中 OcrCommonRecModelpublic OcrInfo recognize(String imagePath)
OcrCommonRecModelrecognize 在接口中 OcrCommonRecModelimagePath - 图片路径public void recognizeAndDraw(String imagePath, String outputPath, int fontSize)
OcrCommonRecModelrecognizeAndDraw 在接口中 OcrCommonRecModelpublic OcrInfo recognize(BufferedImage image)
OcrCommonRecModelrecognize 在接口中 OcrCommonRecModelimage - BufferedImagepublic OcrInfo recognize(byte[] imageData)
OcrCommonRecModelrecognize 在接口中 OcrCommonRecModelimageData - 图片字节数组public BufferedImage recognizeAndDraw(BufferedImage sourceImage, int fontSize)
OcrCommonRecModelrecognizeAndDraw 在接口中 OcrCommonRecModelpublic void close()
throws Exception
close 在接口中 AutoCloseableExceptionCopyright © 2025. All rights reserved.