11-03-2014 09:32 PM
Dear friends,
I want to perform the 2D interpolation of a intensity graph using “Interpolate 2D” Vi. But I don't want this function operated at the same time of running the main VI. So I saved the intersity graph as a JPEG using the Invoke Node firstly. Then the question comes. Is there a method to change the JPEG picture to the data array that used to draw the original intersity graph,or is there a method to realize the interpolation by operating the image(image data)??
Thank you!
11-03-2014 09:57 PM
That sounds like a difficult way to handle the task. You know how to handle the interpolation while the VI is running it sounds like. Why convert the data to a jpg? Just store/log it as it is. Whatever VI you're using to handle the interpolation can open the logged file with the data in the same format you're used to and then run the interpolation.
This avoids the mess you're creating with converting your data to a picture instead of the data you're used to.
11-03-2014 10:46 PM
Wow,I am just curious about this. i think it's interesting. I think maybe a good way to edit picture.
11-04-2014 07:44 AM
I will second natasftw's suggestion that you store the data from the original source and format. As said, this will allow you to get it in the original form without going through any modification. Also possible is to use the methods Export to Excel or Export to Clipboard. You will need Excel installed for the first one.
Be aware that the JPEG format uses lossy compression. This will change your data, so saving as a JPEG is not recommended.
If you need help with saving your original data to disk and reading it back for analysis, let us know. Please post your current code so we can help you better.
11-04-2014 07:31 PM
Thank you for your suggestion. i have saved my data using “write to spreadsheet file” , read it in a subvi, and performed interpolation in this subvi. But I think interpolation is really a large calculation. It consumed about a minute performed on an 12*96 array.
11-05-2014 02:16 AM
11-05-2014 05:44 AM
Thank you for your reply.
I post a picture here. The "z" is the 12*96 array that would be read from a spreadsheet, "x""y" are unwired, method is "spline" and ntime is "3", Do you think it's the correct way?
11-05-2014 06:13 AM
11-05-2014 06:55 AM
Here is the testing, the first picture the real one in my program, the second picture is a test. Why the time of the first one is so longer than the second one??Does the read from file make this difference??
11-05-2014 07:45 AM
Reading that amount of data from a file should take less than a second. However, you could have some file type issues. When you save your file from Excel, do you save it as an Excel file (binary) or a text file (requires actively selecting the text file option on save)? The VI you are using to read the data is assuming a delimited text file. If you are using the default Excel format, this could easily cause the issue. If you are unsure, look at the file extension. It should be "txt" not "xls". If it is "xls", open in Excel and resave as a text file, then try your LabVIEW analysis again.