Open YangLwBUAA opened 2 years ago
I may make a false conclusion. The size of two Images isn't the cause of this error. Here are my two test Images, and the error is:
Traceback (most recent call last):
File "D:/Download/PythonSIFT-master/template_matching_demo.py", line 55, in <module>
newimg[hdif:hdif + h1, :w1, i] = img1
ValueError: could not broadcast input array from shape (1706,1117) into shape (0,1117)
These two Images were taken separately by iphone. I will follow ur tutorial to learn more about SIFT and the code. Try to see if I can find the reason. I would be very grateful if you can provide help at your convenience.
Hi @YangLwBUAA, thanks for your interest in this repo! Thanks for posting the images you used. I will look into this and try to get back to you within a few days.
I met the same kind of error when the queryImage(212x142) is larger than trainImag(215x133).
And I exchange the two Image, then it works smoothly. So it seems to be trainImage's size cannot be smaller than queryImage's(Logically, it really should be like this)
Thx for ur share, it helps me a lot!