From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically import image files from a folder to Labview program

Hi all 

Actually I am trying to import several image files to my Labview program and from that I want to export them to DMD, there are hundreds of images so I want to specify the path of these images and let labview to select them instead of importing them at each time. is there any method for this?

 I highly appreciate if any could help me 

thanks  Mori

0 Kudos
Message 1 of 14
(5,805 Views)

You need to provide more information.

 

Import them how??  In what format??

What do you want to do to the image?  What is DMD??  (Digital Micromirror Device maybe?)

 

If you just want a program to loop through all the files in a folder, do some processing, and then send them to another folder LabVIEW can do that with no problem.

 

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 2 of 14
(5,800 Views)

thanks

DMD as you mentioned is Digital micro mirro device, so I need a loop program for importing a set of image in JPG or PNG format before processing them.,

for example I have 10 image that must be imported to labview at specified time , I could import manually them but consider when I have hundred of image in a folder , it is impossible to import them. the below image is a part of program that let us import image manually. but I need a loop program that searches a specified folder for all images ,sort them after that in each loop import one of them. is it possible? 

0 Kudos
Message 3 of 14
(5,792 Views)

Mori,

 

The Recursive File List.vi. Its found in Programming>>FileI/O>>Adv File Funcs>>Recursive File List. This vi will give also allow you to filter (Pattern on the vi terminals add >> (*.bmp)) the files by extension so if you have .xls and .bmp together it will only allow the (*.bmp) into the output array. As for the looping, use a forloop and it will auto index your array.  I am afraid without the application VI T can not offer any more help.

 

Hope this helps

 

Rob

 

0 Kudos
Message 4 of 14
(5,764 Views)

Rob;

Many Thanks for your valuable hint

Actually, I am beginner in labview and I am trying to improve an exiting VI to my desired one.please find the attached files.

this VI read a simple 1 bit PNG image and send it to DMD

so I want to change this program to a that one which has the ability to read bmp image type instead of one bit png file type and also give it the ability to read all image form a specified folder

 

0 Kudos
Message 5 of 14
(5,754 Views)

for example we have 100 image with number of 1 through 100, so I want to give this program ability of reading specified range of images for example 30 through 90, 

I found a VI that give us ability of reading all files from a folder but I don`t know how to customize it,

 

I would highly appreciate if you could guide me

thanks

 

Mori

 

 

0 Kudos
Message 6 of 14
(5,752 Views)

Mori,

 

This VI will allow you to break up the folder at a start and finish point. I think this is what you require, please open read comments and enjoy.

 

Cheers

 

Rob C

Message 7 of 14
(5,737 Views)

Rob

yes, it is great,  I really appreciate your help

thanks

 

0 Kudos
Message 8 of 14
(5,728 Views)

Hello Morti,

 

I am working on development of 3D printer using DMD. I got struck with the same problem what you have asked here.

I am also using same ALP 4.1 drivers so, you would understand my problem easily.

I tried to build some VI but with that DMD is not at all responding. You may please check my VI and suggest me needful corrections.

 

0 Kudos
Message 9 of 14
(5,294 Views)

Haristhota,

 

Morti's account has been inactive for a few years, so I want to suggest that you create a new thread and re-describe the issue you are having.  There will be a much better chance of your questions being answered in a timely manner.  Thanks!

------------------------------------------------------------------------------------------

Jon F.
Technical Support Engineer
National Instruments
0 Kudos
Message 10 of 14
(5,249 Views)