public class OcrCommonDetModelImpl extends Object implements OcrCommonDetModel
| 构造器和说明 |
|---|
OcrCommonDetModelImpl() |
| 限定符和类型 | 方法和说明 |
|---|---|
List<List<OcrBox>> |
batchDetect(List<BufferedImage> imageList)
文本检测(批量)
|
List<List<OcrBox>> |
batchDetectDJLImage(List<ai.djl.modality.cv.Image> imageList)
文本检测(批量)
|
void |
close() |
List<OcrBox> |
detect(BufferedImage image)
文本检测
|
List<OcrBox> |
detect(byte[] imageData)
文本检测
|
List<OcrBox> |
detect(ai.djl.modality.cv.Image image)
文本检测
|
List<OcrBox> |
detect(String imagePath)
文本检测
|
BufferedImage |
detectAndDraw(BufferedImage sourceImage)
检测并绘制结果
|
void |
detectAndDraw(String imagePath,
String outputPath)
检测并绘制结果
|
void |
loadModel(OcrDetModelConfig config)
加载模型
|
public void loadModel(OcrDetModelConfig config)
OcrCommonDetModelloadModel 在接口中 OcrCommonDetModelpublic List<OcrBox> detect(String imagePath)
OcrCommonDetModeldetect 在接口中 OcrCommonDetModelimagePath - 图片路径public List<OcrBox> detect(ai.djl.modality.cv.Image image)
OcrCommonDetModeldetect 在接口中 OcrCommonDetModelimage - DJL Imagepublic void detectAndDraw(String imagePath, String outputPath)
OcrCommonDetModeldetectAndDraw 在接口中 OcrCommonDetModelimagePath - 图片输入路径(包含文件名称)outputPath - 图片输出路径(包含文件名称)public List<OcrBox> detect(BufferedImage image)
OcrCommonDetModeldetect 在接口中 OcrCommonDetModelimage - BufferedImagepublic List<OcrBox> detect(byte[] imageData)
OcrCommonDetModeldetect 在接口中 OcrCommonDetModelimageData - 图片字节数组public BufferedImage detectAndDraw(BufferedImage sourceImage)
OcrCommonDetModeldetectAndDraw 在接口中 OcrCommonDetModelpublic List<List<OcrBox>> batchDetect(List<BufferedImage> imageList)
OcrCommonDetModelbatchDetect 在接口中 OcrCommonDetModelimageList - BufferedImagepublic List<List<OcrBox>> batchDetectDJLImage(List<ai.djl.modality.cv.Image> imageList)
OcrCommonDetModelbatchDetectDJLImage 在接口中 OcrCommonDetModelimageList - DJL Imagepublic void close()
throws Exception
close 在接口中 AutoCloseableExceptionCopyright © 2025. All rights reserved.