LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loading file of BMPs into one array

Solved!
Go to solution

Hi, 

 

For some reason I am having trouble loading a batch of BMP files into one 2D array.  I have attached the VI I have been messing with for some time now... (as well as a couple sample BMPs if someone wants them)

 

I want to take each BMP in a folder, extract the 2D array and put it into one array.  Each new image's 2D array goes on the row after the previous image.

 

Any help for this seemingly simple problem?

Download All
0 Kudos
Message 1 of 6
(2,447 Views)

Sorry, in the sample BMPs I attached the array created would only be a 1D array, since each BMP is only 1 pixel wide (sorry if that caused any confusion).

0 Kudos
Message 2 of 6
(2,446 Views)
Solution
Accepted by topic author Max_2013

1) You are correctly finding the filenames... but what are you doing with the single path? That's only going to store the last one in the loop... and you don't connect it to the BMP vi. 

 

2) You should just do everything in the for loop. snip.png

Message 3 of 6
(2,438 Views)

I don't see any 2-D arrays in the VI you attached.

 

Let me assume that you are extracting out a 2-D array, perhaps from the Pixmap, that is 1 x10.  If you want to turn that into a 1-D array, just use index array to pick out either the column or the row.

0 Kudos
Message 4 of 6
(2,436 Views)

Hey, excuse my unfamiliarity with LabVIEW, but how do I get the very first depicted VI?  The blue item with 2 zeros in the indices...

 

I honestly cannot get something like that with the correct terminals to connect to the shift register.

0 Kudos
Message 5 of 6
(2,381 Views)

Ah, finally got it.  Array constant -> pull down 0 to add 2nd dimension -> put in numeric constant 0 into box.

0 Kudos
Message 6 of 6
(2,371 Views)