Main Content

Image Batch Processor

Apply function to multiple images


The Image Batch Processor app enables you to process multiple images using the same function. Using this app, you can:

  • Load images from a folder or from an imageDatastore object in the workspace.

  • Process images using an existing MATLAB® function, or create a custom batch processing function using a code template.

  • View intermediate and final processed images.

  • Export processed images to an output folder or the workspace.

  • Generate a function to process additional images outside the app.

If you have Parallel Computing Toolbox™ you can process the images on a local parallel pool.

To get started, see Process Folder of Images Using Image Batch Processor App.

Specify Batch Processing Function

You can specify the batch processing function as one of these options:

  • Existing MATLAB function — Specify an existing built-in or user-created function on the MATLAB search path. Type the function name in the Function Name box, or select it from the list. Alternatively, click Open to navigate to the function file you want to use.

  • Create new function — Create a custom batch processing function using a code template. Click Create in the app toolstrip to open the template.

A batch processing function can accept one or two input arguments.

  • Image — The first input must be the image array im.

  • Information structure — The optional second argument is a structure, info, that contains information about the input image file. The info argument is useful if your batch processing function internally calls one or more functions that require a filename as input, such as imread or rawinfo. For details, see Access File Information.

Image Batch Processor app

Open the Image Batch Processor App

  • MATLAB Toolstrip: On the Apps tab, under Image Processing and Computer Vision, click the Image Batch Processor app icon.

  • MATLAB command prompt: Enter imageBatchProcessor.

Programmatic Use

expand all

imageBatchProcessor opens the Image Batch Processor app, which enables you to process a folder of images.

imageBatchProcessor(folderLocation) opens the app and loads the batch of images stored in the folder folderLocation. (since R2023a)

imageBatchProcessor(imds) opens the app and loads the images in the imageDatastore object imds. (since R2023a)

imageBatchProcessor close closes all open instances of the Image Batch Processor app.

More About

expand all

Version History

Introduced in R2015a

expand all

See Also