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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

No increase in speed with parallel processing on quad-core

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.

0 Kudos
Message 1 of 5
(2,362 Views)

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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 5
(2,357 Views)

We're using Labview 8.5....   Smiley Sad

0 Kudos
Message 3 of 5
(2,331 Views)

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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 5
(2,326 Views)

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.

0 Kudos
Message 5 of 5
(2,320 Views)