LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview access Intensity chart history data

Hello,

I am using an intensity chart to visualize some of the pictures I acquire with a camera and I was wondering if there is a way to access the intensity chart's buffer and selectively choose data from its history after I have finished acquiring my pictures. Right now I am able to acquire a picture as it is captured but I would like to do this at the end of the picture acquiring process if possible.

A second question has to do with the image processing. Could I create a text box on the image based on the sequence number of the image in the intensity chart's buffer? I tried to use the Draw Text in Rec VI but the picture data are a 2D array of 8 bit data and the VI asks for a picture format.

I don't have a sample of my pictures so I just created a 10x10 2D array to test my code with random values of 0 up to 255 (these would be the type of data I get from my camera)

 

I saw this post: https://forums.ni.com/t5/LabVIEW/Save-Restore-Multiple-Waveforms-Chart-History/m-p/3335763#M979061

They say that 'The chart history is simply the data of the waveforms. You can easily save it to a TDMS file.' They suggest some MGI toolkits from VIPM but I don't have a clue what that is. If anyone could provide some help I would be very thankful!

0 Kudos
Message 1 of 4
(2,537 Views)

A chart seems the wrong place to store a sequence of images. Why not use a intensity graph and store the images in planes of a 3D array. Keep the array in a shift register and append a new plane with each new image. Use index array to pick any one of the images at any time.

 

How many images do you want to keep in the history? You could initialize a 3D array of the right size and replace the oldest image with the newest at each iteration. This will operate "in place" and avoids constant memory reallocations.

0 Kudos
Message 2 of 4
(2,499 Views)

Hi altenbach,

thank you once again for your help. I am going through several posts for the 3D array some of them have the same task as mine to save pictures in pages of a 3D array. It seems that a for loop with indexing for the incoming array/picture is enough and will do the job. The number of images is dependent on some other parameters of my project and so the iterations of the for loop will be dependent from a different task and will be an input to this subVI I am creating.

I am trying your suggestion and it seems to work for a dummy picture as I found in this post:

http://forums.ni.com/t5/LabVIEW/Insert-2D-arrays-into-3D-array/td-p/2429196

0 Kudos
Message 3 of 4
(2,462 Views)

Codewise appending a 2D array as new plane to a 3D array is very similar to appending a scalar to a 1D array or a 1D as new row to a 2D array. In all cases you can use "built array".

 

However, since you are dealing with large data structures, I would recommend to decide on a max number of pictures and initialize the array at the final size. Now you would just use "replace array subset" to replace the oldest data, keeping a fixed number of the N most recent pictures in memory.

0 Kudos
Message 4 of 4
(2,453 Views)