Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Error "not an image" when I try to extract images from an array

Hi,

 I actually work on a project using labview 8.5, with a Line scan camera which can grab picture at 9 kHz, using a NI PCIe 1430 devices.

My work consist in grabbing pictures and saving them in High speed and then processing them.

 

So I created a VI which can grab images very fast. First, it grab the picture and put them all in an array, then I extract all these images from this array and save them to disk as PNG using "IMAQ write file".

 

My main problem is that when I work in High speed(9Khz), I have no problem to grab picture and put them in the array, but when I try to extract these datas from array in order to save it, after a few second I received a message "Error -1074396120 occurred at IMAQ WriteFile - Not an image." while I have no problem in low speed.

 

What should I do to prevent this problem?

 

Regards,

Anthony

 

 

(PS:I'm french and so I apologise for the possible english errors)

Download All
0 Kudos
Message 1 of 9
(4,667 Views)
R u trying to extract the image before it is getting stored in the array?
0 Kudos
Message 2 of 9
(4,666 Views)

Hi Muks,

 

Yes I am sure to that all my acquisition are finished when I begin to extract the datas.

I don't know whether you take a look at my code, but I set a case loop to wait for the end of my first while loop before starting my second loop where I extract the images.

 

To be sure, I tried to set a delay in the end of my grabbing while loop and nothing changes. I also tried with a sequence loop to be sure not to be doing the two things in the same time and I still got this message.

0 Kudos
Message 3 of 9
(4,649 Views)

It is hard to read your code because some of the lines are underneath the boundaries.  Using diagram cleanup could help your code a lot.

 

It looks like you are not allocating space to store your images.  For each image that is in your array, you will need to use "IMAQ Create" with a unique name to allocate space for the image.  Otherwise, the space is reused by images that are acquired later.  I am not familiar with the express vi you used, so I am not sure how you configure it.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 4 of 9
(4,644 Views)
Yes I am with bruce. Can u clean it up a bit please?
0 Kudos
Message 5 of 9
(4,631 Views)

Hi!

Sure, is this file cleaner than the previous? I reorganized it into a stacked sequence.

For the case "false" there is nothing in the case.

 

For a reason I can't explain, I change my labview version and install the Labview 8.6 on my computer and now the problem has moved to the IMAQ readfile:
"Error -1074396120 occurred at IMAQ ReadFile -Not an image" while I change nothing on my code.

 

Do you want me to create a .BMP file instead of uploading my VI?

0 Kudos
Message 6 of 9
(4,602 Views)

 

For the express VI I used called "vision acquisition" I develloped it and attached his code.

Download All
0 Kudos
Message 7 of 9
(4,600 Views)
and here are the other sub VI code
0 Kudos
Message 8 of 9
(4,598 Views)

For my problem with IMAQ read file I just forgot the IMAQ create I think cause now I add this Imaq this problem disappear but I now the problem with the IMAQ WriteFile has come back.

 

I must I forgot something like IMAQ create or Image to array??

0 Kudos
Message 9 of 9
(4,594 Views)