07-06-2009 06:56 PM
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,
07-07-2009
05:22 PM
- last edited on
03-25-2025
08:37 AM
by
Content Cleaner
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
07-07-2009 07:00 PM
07-08-2009
10:19 AM
- last edited on
03-25-2025
08:37 AM
by
Content Cleaner
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
07-13-2009 10:35 AM
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