05-22-2012 04:58 AM
Hello all,
I must develop some vision functions that does not exist in VDS. I must work in raw data matrix.
How can I use the Imaq control to have access to image data?
Shall I convert my RGB image with ColorImageToArray and IntegerToColorValue or do I have direct access?
My propose is to make a subVI with a vision function with Imaq control at the input and a Imaq indicator at the output in a very efficient way.
Thanks and regards
05-22-2012 05:15 PM
If you want to program your vision algorithm in a text based language, LabVIEW allows you to call a dll or an assembly. You can get access to the pointer to the first pixel of an image using IMAQ GetImagePixelPtr and pass that value to your DLL. That would be the most efficient way.
You can also prototype your algorithm entirely in LabVIEW by converting a Vision image to a 2D array using IMAQ ImageToArray or IMAQ ColorImageToArray, and work on the 2D data. You can then convert the 2D array back into an image using IMAQ ArrayToImage (or IMAQ ArraytoColorImage). This is much slower than the first solution.
Hope this helps,
Christophe