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.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

VBAI is using single core

Solved!
Go to solution

Hello,

I have searched this in the forums but could not find someone faced with this issue. I am running a match pattern step in VBAI. Since I am defining a large template, it needs large resources to be able to make calculations. But when I look at the task manager, application is only using %25 of the CPU. Because of that, it tooks so many time to make calculation, actually I could not be able to wait until the end but killed the process.

So, with another system, it can use %100 of CPU and that is what I need. Is it some kind of single core issue or something else, and how can I change it?

0 Kudos
Message 1 of 4
(2,437 Views)

Hey Sevincom,

 

I believe VBAI operations are single-threaded - they operate in series (no two steps can occur at once). This likely means that they are limited to one core per camera - meaning that on a single core computer, 100% of CPU could be used, while on a quad-core computer, only 25% of CPU would be used. I'll try to confirm this tomorrow!

 

There may be ways to parallelize your task if we move into LabVIEW with the Vision Development Module - LabVIEW will give us more granular control over these operations.

 

But first, could you explain more about the time it takes to complete the process? Is it seconds? Minutes? Hours?

Second, why is it important that this test completes quickly? Would it be possible to acquire the data from the camera, save to disk, and then process the images later (when your system has time)?

 

This information will be very useful. Thanks!

 

Derek B. (esoDerek)
Product Marketing Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,345 Views)
Solution
Accepted by topic author sevincom

Actually it is a property of the specific VDM algorithm you use. Many are multi core enabled so they can efficiently take advantage of all your computer's processors to more quickly execute their code. Running the same Pattern Matching in LV will have the same result. PM was only taking about 15% of my 8 logical processors (i.e. only 1 of them was fully utilized), and I got the same result when running the PM in LV. When I use Find Straight Edge as mentioned in this post:

https://forums.ni.com/t5/Machine-Vision/vbai-quad-core-cpu-runs-25-cpu-load/td-p/885422/page/2

I was getting over 90% CPU utilization for a large image using lots of rake lines to find edges.

 

There may be other settings in the PM or GPM algorithm that could be tweaked to improve performance, so if you include your sample image/template, we may be able to help you improve the efficiency of the algorithm, but it doesn't look like the current settings for PM that you and I were using take advantage of multi processors. Please also provide a sample VBAI or Vision Assistant script so we can see the PM settings you are using.

 

Thanks,

Brad

0 Kudos
Message 3 of 4
(2,336 Views)

Currently I do not have any specific sample, I was just doing tests to see the performance of the PC. Then I figured out it tooks long time and looked at the task manager. It was surprising for me since previously I have seen other multi-core systems using %100 of CPU. I have thought that I need to make some configuration in the PC but now I understand that it is a function dependant.

 

Generally I am using match pattern for setting a coordinate system, as I saw it is the most efficient way in some cases. And it needs to use gradient pyramid algorithm. When defining the template, it tooks some minutes and I have to kill the process.

 

I believe it is not crucial that functions like find edge is using multi-core. But definitely functions like match pattern, which can be very time consuming, should benefit from the advantage of multiple cores.

0 Kudos
Message 4 of 4
(2,318 Views)