LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

save an array

捕获.PNG

using this code, l can replace picture of original array,after replacing, l don't konw how to save the replaced array. I want this replaced array to be new original array, so l can keep replacing picture one by one.

0 Kudos
Message 1 of 5
(4,095 Views)

Can you attach the actual VI (and subVIs) instead of a blurry picture.

Why do you have so many for loops? Some cound be combined for cleaner code. THe first FOR loop does not need any shift register.

I think I even see some potential race conditions.

 

Maybe all you need is a globally initialized feedback node.

0 Kudos
Message 2 of 5
(4,065 Views)

The first for loop is used to rearrange the sequence of picture in my folder and display the the picture name sequencely to the listbox, the filename of my picture are 1.jpg, 2.jpg, 3.jpg...,etc, l want the filename listed in listbox also in this sequence.

0 Kudos
Message 3 of 5
(4,031 Views)

@zychocolate wrote:

The first for loop is used to rearrange the sequence of picture in my folder and display the the picture name sequencely to the listbox, the filename of my picture are 1.jpg, 2.jpg, 3.jpg...,etc, l want the filename listed in listbox also in this sequence.


Well, if you would name your files with sufficeint leading zeroes (e.g. 0001.jpg, 0002.jpg, etc.) they would automatically sorted numerically and the forst loop would not be necessary.

 

Still, the second and third loop could be combined into one.

 

Are the files constantly changing? Why would you re-read an re-process all files from scratch every 100ms? Wouldn't it be sufficient to to all that once and only loop over the last part of the code? Did you understand my suggestion about the feedback node?.

 

It is really difficult to try to understand the dataflow from a picture. Can't you attach the VIs instead?

0 Kudos
Message 4 of 5
(4,004 Views)

Do you have an e-mail so l can send my vi file to you, because my vi is too big to send using ni forums.

Thank you so much.

0 Kudos
Message 5 of 5
(3,912 Views)