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

OpenCV Exception #54

Open
COLINDBB opened this issue Jan 23, 2024 · 5 comments
Open

OpenCV Exception #54

COLINDBB opened this issue Jan 23, 2024 · 5 comments

Comments

@COLINDBB
Copy link

Hello!

I'm seeing an exception thrown in matchTemplate
what(): OpenCV(4.1.1-dev) /opencv/modules/imgproc/src/templmatch.cpp:1109: error: (-215:Assertion failed) _img.size().height <= _templ.size().height && _img.size().width <= _templ.size().width in function 'matchTemplate'

Do you know what the issue may be here?
These are my input images.

dst
src

@DennisLiu1993
Copy link
Owner

template image should be smaller than source no matter in width or height

@Duy-Phuong-20
Copy link

@DennisLiu1993: can you tell me how can I run this project in python code as your demo because I am not familiar with C++??

@DennisLiu1993
Copy link
Owner

@DennisLiu1993: can you tell me how can I run this project in python code as your demo because I am not familiar with C++??

extract pure c++ part to a class, and built it with an interface then it can be imported by python using ctype or pybind11

@Duy-Phuong-20
Copy link

@DennisLiu1993: can you tell me how can I run this project in python code as your demo because I am not familiar with C++??

extract pure c++ part to a class, and built it with an interface then it can be imported by python using ctype or pybind11

Yeah, thanks so much for your reply. I spent hours to read file .cpp and .h in matchtool folder. Can you show me which library .cpp and .h is necessary? Basically, I just need the code that I input an image and take the result. So I tried to find the relationship between your libraries, but it is really difficult since there are so much code !!

@DennisLiu1993
Copy link
Owner

just focus on matchToolDlg.cpp/.h

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

3 participants