From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-04-2011 10:02 AM
I'm using the NI Vision vi "IMAQ correct calibrated image" on quite a large image. This takes about 0,09 seconds to complete, and only uses 1 core of my computer. (25% cpu time) I always need to correct two images, so I made two parallel execution lines, expecting that I would get 50% cpu usage (i.e. two cpu's used), and still 0,09 seconds to complete.
However, it takes 0,18 seconds to complete, with 25% cpu usage. It seems the code is not executing in parallel...
I checked the Vision vi, and it's simply a wrapper to a DLL call. I think I remember hearing once that dll calls are single-threaded... Is that the reason why I don't see any increase in speed? Is there a way around this?
Thanks in advance.
08-04-2011 10:18 AM
What version of NI Vision are you using?
If i remember it correctly, parallelism for NI Vision Acquisition functions was introduced with versions 2009 and newer....
Norbert
08-05-2011 03:22 AM
We're using Labview 8.5....
08-05-2011 03:36 AM
This is no good news then.
But maybe you can introduce parallelism on your own?
Depending on the algorithm, you are using, you CAN split up the image on your own and make calls on the algorithm for each fraction and then put the (altered) fractions together to a new image again. I have not tried something like this, so in the worst case, it does even slow things down.
Nevertheless, if the image is large enough (so "split up" and "merging" overhead is negligible) AND the DLL itself can be called parallel (not sure if this works), you could possibly see some performance increase...
Norbert
08-05-2011 03:52 AM
Making things parrallel is very easy for me. I have two independent images that needs to be processed at the same time. So that part was easy... But it seems the Vision version I have can't be called parrallel. And the non-lineair distortion correction is not something I can quickly make myself.
I think I'll install the demo version of latest Labview, and test if that improves speed. That should make it easier to convince my boss to upgrade.