Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom VI for VBAI

I need to create a custom VI that I can plug into VBAI to perform "smarter" blob thresholding than the standard options. I might possibly want to program this algorithm in C++.

 

What software do I need?  There used to be a LabView/Vision development package that included VBAI and LabView with vision functions, but I do not see that any more.

Instead, I see a NI Vision Builder AI Development Toolkit (779343-35) which specifically mentions creating custom VBAI steps, and needs LabView, but not sure if it allows custom C++ coded steps.

http://sine.ni.com/nips/cds/view/p/lang/en/nid/207759#productlisting

 

Also, there is the Vision Development Module for Windows (777859-35) which appears to include all sorts of bells and whistles (industrial protocol I/O, Vision Assistant, image acquisition, ...) that are already covered by VBAI...

http://sine.ni.com/nips/cds/view/p/lang/en/nid/209860

 

Thanks in advance!

 

     Nelson

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

Hi Nelson,

 

I would recommend getting the Vision Development Module, which is the Vision Library for LabVIEW and C.

Vision Development Module contains a Vision C API exposing all the functions in the Vision library as a C API.

You can use it to develop your own Vision Algorithm in C if you need access to low level vision algorithms.

If you're familiar with OpenCV, we also have a toolkit you can download to interface OpenCV function with LabVIEW and Vision Development Module. (You still need Vision Development Module).

http://sine.ni.com/nips/cds/view/p/lang/en/nid/213723

This toolkit comes with examples on how to create your own DLL using calling openCV functions, and interface it with LabVIEW.

 

Once you created your DLL, there are 2 ways to interface it with VBAI.

First, create a VI that uses the LabVIEW Call Library Node to call your dll function.

VBAI has a "Run LabVIEW Step" that allows to call a LabVIEW VI from VBAI.

This step lets you set the value of the VI inputs VI and reads its outputs. It is a generic UI.

 

The VBAI SDK you mentioned allows you to create your own step, with your own user interface, providing a better experience for an end-user. The step will appear in the VBAI palette. If an end user needs to modify your inspection and set the parameter of your algorithm, this would be the preferred way. It would be more interactive than with a Run LabVIEW step.

 

I would recommend you start with the Run LabVIEW VI step experience.

 

I hope this answers your question.

 

Best regards,

 

Christophe

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

So, from what you are saying, the Vision Development Module (plus LabView) would allow me to create new VIs that can incorporate current NI vision functions, as well as new custom C++ vision code.  Using this, I should be able to import these new VIs into VBAI and incorporate them into sequences of steps.

 

On the other hand, the Vision Development Module is mostly a cosmetic UI wrapper that can be used to make a VI look more like a conventional VBAI step.

 

So, it sounds like the Vision Development Module (plus LabView) is what is needed.

 

Thanks!

 

     Nelson

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

If you don't plan to call any Vision Development Module functions (i.e. morphology, pattern matching, edge detection, etc.) and all your vision related algorithms are calling third party custom C++ code, you can probably just get LabVIEW.

 

When you install LV API support from VBAI installer you get some basic functions to allow you to convert the Vision image from VBAI to a 2D array of pixels to pass to your DLL and then you can also convert the modified 2D array of pixels from your DLL call in LV to an image that you can pass back to VBAI.

 

If you are calling OpenCV functions and you want an easier experience or you want improved performance that doesn't require two extra copies (i.e. each image to array requires a copy and can add to memory and time requirements), VDM would be needed since it can provide more integrated OpenCV calls and a function to get the pixel pointer to the Vision image that you can pass to your C code instead of making a copy to a 2D array.

 

Hope this helps,

Brad

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