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

ValueError: Sample larger than population or is negative #1

Closed
YYsmith opened this issue Oct 25, 2021 · 1 comment
Closed

ValueError: Sample larger than population or is negative #1

YYsmith opened this issue Oct 25, 2021 · 1 comment

Comments

@YYsmith
Copy link

YYsmith commented Oct 25, 2021

Thanks for your work! when I run the code in some samples, it will get the error: 'ValueError: Sample larger than population or is negative'. The last code executed is ‘final_src, final_dst = ransac.thread(src_match, dst_match, self.opt.ransac_max)’. Could you please give me a solution? Thanks you very much.

@EadCat
Copy link
Owner

EadCat commented Oct 25, 2021

I guess it is because the number of matching points from the SIFT is less than the default random sampling value=6.

random sample

A small number of matching points may be extracted in the following situations (Challenging situations):

  1. If there's little overlapping region between source & destination.
  2. If repetitive patterns (such as bricks) appear in the image.
  3. If input images are not good quality (exposure change, low-resolution, severe distortions).
  4. User parameter setting failure (such as resize: size is too small)

Finally, If my answer is wrong, please write an additional issue!

good luck.

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