Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Why it fails at second picture?

Solved!
Go to solution

I want make an image panorama by using pattern matching. First I open the 1.jpg then 2.jpg. It is working. But at 3.jpg there is an error: The image is not large enough for the operation. I think there is something storage problem (it is trying to read an empty image). How can I solve it?

0 Kudos
Message 1 of 3
(4,362 Views)
Solution
Accepted by topic author holex

@holex wrote:

I want make an image panorama by using pattern matching. First I open the 1.jpg then 2.jpg. It is working. But at 3.jpg there is an error: The image is not large enough for the operation. I think there is something storage problem (it is trying to read an empty image). How can I solve it?


You have a race condition in your code:  The first iteration of the while loop has the image "1" in the shift register.  At the end of the iteration, you wire the image "resample" to the shift register which will from then on be used. 

Later on, "IMAQ Create" will produce an empty image "resample" in the loop.  The error is as expected.

Solution to your code:  Remove the shift register and always use the image "1".

0 Kudos
Message 2 of 3
(4,351 Views)

Thank you!

0 Kudos
Message 3 of 3
(4,347 Views)