Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jvm 未退出场景连续调用识别结果集乱码 #1

Closed
chuchumaolu555 opened this issue Oct 9, 2023 · 3 comments
Closed

jvm 未退出场景连续调用识别结果集乱码 #1

chuchumaolu555 opened this issue Oct 9, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@chuchumaolu555
Copy link

楼主您好,最近在学习OCR,看到你java版开源项目,自己测试发现如下问题: 单独在mian方法执行或者junit测试下没有问题,如果是集成到springboot项目中,jvm没有退出,第一次调用识别结果正确,再次调用识别结果为乱码,这种情况应该怎样解决?

@MyMonsterCat
Copy link
Owner

感谢反馈和使用,这是由于每次都new了一个OcrEngine导致,已修复该问题,请拉取最新代码尝试。

@MyMonsterCat MyMonsterCat added the bug Something isn't working label Oct 9, 2023
@MyMonsterCat MyMonsterCat self-assigned this Oct 9, 2023
@chuchumaolu555
Copy link
Author

感谢up主;我认真分析了一下,如您所说是OcrEngine每次实例化造成的,我的解决方法是OcrEngine实例化和ocr方法detect的调用分开。

@MyMonsterCat
Copy link
Owner

是的,修复该问题时我也是这么处理的。个人水平有限,有更简便的处理逻辑的话欢迎您提交PR学习一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants