From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-11-2014 08:59 AM
Hello community,
in our company we develop a c# application which uses the IMAQDX driver to acquire images from a GigE camera(e.g. JAI CM-140GE).
At the moment we use (ImaqdxSession).Acquisition.GetLastImageData(ref byte[ ]) to access the image data.
I try to read the image related timestamp but due to the rare documentation for IMAQDX via .Net I only found examples for LabView.
Does anybody knows how to access the image meta data, especially the "timestamp" value, via IMAQDX / Vision Acquisition Software and .NET?
Thanks,
best regards
Andreas
08-11-2014 12:16 PM
@Andreas_G wrote:
Hello community,
in our company we develop a c# application which uses the IMAQDX driver to acquire images from a GigE camera(e.g. JAI CM-140GE).
At the moment we use (ImaqdxSession).Acquisition.GetLastImageData(ref byte[ ]) to access the image data.
I try to read the image related timestamp but due to the rare documentation for IMAQDX via .Net I only found examples for LabView.
Does anybody knows how to access the image meta data, especially the "timestamp" value, via IMAQDX / Vision Acquisition Software and .NET?
Thanks,
best regards
Andreas
If it can be done in LabVIEW, then you need to translate it to C#.
Perhaps you can post the VI?
08-12-2014 04:46 AM
Hi nyc,
thanks for your response. Yesterday I found out that (ImaqdxSession).Acquisition.GetLastImage( VisionImage) supplies a VisionImage which has a CustomData property of type CustomDataDictionary.
This CustomDataDictonary contains the keys IMAQdxReceiveTimestampLow, IMAQdxReceiveTimestampHigh, IMAQdxTimestampLow and IMAQdxTimestampHigh.
Accessing this Dictionary returns an object that I tried to cast to an Int32 and also to a String, but i got a "System.Runtime.Serialization.SerializationException". All descriptions I found declares that the value of "TimestampLow" and "TimestampHigh" is of type Int32.
I also firured out that the library I need for the VisionImage (NationalInstruments.Vision.Common.dll) type is only available in 32Bit structure (http://zone.ni.com/reference/en-XX/help/372636F-01/mstudiowebhelp/html/64bitsupport/ and http://www.ni.com/pdf/manuals/373085j.pdf)
Actually we develop a x64 application without problems while using (ImaqdxSession).Acquisition.GetLastImageData(ref byte[ ]) .
Is there any other way to access the timestamp value without using this library?
The LabView code I found at this thread:
http://forums.ni.com/t5/Machine-Vision/Timestamping-of-images-in-NI-IMAQdx/m-p/445132
Unfortunately we don't have a LabView licene at our department, so I cant have a lock at.
Best regards,
Andreas
08-12-2014 07:56 AM
explains how to use 32-bit assembly in a 64-bit project
You can download and use LabVIEW for 40 days!
I am not sure how long of an evaluation there is for IMAQdx software.