ni.com checkout is currently experiencing issues.
Support teams are actively working on the resolution.
ni.com checkout is currently experiencing issues.
Support teams are actively working on the resolution.
03-21-2024 01:39 PM
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.
03-21-2024 03:36 PM
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...
03-22-2024 02:32 AM
Is this how to do it? LabVIEW displays for me "diagonal" instead of "split lenght". This is a bug?
03-22-2024 02:38 AM - edited 03-22-2024 02:38 AM
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…
03-22-2024 02:51 AM
The 1D Array is definitely a nice approach using FGV's. In general VI's it would tend to polute the bd imho.
03-22-2024 03:49 AM
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.
03-22-2024 04:17 AM
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…
03-22-2024 04:38 AM - edited 03-22-2024 04:39 AM
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.
03-22-2024 09:50 AM
I'd test with storing the Picture refs instead of the image data. That way it's a simple 1D array of 20 elements.
03-22-2024 11:31 AM
interesting suggestion, but I have U16 data and I display the data mostly using Intensity Graph because of the colorbar.