With a .NET reference to your camera, you are able to access its properties and methods using property nodes and invoke nodes. The camera class
uc480.camera has a
Memory property that provides a reference to the camera memory. We can use this memory reference to extract the image data.
- Add a Property Node in the block diagram. Wire the uc480.camera .NET reference to the property node and select the property Memory.
- Add an Invoke Node and select the GetActive method of the Memory class.
- Add a second Invoke Node, reference the Memory class. Select the ToBitmap method.
- Wire the s32MemId output from the GetActive Invoke Node to the s32MemId input of the ToBitmap Invoke Node. This will convert the memory data specified by the s32MemId to a bitmap format.
- With the bitmap reference we can invoke the Save method, and stream it to a System.IO.MemoryStream, from which we can extract the image data.
On details on how to create a
System.IO.MemoryStream, extract the image data, and convert it to an IMAQ image, follow the instructions in
Convert a .NET PictureBox to an IMAQ Image starting from step 3.