Christos,
Generally with a software timed loop, such as the one you are using in the example code you sent, you are limited by the amount of time it takes to process the loop. For acquisitions above 15 fps, we recommend using a grab acquisition, which sets up a buffer for the camera to write to in a hardware timed loop. As frames are written to the buffer, the software requests frames as quickly as possible. While the hardware can supply frames at speeds of 30 frames per second and beyond, it may not be possible for your software to acquire at that rate and some frames will be lost. Therefore, grabs are useful for high speed acquisitions where processing on each image is not necessary. In the case when processing is necessary on every image, we recommend using a ring acquisition which sets up multiple buffers for the hardware to write to and read from. Rings can be configured so continuous acquisition and processing of every image is possible.
There are shipping examples for both of these types of acquisition that come with the NI-IMAQ driver. I would assume that Bitflow would provide similar examples of how to use their driver, but if not, it will be necessary to contact them for help with creating these types of acquisitions.
As for your code, I can see a few ways to improve performance.
1. Creating images can be time intensive and may not be necessary in your case. If it is, I would recommend creating them outside of the loop
2. Same thing for copying them.
3. A timed loop is not necessary because you are trying to go as quickly as possible. I would recommend using a standard while loop. While loops will run as quickly as possible while still performing every function within the loop.
5. In general it is best to perform all processor intensive operations outside of a time critical loop.
S. Arves S.
National Instruments
Applications Engineer