Anyway to do a 3D binary reconstruction without a huge contiguous 3D matrix?
7 views (last 30 days)
Show older comments
I need to do a 3D reconstruction with respect to a movie. I can get a sufficient binary of the masks and marker images for each frame wich suggests a 3D binary image reconstruction. However, as I understand it, there's no such thing as a 3d sparse matrix and, given 8bpp, I would need 2 3D arrays which would require 10GB of memory each (essentially to store tw versions of an entire binarized movie). That's not practical for me.
Anybody know a way around this maybe something that uses a cell array of 2d(movie frame binarized) images or something where I can feed my "dream function" a list of all the 2d component coordinate lists across all the frames?
1 Comment
Walter Roberson
on 19 Jun 2021
Perhaps you could use cell arrays of sparse arrays?
Or perhaps you could "unroll" a 3D sparse array to be a 2D sparse array?
Answers (1)
Image Analyst
on 19 Jun 2021
Not sure I understand. Do you have an actual movie file, like in an .mp4 format?
Otherwise, maybe check out the memmapfile() function for dealing with gigantic arrays.
2 Comments
Image Analyst
on 20 Jun 2021
What do you have already? Do you have 3-D arrays of markers and blobs already? And you want to pass those to imreconstruct() to do morphological reconstruction? Do you have just the segmented blobs array but not the marker array? Maybe you can label the array and process the markers slice by slice, but then the labeled array would take up more space than the marker array so that's probably no good.
I guess what I'd try is to downsample everything, do the reconstruction, then (optionally) upsample afterwards. The shapes might be somewhat different but that might not make too much difference depending on what you're doing after reconstruction.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!