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

[bug] 识别时,库内部的图片被轻微拉伸了。导致 box 数值不准 #24

Open
fanybook opened this issue Dec 17, 2024 · 0 comments

Comments

@fanybook
Copy link

fanybook commented Dec 17, 2024

我做了个小功能,鼠标右键点击图片中的文字,然后识别出文字

但是发现一个长图,上边功能好使,到接近底部时,功能就不好使了

于是我打开 debug,输出框图,我发现 debug 输出的图片相较于我的原始图片,被拉伸了

720 × 4200像素的图片,被轻微拉伸到了 736 × 4224像素,导致长图,在底部时,鼠标获取到的和 x 和 y,与 box 里的对应不上

期待的改进:

  1. 尽量在 ocr 过程中,不 resize 图片
  2. 如果上边做不到,那么在返回的 result 结果里,返回 resize 后的宽高(这样至少可以自己做转化)
const result = {
    "width": 736,
    "height": 4224,
    "ocr": [
        ...
    ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant