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

This captcha solver returns error in Windows #11

Open
dragon0041 opened this issue May 19, 2023 · 3 comments
Open

This captcha solver returns error in Windows #11

dragon0041 opened this issue May 19, 2023 · 3 comments

Comments

@dragon0041
Copy link

File "D:\1_Projects\Air-Cargo\slice-solver\solver.py", line 17, in get_position
res = cv2.matchTemplate(background, template, cv2.TM_CCOEFF_NORMED)
cv2.error: OpenCV(3.4.2) C:\projects\opencv-python\opencv\modules\imgproc\src\templmatch.cpp:589: error: (-215:Assertion failed) corrsize.height <= img.rows + templ.rows - 1 && corrsize.width <= img.cols + templ.cols - 1 in function 'cv::crossCorr'

@eishirudo
Copy link

Yes how to solve this

@datrandom
Copy link

yeah, same

@Karolbrauza
Copy link

I have the same issue and in my case this was issue with __img_to_grayscale function because it not create tmp folder with sobel.png, after editing tmp_path to save sobel.png in current folder, everything works well. Try to edit __img_to_grayscale like this:
def __img_to_grayscale(self, img):
tmp_path = "./sobel.png"
cv2.imwrite(tmp_path, img)
return cv2.imread(tmp_path, 0)

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

5 participants
@eishirudo @Karolbrauza @datrandom @dragon0041 and others