06-30-2015 10:02 PM
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.
06-30-2015 11:13 PM - edited 06-30-2015 11:15 PM
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.
07-01-2015 12:12 AM
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.
07-01-2015 12:44 AM
@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?
07-01-2015 09:40 PM
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.