File Exchange Pick of the Week

Our best user submissions

Processing big/large/blocked images, blockwise

Back in R2016b, we introducedtall arraysto facilitate, among other things, processing arbitrarily large datasets. This works nicely for tables or timetables, for example, and works in conjunction withdatastores-- repositories for collections of data that are too large to fit in memory.

我想本周使用我的Potw Pulpit来突出图像处理域中的类似新功能。在R2021A中,我们发布了一个“BlockedImage对象”。BlockedImage是由离散块制成的图像。就像这样的情况tall(),blockedImage()促进处理图像或卷太大以适应内存。通过阻塞图像,您可以结合执行任意大图像的处理blockedImageDatastore()without running out of memory.

Contents

What aboutblockproc(), 你问?

Sure, we've had blockproc() to facilitate blockwise processing of images since 2009. So what's the big deal?

blockedImage()has several notable advantages overblockproc():

  1. blockedImage has native support for multiresolution datasets. You can easily make correspondences between image regions in a pyramidal dataset (e.g., "Where is this feature at the finest resolution level?") We can answer that because we have support for real-world spatial units.
  2. ClockEdImage的条件处理要容易得多。虽然BlockProc在每个块上工作,但无论如何,BlockEdImage可以使用BlockedImageDataStore的“BlockLocationset”参数跳过块。例如,这对于培训期间的课程平衡非常有用。
  3. 您可以使用BlockEdImage指定块,这些块不会严格地分区数据。您可以拥有重叠块。您可以在它们之间具有间隙的块。
  4. It's more natural to work with non-image results, such as computing a histogram for each block.
  5. It's a lot easier to work with 3D--and ND!--data.
  6. blockedImage's adapters are much nicer to work with... or not. They're totally optional!
  7. Also the apply() syntax is nicer to work with in blockedImage
  8. In conjunction with blockeImageDatastores, blockedImage provides an easy way to prepare datasets for training machine learning models.
  9. You can create arrays of blockedImages, and do batch processing of images, blockwise!
  10. A "crop" method of blockedImage lets you createvirtual裁剪的子图 - 没有数据副本。这是存储器有效的,并且如果例如,图像包含多个逻辑分辨率或实体,则在单个幻灯片图像上包含多个组织样本。金宝搏官方网站

You can call 'em "big," you can call 'em "large," or you can call 'em "blocked"...

However you choose to refer to them, processing images too large to fit in memory has never been easier, more powerful, or more flexible! Your legacy code that usesblockproc()will continue to work, but for your newer analyses--especially if you are training deep learning models--I encourage you to giveblockedImage()a try!

As always, I welcome your思想和评论.




Published with MATLAB® R2021a

|
  • print
  • send email

댓글

댓글을 남기려면링크를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.