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

Divide by zero #11

Open
Fogrunner opened this issue Sep 27, 2022 · 2 comments
Open

Divide by zero #11

Fogrunner opened this issue Sep 27, 2022 · 2 comments

Comments

@Fogrunner
Copy link

Fogrunner commented Sep 27, 2022

Hello.

First for all, thanks for sharing great code.

I have found some memory crashing case.

When i put the same zero control point , some code makes crashing.

// 2 zero points
qsrc.push_back(cv::Point_<int>(0, 0));
qsrc.push_back(cv::Point_<int>(0, 0));

// 2 zero points
qdst.push_back(cv::Point_<int>(0, 0));
qdst.push_back(cv::Point_<int>(0, 0));

In imgwarp_mls_rigid.cpp

tmpP *= w[k] / miu_r;

Above code makes dividing by zero without handling.

@Fogrunner
Copy link
Author

Fogrunner commented Sep 27, 2022

It seems to happen when i put control points which have the same values.

@cxcxcxcx
Copy link
Owner

cxcxcxcx commented Oct 9, 2022 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