Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get 16 bit depth image from Ni Vision Acquisition

Hi Kashish,

 

As long as your camera is recognized by the IMAQdx driver and shows up in NI MAX, you can open a session to the camera and set camera settings using property nodes in LabVIEW. However, the changes that you make to the settings will only apply to the open camera session, and once the session is closed the settings will go back to how they are set in the camera file.

 

To save, you will need to call the  IMAQdx Write Attributes VI. This will actually write the changes to the camera configuration file so that the settings will endure after you close the camera session.

 

The Grab and Basic Attributes.vi example that installs with VAS shows how to use property nodes to set camera attributes. This VI does not use the IMAQdx Write Attributes VI, so any attributes changed will only apply to the open session.

 

Jordan

Applications Engineer

NI

0 Kudos
Message 11 of 33
(1,632 Views)

But my camera is recognized by the IMAQdx driver and doesn't shows up in NI MAX. How can I change image acquisition to 16 bit grayscale from 32 bit RGB ??

 

Regards,

Kashish Dhal

0 Kudos
Message 12 of 33
(1,628 Views)

Sorry, it was not installed, I just installed it in NI MAX and it is visible now. But how do I change acquisition format ??

 

Regards,

Kashish Dhal

0 Kudos
Message 13 of 33
(1,623 Views)

I tried to change the bytes per pixel and image output format but it is not letting me change it. The images are attached. Please help.

 

Regards,

Kashish Dhal

Download All
0 Kudos
Message 14 of 33
(1,619 Views)

Hi Kashish,

 

IMAQdx doesn't support that pixel bit-depth for your camera. NI MAX is throwing an error indicating "no decoders available", meaning that the driver is not able to decode the incoming image data from your camera into the format you are specifying. 

 

Is there a reason you need U16 grayscale images?

 

-Jordan

0 Kudos
Message 15 of 33
(1,589 Views)

Yes, I need U16 because that is the depth stream, but the output image is whole green which does not indicate any depth.

 

Regards,

Kashish Dhal

0 Kudos
Message 16 of 33
(1,581 Views)

Have you tried using the Intel Realsense SDK to acquire images directly from LabVIEW? You may have more success than trying to get NI-IMAQdx to work with your camera. 

 

Intel RealSense SDK

0 Kudos
Message 17 of 33
(1,559 Views)

I don't know how to use outside SDK in the LabVIEW. I read a lot about calling property node function in LabVIEW but I was not successful in creating a .dll from SDK. 

 

I am attaching the links for C Codes if anybody can help.

 

https://github.com/IntelRealSense/librealsense

 

Regards,

Kashish Dhal

0 Kudos
Message 18 of 33
(1,557 Views)

You may have more luck on Intel's forums finding help building a dll from the SDK. I haven't tried this myself, but from doing a quick search of the librealsense documentation, it looks like you just have to open the realsense.sln file in Visual Studio 2013 or later and compile the solution. If it compiles correctly, I would think that it would create a DLL that you could then call from LabVIEW.

 

Did you try reaching out to the Intel engineer that gave the NI Week presentation that Joseph mentioned?

 

-Jordan

0 Kudos
Message 19 of 33
(1,501 Views)

Yes, I generated .dll. But librealsense code returns image frames in C++ UI. However, I need the output in form of 32 bit arrays of 640x480 which can be imported in LabVIEW through dll.

So, when I am calling that .dll it is not returning anything.

 

Also, Intel engineer Joseph mentioned is not responding. However, I am attaching .dll file.

 

Regards,

Kashish Dhal

0 Kudos
Message 20 of 33
(1,497 Views)