Log in

View Full Version : Vision Camera: C++ Implementation?


duffany1
11-01-2012, 21:35
Hello,

We are trying to figure out how to implement the vision camera in our C++ code.

We have discovered that the NI Vision Assistant, which can get you the binary image, allows you to export C code. But, our question is, how do we implement this with C++/Windriver/WPI Library? The exported C code isn't very clear to us. Does anybody have any insight into this matter?

Radical Pi
11-01-2012, 21:42
Hello,

We are trying to figure out how to implement the vision camera in our C++ code.

We have discovered that the NI Vision Assistant, which can get you the binary image, allows you to export C code. But, our question is, how do we implement this with C++/Windriver/WPI Library? The exported C code isn't very clear to us. Does anybody have any insight into this matter?

The code generated calls directly to the IMAQ libraries (which are the backend of the WPILib code you see). To use it, after getting the image, you can say
IVA_ProcessImage(m_image->GetImaqImage());
You'll want to also grab the results of the final step in your script from the generated code. How you do that depends on the exact script you're generating.