createImMontage (imarray, varargin)

Create a rectangular image montage or image grid from an image array
48 download
Aggiornato 24 feb 2017

Visualizza la licenza

A simple function and an alternative to Matlab Image processing Toolbox's montage(). It will produce an image as a grid of frames of the input image array instead of displaying. It also provides an option to resize the input images before adding them to the grid.
% --------------------------------------------------------------------------------
% Input arguments:
% 1st arg: imarray is input array of dimensions H x W x NumImages or H x W x C x NumImages where C
% is the number of channels in each image
% 2nd arg: gridcols = Number of images to appear horizontally
% Default = 3
% 3rd arg: dsf = Down Sampling Factor (to downsample or reduce the size of the input images)
% range [0 1]. Default = 1 (no downsampling)
% 4th arg: border = Thickness of border between two images (in pixels)
% Default = 2;
% ----------------------------------------------------
% Output argument:
% imMontage = output image montage or grid
% ----------------------------------------------------
% Examples:
% imMontage = createImMontage(imarray); % automatically select grid size and populate without any
% downsampling with 2 pixels border between consecutive images (default)
%
% imMontage = createImMontage(imarray,5,0.25); % 5 images horizontally and every
% image downsampled to quarter with 2 pixels border (default) between
% consecutive images
%
% imMontage = createImMontage(imarray,7,0.5,5); % 7 images horizontally and every
% image downsampled to half with 5 pixels border between consecutive images
%
% NOTE: Input image array can be created by:
% imarray = cat(3,imgray1,imgray2,imgray3,imgray4); % for gray scale images
% imarray = cat(4,imcolor1, imcolor2, imcolor4, imcolor5); for color images

Cita come

Wajahat Kazmi (2024). createImMontage (imarray, varargin) (https://www.mathworks.com/matlabcentral/fileexchange/61749-createimmontage-imarray-varargin), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2008a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Versione Pubblicato Note della release
1.0.0.0

.

.
.