Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Optical Flow(sum of differences)-speed of algorithm-NI 1722 smart camera

I am trying to write an optical flow algorithm for NI 1722 smart camera .

I post 2 vi's.

MIN_SAD.vi:Find the sum of absolute differences for any possible pixel displacement for a Patch of Pixels(Pv) in an Search Area.

SAD.vi:Find the sum of absolute differences for the intensity between 2 patch of Pixels.

The vi's run on NI 1722 smart camera. Is there any way, to run them faster?Is there any recomment for the vi'code optimisation on NI 1722 smart camera

 

Thank you,

Download All
0 Kudos
Message 1 of 5
(4,493 Views)

Hello,

 

The smart camera is going to run the program as fast as it is able to. Any performance issues are due to efficiency of your code. The faster and more efficient that you design your code, the better it will run on the smart camera. Optimization is normally left up to the end-user since performance requirements are determined by individual needs. If you need consulting, you might consider talking with one of National Instruments' Alliance partners listed here:https://www.ni.com/partners/s/?language=en_US

 

-Zach

0 Kudos
Message 2 of 5
(4,469 Views)
Any guide on writing efficient and optimized code?
0 Kudos
Message 3 of 5
(4,464 Views)

Hello,

 

There is no manual for writing efficient and optimized code. Much of that comes with experience. You might consider one of the LabVIEW classes listed here.

 

-Zach

0 Kudos
Message 4 of 5
(4,452 Views)

Hi grekop, 

 

In a quick look at your VIs, it looks like you are just performing simple math operations on subsets of the pixels.  In doing so, you are making a fair number of copies of the image (or subset of the image).  If you use IMAQ Add, IMAQ Extract, IMAQ AbsDiff, etc, you will be able to process directly on the image.  This should have the effect of reducing the number of copies, which will in turn speed up your processing.

 

Good luck,

 

Jeff 

 

0 Kudos
Message 5 of 5
(4,413 Views)