Up: Component summary Component

MatlabOp

Executes a Matlab script that generates an image directory from given image directories. You can either modify a single source of images or combine up to five sources. The source directories must contain the same number of images. The source images can be referenced as im1 and im2 (etc.) in the script. The component expects the resulting image to be in imout and/or imout2 variables. If you want to generate images without sources, specify the parameter files.

If tableout variable is present, it will be written as a csv file table output port. Note the special struct format of the variable! (see testcases).

Example:

SourcesOutput

Source script: "imout=xor(im1,im2);"

Tips and examples in the Wiki.

Version 1.2
Bundle anima
Categories Image Processing
Authors Ville Rantanen (ville.rantanen@helsinki.fi)
Issue tracker View/Report issues
Requires Matlab
Source files component.xml imageoperation.m execute.m
Usage Example with default values

Inputs

Name Type Mandatory Description
command MatlabSource Optional Matlab script file to operate the images with. The string parameter will override this input.
table CSV Optional Optional CSV file to read. Will appear as table.
in1 ImageList Optional Source images 1 (in1). The output images will be named after this input folder, or if not defined, after the first array input folder.
in2 ImageList Optional Source images 2 (in2)
in3 ImageList Optional Source images 3 (in3)
in4 ImageList Optional Source images 4 (in4)
in5 ImageList Optional Source images 5 (in5)
inArray Array<ImageList> Optional An array of directories with image files. (ina1, ina2, ...)
file1 ImageList Optional Source image 1 (file1). This folder should contain only one image. The same image is used in each iteration of dir1.
file2 ImageList Optional Source image 2 (file2). See input file1.

Outputs

Name Type Description
out ImageList Result images (out)
out2 ImageList Result images (out2)
tableOut CSVList Result tables (tableout)

Parameters

Name Type Default Description
extension string "" String to be added after the output filenames. e.g. ".png" to change the image format
files float 0 If there are no input folders, this number is used as the number of files generated. The resulting files will be named file1[extension], file2[extension], ... Use the variable file in the script to get the file number. Remember to use extension when using this parameter.
param1 string "" Value of this parameter will be assigned to param1 variable
param10 string "" Value of this parameter will be assigned to param10 variable
param2 string "" Value of this parameter will be assigned to param2 variable
param3 string "" Value of this parameter will be assigned to param3 variable
param4 string "" Value of this parameter will be assigned to param4 variable
param5 string "" Value of this parameter will be assigned to param5 variable
param6 string "" Value of this parameter will be assigned to param6 variable
param7 string "" Value of this parameter will be assigned to param7 variable
param8 string "" Value of this parameter will be assigned to param8 variable
param9 string "" Value of this parameter will be assigned to param9 variable
script string "" Matlab script string to operate the images with. This parameter overrides the input script file.

Test cases

Test case Parameters IN
command
IN
table
IN
in1
IN
in2
IN
in3
IN
in4
IN
in5
IN
inArray
IN
file1
IN
file2
OUT
out
OUT
out2
OUT
tableOut
case1 properties (missing) (missing) in1 (missing) (missing) (missing) (missing) (missing) (missing) (missing) out (missing) (missing)

script=out=imdilate(in1,strel('disk',param1));,
param1=5

case2 (missing) command (missing) in1 in2 (missing) (missing) (missing) (missing) (missing) (missing) out (missing) (missing)
case3_generation properties (missing) (missing) (missing) (missing) (missing) (missing) (missing) (missing) (missing) (missing) out (missing) (missing)

script=s = file; out=mat2gray(repmat(mean(s^2*fspecial('gaussian', [2, round(7*s)],s),1),[round(7*s) 1])); ,
files=10,
extension=.png

case4_table properties (missing) table in1 (missing) (missing) (missing) (missing) (missing) (missing) (missing) out (missing) (missing)

script=names=getcellcol(table,'File'); bgs=getcellcol(table,'BG 99 percentile'); row=find(strcmp(names,srclist{file})); out=[in1-bgs(row) in1];

case5_table_out properties (missing) (missing) in1 (missing) (missing) (missing) (missing) (missing) (missing) (missing) (missing) (missing) tableOut

script=tableout.columnheads={'File','Mean','StDev','NumOverMean'}; tableout.data=[srclist(file), num2csvcell([mean(in1(:)), std(in1(:)), sum(in1(:)>mean(in1(:)))])];

case6_file1 properties (missing) (missing) in1 (missing) (missing) (missing) (missing) (missing) file1 (missing) (missing) (missing) (missing)

script=out=mat2gray(imfilter(in1,file1));


Generated 2018-12-11 07:42:05 by Anduril 2.0.0