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

我在使用滑块识别的功能的时候报错 #1

Open
1756816846 opened this issue Aug 11, 2023 · 13 comments
Open

我在使用滑块识别的功能的时候报错 #1

1756816846 opened this issue Aug 11, 2023 · 13 comments

Comments

@1756816846
Copy link

thread 'actix-rt|system:0|arbiter:0' panicked at 'image width must be greater than or equal to template width', C:\Users\XChuang233.cargo\registry\src\index.crates.io-6f17d22bba15001f\imageproc-0.23.0\src\template_matching.rs:46:5
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
我在python版本运行就可以,如果把两个图片的参数换一下,能运行,但是结果不对
image
image

@86maid
Copy link
Owner

86maid commented Aug 11, 2023 via email

@1756816846
Copy link
Author

img_quekou_ok
img_back
给你图片,你测试一下,我在python版本也是用这俩测试的

@86maid
Copy link
Owner

86maid commented Aug 11, 2023 via email

@1756816846
Copy link
Author

1756816846 commented Aug 11, 2023

我在python版本使用的代码是

def get_gap(target_img:bytes, background_img:bytes):
    det = ddddocr.DdddOcr(det=False, ocr=False, show_ad=False)
    res = det.slide_match(target_img, background_img,simple_target=True)
    return res["target"]

@1756816846
Copy link
Author

simple_target选项不为True的时候就会报错,要是能加这个选项就好了

@86maid
Copy link
Owner

86maid commented Aug 11, 2023 via email

@86maid
Copy link
Owner

86maid commented Aug 11, 2023 via email

@1756816846
Copy link
Author

你是说,Python版本也报错对么? xchuang233 @.***

---原始邮件--- 发件人: @.> 发送时间: 2023年8月11日(周五) 下午2:49 收件人: @.>; 抄送: @.@.>; 主题: Re: [86maid/ddddocr] 我在使用滑块识别的功能的时候报错 (Issue #1) simple_target选项不为True的时候就会报错,要是能加这个选项就好了 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

是的,不是因为你的代码问题,是没开那个选项

@86maid
Copy link
Owner

86maid commented Aug 11, 2023 via email

@1756816846
Copy link
Author

1756816846 commented Aug 11, 2023 via email

@86maid
Copy link
Owner

86maid commented Aug 11, 2023 via email

@86maid
Copy link
Owner

86maid commented Aug 11, 2023 via email

@86maid
Copy link
Owner

86maid commented Aug 11, 2023 via email

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

2 participants