LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convert arrays of picture into JPEG string

Hiya, 
 
I have constructed a procedure to carry out some intensity analysis for my experiment.  I have chosen to use snap instead of grab, as I only need to acquire and analyse images in every 2-30 secs (low level acquisition).  I have created a time cycle for each snap shot.  However, I could not save my images, as every 30sec the process will stop and the error will occur.  At the moment, I have connected the picutre to an AVI create.vi, everytime I run the vi, an error occurs. 
 
I would like to save all my images into the same directory without using grab and without LABVIEW asking me the file name every time I want to save an image.  I would be the most appreciated if someone could help me with the problem please??
 
 
0 Kudos
Message 1 of 4
(3,061 Views)

hello,

Maybe this is not what you want. But if you wanna a way  of saving your snaps to a directory you can do a simple thing as simple as I show you in the pic attached. You just have to but that inside a case that's true in the period that you want. And then you connect something to the "pic number" control in order to give different names for every snap.

I don't have time to analyze you .vi. But I think that it's very complicated. And worst than that it's that maybe not very well programmed and you might have some problems. You have several parts of the code that you don't garanty Dataflow. Pay attention to that.

 

This it's only a few ideas.

Best regards,

 

Software developer
www.mcm-electronics.com





PORTUGAL
Message 2 of 4
(3,038 Views)

Hi Honeyb

The reason your being asked for a file every time you want to save an image is because you are creating the file inside the while loop (with the IMAQ AVI Create VI). There is a Grab and Save to AVI VI in the shipping examples that demonstrates how to configure your camera and your AVI file properly. Open the Example Finder by going to Help >> Find Examples, then search for AVI.

Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 3 of 4
(3,010 Views)

Thanks it has been resolved.  As suggested, I built an array of images using the build array function inside the loop then send it to the avi vi outside the loop.  It's now working fine. 

Thanks a lot

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