Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Create VI creates limited number of images

Hello!

 

For my work I use VI which captures and processes image from CCD 16-bit grayscale camera. This VI is a combination of VI from SITK (PVCAM camera control) and VI generated from script of Cell count from NI Vision Assistant 2009. I optimized parameters of the script to allow me detect bright glass or plastic beads in the view-field of my microscope. So it works really fine but I get some pecularity - IMAQ Create VI from the whole scheme generates limited number of images depending only on resolution of incoming images for processing.

 

For example when I capture 1024x1024 pixels it processes only first 2048 frames. When I use 512x512 resolution it processes 8192 frames. After mentioned number of frames I see that my camera still captures the image, but image processing part of VI detects nothing and shows black picture. When it worked it showed white spots on the places of bead localization... 

 

But it was supposed that when I put my VI described above in a cycle I should get unlimited number of frames to process (my programm works until I stop it). In the end of the cycle I place IMAQ Dispose VI which should keep my RAM fine (and task manager shows that I have large amount of free RAM).

 

My PC is  - Core 2 Quad 2.5 GHz, 2 Gb RAM, 512 Mb of Video RAM, Windows XP 32 bit, Labview 2009.

 

0 Kudos
Message 1 of 5
(3,061 Views)

Hi KirillZ,

 

Based on the image sizes that you mentioned and the number of images that are created for each image size, it seems that you have some sort of buffer in your VI. What is your image type set to?  Depending on what type of data is coming into the IMAQ ArraytoImage, you may have to convert it to the same format.  Also, a little more information about your code and how this small piece fits into the big picture would be helpful.  Thanks!

 

Kim

Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(3,025 Views)

Hello, Kim! Here I send a part of my whole VI, which contains both acquisition and processing part. VI parameters (like image formats and resolutions) are the very ones I use during experiments.

 

Kirill,

0 Kudos
Message 3 of 5
(3,017 Views)

Hi KirillZ,

 

Unfortunately, I don't have the SITK VIs that are in your VI, so I cannot run the VI, but have you tried to make the Image Type the same as the type coming out of the Transpose 2D Array?  I saw that you were inputting it into the I16, but it looks like the representation of that value us U16.  This may be causing the error.  Otherwise, is one of the SITK functions related to buffering?

 

Kim

Applications Engineer
National Instruments
0 Kudos
Message 4 of 5
(3,005 Views)

I would offer two suggestions.  Place the IMAQ Create outside the while loop.  You only have to create the image reference once.  Also, I would create another image reference (8-bit this time, also outside the while loop) to use as the destination for the IMAQ Cast Image vi.  By the way, I believe the IMAQ Cast Image vi will truncate the 16-bit data down to 8-bit.  I don't think it rescales it, so if some of the image data values are greater than 255, then they will be truncated.

 

 

 

Randall Pursley
0 Kudos
Message 5 of 5
(2,997 Views)