public class PPOCRMobileV2Model extends Object implements OcrDirectionModel
| 构造器和说明 |
|---|
PPOCRMobileV2Model() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
List<OcrItem> |
detect(BufferedImage image)
文本方向检测
|
List<OcrItem> |
detect(byte[] imageData)
文本方向检测
|
List<OcrItem> |
detect(ai.djl.modality.cv.Image image)
文本方向检测
|
List<OcrItem> |
detect(List<OcrBox> boxList,
org.opencv.core.Mat srcMat,
ai.djl.ndarray.NDManager manager)
文本方向检测(基于检测结果)
|
List<OcrItem> |
detect(String imagePath)
文本方向检测
|
BufferedImage |
detectAndDraw(BufferedImage sourceImage)
检测并绘制结果
|
void |
detectAndDraw(String imagePath,
String outputPath)
检测并绘制结果
|
void |
loadModel(DirectionModelConfig config)
加载模型
|
public void loadModel(DirectionModelConfig config)
OcrDirectionModelloadModel 在接口中 OcrDirectionModelpublic List<OcrItem> detect(String imagePath)
OcrDirectionModeldetect 在接口中 OcrDirectionModelimagePath - 图片路径public List<OcrItem> detect(ai.djl.modality.cv.Image image)
OcrDirectionModeldetect 在接口中 OcrDirectionModelpublic List<OcrItem> detect(List<OcrBox> boxList, org.opencv.core.Mat srcMat, ai.djl.ndarray.NDManager manager)
OcrDirectionModeldetect 在接口中 OcrDirectionModelpublic void detectAndDraw(String imagePath, String outputPath)
OcrDirectionModeldetectAndDraw 在接口中 OcrDirectionModelimagePath - 图片输入路径(包含文件名称)outputPath - 图片输出路径(包含文件名称)public List<OcrItem> detect(BufferedImage image)
OcrDirectionModeldetect 在接口中 OcrDirectionModelimage - BufferedImagepublic List<OcrItem> detect(byte[] imageData)
OcrDirectionModeldetect 在接口中 OcrDirectionModelimageData - 图片字节数组public BufferedImage detectAndDraw(BufferedImage sourceImage)
OcrDirectionModeldetectAndDraw 在接口中 OcrDirectionModelpublic void close()
throws Exception
close 在接口中 AutoCloseableExceptionCopyright © 2025. All rights reserved.