07-02-2010 02:12 PM
Hi,
I'm trying to connect a subvi to my main IMAQdx loop (where all of the calculations take place). While I successfully connect it, I'm having a hard time to maintain the image size in the loop because the loop initializes every time (as expected from a loop). How can I transfer the ROI through the iterations (and keeping it in the loop at the same time)?
07-05-2010 01:22 AM
Can you explain a bit more on what exactly you mean by image size here. A screen shot will definetly help
07-05-2010 04:15 AM - edited 07-05-2010 04:16 AM
my vi initializes the IMAQdx, goes in a while loop. In the while loop, I can control some camera attributes (exposure, gain and bandwidth), and there is an algorithm that calculates the area a centroid (and other data). Now, in order to make the program run faster or be able to zoom in on an ROI and then do the calculations WHILE the vi in running in the loop, I want to be able to define an ROI (which is possible to change in real running time). Imagine you have a dot with a black background (see attached file), so in order to make the algorithm/software faster we can take away most of the surrounding black background (let's define a rectangle with minimal area around the dot), and call the leftover our ROI. Does this help? I'm not sure it answers your question...
07-07-2010 01:47 AM
To make the algorithm run faster try eliminating complex functions. Apply a threshold. It should work considering the background is black and the dot is white. Then apply particle analysis.
07-07-2010 02:01 AM
Fair enough, I'll explore that option. I'm trying to analyze a laser beam, and sometimes one want to focus only on a certain aspect of it (may it be uniformity, power and etc...) that's why real time ROI is important for the vi. I'll look into particle analysis too. I've tried modifying labview example--grab & set camera attributes to control the width (for example, but it can be height or offset), but when it doesn't let me to change the value like I do with exposure and gain. I feel like the example is one of the right ways to go about it, I just haven't figured it out....