R2022a

New Features, Bug Fixes, Compatibility Considerations

Deep Learning: Added examples using deep neural networks

These examples show how to solve image processing problems by using deep neural networks. These examples require Deep Learning Toolbox™.

Image Browser App: Additional Import and Export Capabilities

The Image Browser app supports a greater set of options for curating a collection of images:

  • Add images in directories or datastores to an already opened collection of images

  • Remove a subset of images from a collection

  • Export a subset of images to an image datastore

  • Export images from a datastore to another datastore

Image Region Analyzer App: Additional Export Capabilities

The Image Region Analyzer app supports a greater set of export options:

  • Export region properties as a structure or table

  • Export a function that enables you to perform identical filtering and measurements on other binary images

imbilatfilt Function: Improved performance for uint8 and single data types

The imbilatfilt function shows improved performance for inputs of data type uint8 and single.

For example, this code is about 2.5x faster than in the previous release.

function imbilatfiltTimingTest
      im = imread("cameraman.tif");
      im4k = imresize(im,[3840 2160]);
      tic
      out = imbilatfilt(im4k);
      toc
end

The approximate execution times are:

R2021b: 0.007 s

R2022a: 0.003 s

The code was timed on a Windows® 10, Intel® Xeon® E5-2683 v4 CPU @ 2.10 GHz test system (two processors) by calling the function imbilatfiltTimingTest.

dicomCollection Function: Improved performance

The performance of the dicomCollection function has been improved. The function is about 30–50% faster than in the previous release.

C Code Generation: Generate code from additional functions using MATLAB Coder

The list indicates the Image Processing Toolbox™ functions that have been enabled for code generation in this release. For all target platforms, these functions generate C code. For a complete list of Image Processing Toolbox functions that support code generation, see Functions Supporting Code Generation.

GPU Code Generation: Generate CUDA code from additional functions using GPU Coder

The list indicates the Image Processing Toolbox functions that have been enabled for optimized CUDA® code generation in this release.

 Functionality being removed or changed

The imsharpen function uses different color space conversion operations for RGB images

Behavior change

Starting in R2022a, the imsharpen function uses different color space conversion operations to sharpen RGB images. In R2021b and earlier, the imsharpen function performed color space conversions using the makecform and applycform functions. Starting in R2022a, the imsharpen function performs color space conversions using the rgb2lab and lab2rgb functions.

The new operations yield different results for sharpened RGB images. If you need to reproduce the old behavior, then you can replace the call to imsharpen with a call to the images.compatibility.imsharpen.r2021b.imsharpen function instead. You do not need to change the input arguments.

The regionprops function always stores the Image, ConvexImage, and FilledImage properties as cell arrays in the output table for all inputs

Behavior change

Starting in R2022a, when you specify a table output format, the regionprops function stores the Image, ConvexImage, and FilledImage property values as cell arrays, regardless of the size of the image objects. In previous releases, if the size of the bounding box of an object was 1-by-1 or 1-by-n, these properties were stored in the output table as a numeric scalar or row vector, respectively.

To update your code, access the value of the Image, ConvexImage, and FilledImage properties using dot notation with curly braces, {}. For example, use this code to access the Image property for the first object in the input image BW. In previous releases, curly braces were not required to access values stored as a numeric scalar or row vector.

stats = regionprops("table",BW,"Image");
imdata = stats.Image{1};