LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reconstruct images using IMAQ

Solved!
Go to solution

Hi,

Can i reconstruct images from raw data using labview? If can, what kind of data can be used? 
For further clarification, im trying to get a thing called "line-data" of an image acquired from an ultrasound scanner and i want to reconstruct that image from that data using labview. Am i able to do that? However, i also need the above question answered. 

If any further information is needed, just tell me and i'll provide you with everything i can.

Thank you for helping me.

I have IMAQ, IMAQdx, Vision Module installed.

0 Kudos
Message 1 of 11
(4,751 Views)
An image is essentially a 2D array of values. If your raw data is available as an array, you can make it an image. See the following example.

https://decibel.ni.com/content/docs/DOC-4155

- Dan
0 Kudos
Message 2 of 11
(4,724 Views)
Solution
Accepted by topic author Namit

An Image is an Array of Pixels, where a Pixel can be a U8 or U16 for grey-scale images or a 32-bit value if holding RGB data.  So that's the first thing you need to consider, what are your Pixels, i.e. the base data type you are using to build the image.

 

Now, many Image arrays have sizes like 640 x 480, which is the X and Y "resolution" (how many pixels fit in the X and Y directions).  Note that 640x480 is a common size for inexpensive USB Video Cameras.  A minor confusion is that the corresponding LabVIEW array (say, of U8 Pixels) will have dimensions 480x640 -- this makes sense if you think "480 Rows, in the Y direction, and 640 Columns, in the X direction".

 

So now you have your Image Array, so fill in the Pixels as you need.  This will, of course, depend on what you are doing.  If you are doing a "line scan" operation (which I assume means you get, say, a row of pixels at a time), you just build your 2D array from the corresponding 1D Line Scans.

 

Here's a Demo -- it's in LabVIEW 2016, so you might not be able to copy it into your Block Diagram (unless you also have 2016), but it is simple enough that you should be able to find the functions on the IMAQ Vision Utilities Palettes (and sub-Palettes).  See if you can "predict the picture" ...

Create Image.png

Bob Schor

0 Kudos
Message 3 of 11
(4,720 Views)

Thank you guys for the replies, i'm reviewing them and will mark yours as solution as soon as i get my answer. 

0 Kudos
Message 4 of 11
(4,711 Views)

Hi,

It seems like that "line data" has nothing to do with the pixmap or 1D array 😞
It is some kinds of graph according to my advisor and he said that the tool for this graph is available in labview. 

 

0 Kudos
Message 5 of 11
(4,683 Views)

Which ultrasound scanner are you using?

What is the "line data" output format?

Thanks
uday
0 Kudos
Message 6 of 11
(4,676 Views)

I got the information, it's so called "line profile" of an image and i have to reconstruct the image using that "profile". For example: 

line profile example.png
As far as i know, the line profile is a graph which indicates the grayscale of a line across the picture (i'm using a grayscale image) and it seems like i'll have to process over 300 graphs like this to be able to reconstruct the image.

So the problem flies back to the one with the pixmap and stuff, thank you guys 😄

 

 

0 Kudos
Message 7 of 11
(4,675 Views)

One more thing, can anyone upload the IMAQ Lineprofile example VI for me please, i cannot find it in my example lib.

Thank you, 

0 Kudos
Message 8 of 11
(4,667 Views)

Which version of LabVIEW you are using?

I have LabVIEW 2013 and in that if you will go to example finder there is an working example of Line Profile.

YOu can navigate to C:\Program Files\National Instruments\LabVIEW 2013\examples\Vision\Analysis

0 Kudos
Message 9 of 11
(4,663 Views)

Let's see if I understand this.  You need to build an image from a bunch of Line Profiles, which are 1D arrays of Pixel Values (8-bit Grey Scale) for a particular Column of an Image.  You have an Example (provided by me in a previous post) on how to take a 2D array of Grey Scale pixels and create an Image.

 

So how do you take, say, 300 1D Arrays of Pixels and make a 2D Array of Pixels that you can view as an Image?  Is this the (very simple) LabVIEW Question that you are asking?  Can't you figure it out for yourself?  Hint -- look at the functions in the Array Palette, or think about how For Loops work with Index tunnels to build Arrays ...

 

Bob Schor

 

P.S. -- I have a recommendation for you.  I'm guessing you are an Undergraduate Engineering student working with a faculty member on an Imaging Project.  The Faculty member is not a LabVIEW expert, and you are "acquainted" with LabVIEW, and given the task of "getting the work done" for him/her.  Do what one of our very bright BME students, who was in exactly this position, did -- ask around, find a LabVIEW "Guru" to whom you can go, explain what you are doing, and who will spend the time getting you over the basics and "up to speed" with Image Processing.  She asked around, found me, and we are now busy analyzing the flow of biomaterials in living tissue (and both of us are learning a lot about LabVIEW and Image Processing, even the so-called "expert" ...).

0 Kudos
Message 10 of 11
(4,653 Views)