Anyway to do a 3D binary reconstruction without a huge contiguous 3D matrix?

조회 수: 1 (최근 30일)
Andrew Diamond
Andrew Diamond 2021년 6월 19일
댓글: Image Analyst 2021년 6월 20일
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
Walter Roberson
Walter Roberson 2021년 6월 19일
Perhaps you could use cell arrays of sparse arrays?
Or perhaps you could "unroll" a 3D sparse array to be a 2D sparse array?

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2021년 6월 19일
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
Andrew Diamond
Andrew Diamond 2021년 6월 19일
편집: Andrew Diamond 2021년 6월 19일
re: Do you have an actual movie file, like in an .mp4 format?
Yup. I guess I could process the movie into some uncompressed simple file (of frames processed to binary images?) suitable for memmapfile() but I'm a bit worried how long a binary image reconstruction would take on such. Most of the processed binary processing results would be empty (i.e. zeros) so I was hoping I could take advantage of that.
At this point I guess I'm obliged to try this through considering that the whole file would be the entire single thing I need to processed, a single huge 3D cube of uint8s, as needed by imreconstruct, it's not clear to me whether this wouldn't just result in it reading it all into memory.
Thanks
Image Analyst
Image Analyst 2021년 6월 20일
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.

댓글을 달려면 로그인하십시오.

제품


릴리스

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by