Cat img: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Scott
(Created page with '===Purpose=== Concatenate image DSOs in specific direction. ===Synopsis=== :out = cat_img(imgs,domain,mode) :out = cat_img(mode,img1,img2,img3,...) ===Description=== Concate…')
 
imported>Scott
No edit summary
Line 20: Line 20:
====Outputs====
====Outputs====
* '''out''' - Image DSO with blank space as NaN and excluded.
* '''out''' - Image DSO with blank space as NaN and excluded.
===Example===
<pre>
>> 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
>> z_img = cat_img({img1 img2},'variable',2);
>> size(z_img.imagedata)
ans =
  200  200    3
</pre>


===See Also===
===See Also===


[[cropgroup]]
[[cropgroup]]

Revision as of 11:14, 31 May 2013

Purpose

Concatenate image DSOs in specific direction.

Synopsis

out = cat_img(imgs,domain,mode)
out = cat_img(mode,img1,img2,img3,...)

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
>> z_img = cat_img({img1 img2},'variable',2);
>> size(z_img.imagedata)
ans =
   200   200     3

See Also

cropgroup