Skip to content

Jupyther Notebook Tutorial2-Template_Augmentation.ipynb throws error IndexError: invalid index to scalar variable. #14

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

Closed
christian-becker-ta opened this issue Nov 24, 2021 · 1 comment

Comments

@christian-becker-ta
Copy link

If I want to run the jupyther notebook in Google Colab I get an error when running the line
"# Then call the function matchTemplates (here a single template)
Hits = matchTemplates(listTemplate, image, N_object=4,score_threshold=0.4, method=cv2.TM_CCOEFF_NORMED, maxOverlap=0.3)"

There is probably a index error.
IndexError: invalid index to scalar variable.

@LauLauThom
Copy link
Collaborator

Thanks for spotting and reporting the issue.
It was due to a breaking change with the latest opencv version.
I published 2 new releases of MTM. 1.6.2.post1 will work with Opencv version until 4.3.0, while MTM 1.6.3 works with opencv version from 4.5.4. In between I dont know, I havent taken the time to find out when exactly the breaking change occured.
But that should do ;)

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