02-10-2015 04:45 PM
I would like to be able to pass an Imaq seqence (128x128 x 1500 frames x 2 bytes/pixel) directly into Matlab for processing. I am currently saving the image sequence to an array (imaq image to array vi), saving the array and then opening it in matlab. this process is painfuly slow and save a lot of unneccesary data - the matlab code generates and saves a processed subset of the data.
Solved! Go to Solution.
02-18-2015 08:57 AM
Hey Jwock,
You can use the "Image Acquisition Toolbox"
which is a Matlab's tool that allows you to acquire images and video from cameras and frame grabbers directly into MATLAB and Simulink. You can detect hardware automatically and configure hardware properties.
I leave you a reference here for you to check it out:
"Image Acquisition Toolbox Documentation"
http://www.mathworks.com/help/imaq/index.html
Hope that helps to adress you in the right direction.
Regards!
Daniel C.
02-18-2015 12:46 PM
Daniel,
Thanks for the reply. I am using the IMAQ toolbox to setpup my camera and acquire data. That's not the problem. My data is a contiguous sequence of >1000 frames, which I can acquire using the various tools in that toolbox. I want to pass the data into Matlab, which is superior for the image processing I need to perform. In order to do that, I am writing and saving the image data to a pre-allocated Labview 3D array and then opening the file in a Matlab script window, which is both cumbersome and slow. The Matlab script interface only allows me to pass 2D real arrays, but my data is 3D.
-S
02-18-2015 12:48 PM
Sorry, I should have added that I am stuck using hte Labview acquisition environment.
02-18-2015 02:38 PM
02-18-2015 03:00 PM
that's a good idea as a work-around but there has to be a better way to do this. i will continue to bang my head against it as time permits and post whatever solution i come up with. i don't believe i am the only one with this issue.
02-25-2015 12:59 PM
Figured it out...turns out that Matlab remains persistent in the Labview environment once it's been called so a simple Labview loop on the number of frames does the trick nicely...