I started storing images in an FGV.
Unfortunately the replace array subset takes me 9 seconds to replace 20 images in this scenario.
Debugging is already disabled in the FGV. Any recommendations?
Solved! Go to Solution.
You could replace the "Replace array subset" with an In Place Element Structure and see if that helps:
Also, since an array of the size you're using is 864 million elements, I hope very much you're using 64-bit LabVIEW...
Is this how to do it? LabVIEW displays for me "diagonal" instead of "split lenght". This is a bug?
Hi Quiztus,
as your images seem to have all the same size you could handle them within a 1D array. (IMHO LabVIEW handles 1D arrays much better then multi-dimensional arrays.)
So reshape your input image arrays to a 1D array and init the shift register to a 1D array of 20×640×480 elements. The array index for ReplaceArraySubset would be "image_index"×640×480…
The 1D Array is definitely a nice approach using FGV's. In general VI's it would tend to polute the bd imho.
In general as long as you working with native LabVIEW arrays, you will always get some penalties in different areas, some of them can be optimized, but you working with images and just as suggestion — why do not use any available image processing library, like NI Vision Development Toolkit, or if you need cost-free alternative — OpenCV. Intel IPP also not so bad and can be integrated with LabVIEW in relative simple way. Memory management will be much more efficient in this case.
Hi,
another approach:
Place your images (aka 2D arrays) into DVRs. Your FGV could hold an array of DVRs in the sift register (basically just an array of 20 pointers) instead of 20×640×480×2 Bytes.
You just need to make sure to cleanup all DVRs to avoid memory leaks…
I experience a huge performance boost with this version of the fgv.
I am 90% sure this comes from switching from 3D to 1D.
I don't know DVR, but sound interesting.
I'd test with storing the Picture refs instead of the image data. That way it's a simple 1D array of 20 elements.
interesting suggestion, but I have U16 data and I display the data mostly using Intensity Graph because of the colorbar.