Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

what is the maximum size of indexed array that can be created during execution of while loop?

Hello,

I am using a ring acquisition to take in images. If i write them as files in the loop, it slows down the acquisition unacceptably. Therefore i am converting image to array and storing the array until the acquisition is complete and then reading the array and converting back to image to save. The program sometimes runs out of memory (after a couple of minutes). Can anyone think of a way where i can store the array/images within the execution (without losing image information), without slowing it down and to avoid this memory problem?

I have included the VI.

Thanks in advance for any help or advice.

kindest regards,

FraserD
0 Kudos
Message 1 of 3
(3,119 Views)
Fraser,

I would change the maximum number of images to a very large number in MAX. This will allow you to allocate as many images as will fit in the memory of your computer. There is no need to convert them to an array, which just adds overhead to the program.

If you need to store more images than you have memory for, you will need to look at streaming them directly to disk. There are a few methods for doing this out there. I haven't researched which one is best.

Of course, another option is to buy more memory for your computer, which is usually the cheapest option available.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 3
(3,119 Views)
Bruce,

I had already set the max buffer to a very high value (32767 was the highest that it would go).

The reason i was converting the images to array was that if i place the images on the while loop as images, the program was not working properly in that the stored images were repeated every buffer size.

I'm not sure why this happens, do you know?
0 Kudos
Message 3 of 3
(3,119 Views)