Cat img

From Eigenvector Research Documentation Wiki
Revision as of 10:26, 3 June 2013 by imported>Scott (→‎Example)
Jump to navigation Jump to search

Purpose

Concatenate image DSOs in specific direction.

Synopsis

out = cat_img(imgs,domain,mode)
out = cat_img(mode,img1,img2,img3,...) %alternative I/O

Description

Concatenate images along mode direction in specified domain. If domain is "spatial", mismatched areas will be infilled with NaN and marked as "excluded".

If input imgs and domain are omitted, the input format is expected as the spatial mode to concatenate on (mode) followed by two or more type image DataSets (domain is assumed to be 'spatial'). This input format is the second example under Synopsis.

Inputs

  • imgs - cell array of images (DSO or numeric).
  • domain - {'spatial' 'variable'} identify type of concatenation.
  • mode - Dimension to concatenate in, 1, 2, or 3. If value is 0 then images will be tiled.

Outputs

  • out - Image DSO with blank space as NaN and excluded.

Example

>> img1 = imread('EchoRidgeClouds.jpeg','jpeg');

>> %Make demo images.
>> img1 = img1(1:200,1:100,:);
>> img2 = img1;
>> img1 = buildimage(img1);
>> img2 = buildimage(img2);

>> % Create tiled image.
>> tile_img = cat_img({img1 img2 img2 img1 img1},'spacial',0);
>> size(tile_img.imagedata)
ans =
   400   300     3

>> % Cat images in 3rd dim (add slabs to your image).
>> z_img = cat_img({img1 img2},'variable',2);
>> size(z_img.imagedata)
ans =
   200   100     6

See Also

cropgroup