LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read & Write to Buffer an Image

I'm newbie.
I try to program an application(digital image processing). And I want read/write an image from/to buffer (physic memory) or temp file. Is there any one can help ?

Thank you very much!
Sorry about my English.
0 Kudos
Message 1 of 5
(3,542 Views)
Your question is very general. What is the source of your image?
Why do you need a buffer? Is it because you're constantly acquiring the image?
Are you using IMAQ? Regular picture VIs? Something else?
In general, the picture palette has VIs for saving an image to a file and I'm sure so does IMAQ.
You can use the example finder (Help>>Find Examples) to find examples for how to work with them.
To learn more, I suggest you read the LabVIEW user manual. Also, try searching this site and google for LabVIEW tutorials. Here is one you can start with. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide.

___________________
Try to take over the world!
0 Kudos
Message 2 of 5
(3,538 Views)
Thank you very much!
The source file is *.tif or *.jpeg. And I need use buffer because in my application, i use many task (queue) for processing image file. Ex: use filter and then use threshold ...
I use LabVIEW 7 and IMAQ 6.0
Please tell me more.
0 Kudos
Message 3 of 5
(3,546 Views)
I don't use IMAQ, so I can't really help you.
The regular picture VIs can read BMPs, PNGs, and JPEGs. I presume IMAQ can also read TIFs, but if not, there probably are solutions.
I still don't understand why you need a buffer. Once you have the image loaded, you use wires to move it between the different functions. You don't need to save and load it every time. Unless there is something about image manipulation I don't understand.
I suggest you look at my suggestions from before, starting with looking at the examples that come with LV. They will explain how to use IMAQ VIs.

___________________
Try to take over the world!
0 Kudos
Message 4 of 5
(3,530 Views)
Hello Trung,

I am very excited to hear that you are interested in using IMAQ Vison for your image application and thank you for using our discussion forums. To answer your question, you certainly can use IMAQ Vision to read from a jpeg or tiff file, run your algorithm for processing the image and then save back your results as an image. Some of the VIs you will need to use are IMAQ ReadFile.vi, IMAQ Write JPEG File.vi and IMAQ Write TIFF File.vi. These VIs can be used to read and write image files. There are some examples included with IMAQ Vision that demonstrate how to use these VIs. One good example on reading image files is ..\Examples\Vision\2. Functions\Analysis\Histogram Example.vi, included as an example under your LabVIEW folder.

For your application you will begin by creating a memory buffer for your image using the IMAQ Create.vi then read the file using IMAQ ReadFile, process the images, save your file and finally deallocate the memory associated with your image using the IMAQ Dispose.vi. The memory allocation, file read, processing and dispose part of this process is shown in the example I mentioned above. For more information about vision concepts refer to the IMAQ Vision Concepts Manual. This is the manual for the newest release of IMAQ Vision 7.1.1, but most of the concepts should apply to your version of Vision.

For information about using the different VIs and functions refer to the IMAQ Vision for LabVIEW User Manual installed on your computer and found under Start>>Programs>>National Instruments>>Vision>>Documentation. I hope this helps you out. If you have more questions I would encourage your to continue using the discussion forums or if you would like one on one assistance from an Applications Engineer contacting your local National Instruments Representative and looking into the IMAQ Vision Standard Service Program (SSP). Have a great day!

Regards,
Nipun M
Applications Engineer
National Instruments
0 Kudos
Message 5 of 5
(3,518 Views)