Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Image to Array conversion

I know that this topic has been posted numerous times, however, I am not finding the neccessary informational help in any of the posts.  I'm just a little confused about the general function layout to accomplish such a probelm.
 
There are the IMAQ ColorImageToArray functions that I'm looking at, but I'm not able to figure it out (even after looking at the help menus).  I'm pretty sure this is the only thing I need to get a 2D array, but for some reason, the correct inputs are evading me.  For instance, I'm trying to read an image from a file, but when I choose the Read JPEG function, I can generate the right output for an acceptable IMAQ ColorImageToArray input.
 
If someone could give me a few tips, or a quick example that would help a lot.  I'm starting to run around in circles with this probelm that seems like it should be a piece of cake (which it may be).
0 Kudos
Message 1 of 3
(3,332 Views)
Hello Systems_eng,
I assume that in the following statement you mean to say that you cannot generate the right output?

when I choose the Read JPEG function, I can generate the right output for an acceptable IMAQ ColorImageToArray input.


You can use the IMAQ Read File function to read an image into LabVIEW.  The image data type is used by all IMAQ and Vision Functions.  To create this memory space and deallocate the memory space at the end of a program you need to use IMAQ Create and IMAQ dispose.  There are also some examples in the Example Finder.
 
Hope this helps!
Angela
Applications Engineer
0 Kudos
Message 2 of 3
(3,309 Views)
Thanks for the reply.  I actually figured out what I wanted to accomplish with the attached program (just in case anyone needs it for a future reference).  But the main issue I was having, was actually connecting the right inputs to the ColorImageToArray function.  I know how to generate a 'picture' wire, but not an 'image'.  I was able to work around that probelm to produce the results that I was looking for.
0 Kudos
Message 3 of 3
(3,306 Views)