|
@@ -1,26 +1,26 @@
|
|
-% function segImg = segmentFelzenszwalb(imgInput, sigma, k, minSize, destination, verbose)
|
|
|
|
|
|
+% function [ segImg, noRegions ]= segmentFelzenszwalb(imgInput, sigma, k, minSize, computeColorOutput, destination, verbose)
|
|
%
|
|
%
|
|
-% BRIEF: segmentFelzenszwalb Run the region segmentation algorithm of Felzenszwalb
|
|
|
|
-% and Huttonlocher
|
|
|
|
-% V = segmentFelzenszwalb(X, N)
|
|
|
|
|
|
+% BRIEF: segmentFelzenszwalb Run the region segmentation algorithm of Felzenszwalb and Huttonlocher
|
|
%
|
|
%
|
|
% The function accepts the following options:
|
|
% The function accepts the following options:
|
|
% INPUT:
|
|
% INPUT:
|
|
-% imgInput -- (string or 3d-matrix)
|
|
|
|
-% sigma -- (optional, scalar) bandwidth of Gaussian kernel to
|
|
|
|
-% smooth the image, default: 0.5
|
|
|
|
-% k -- (optional, scalar) influences the threshold accept a
|
|
|
|
-% boundary between regions (larger k -> larger regions), default:
|
|
|
|
-% 500
|
|
|
|
-% minSize -- (optional, scalar), minimum component size (enforced by post-processing stage), default: 20
|
|
|
|
-% destination -- (optional, string)
|
|
|
|
-% verbose -- (optional, bool)
|
|
|
|
|
|
+% imgInput -- (string or 3d-matrix over uint8 )
|
|
|
|
+% sigma -- bandwidth of Gaussian kernel to smooth the image (optional, scalar, default: 0.5)
|
|
|
|
+% k -- influences the threshold accept a boundary between regions, larger k -> larger regions,(optional, scalar, default: 500)
|
|
|
|
+% minSize -- minimum component size enforced by post-processing stage (optional, scalar, default: 20)
|
|
|
|
+% computeColorOutput -- compute colored segm output (rgb) or region indicees (gray)? (optional, logical, default: false)
|
|
|
|
+% destination -- filename where the image shell be stored (optional, string)
|
|
|
|
+% verbose -- print additional information (optional, logical, default: false)
|
|
|
|
+%
|
|
% OUTPUT:
|
|
% OUTPUT:
|
|
|
|
+% segImg -- segmentation result, either colored or with region indicees (optional, 3d-matrix or 2d-matrix over uint8)
|
|
|
|
+% noRegions -- total number of regions (optional, uint8)
|
|
%
|
|
%
|
|
%
|
|
%
|
|
-% Example::
|
|
|
|
|
|
+% Example:
|
|
|
|
+% segResult = segmentFelzenszwalb(imgOrig);
|
|
|
|
+% segResult = segmentFelzenszwalb(imgOrig,0.5, 200, 20, true, 0 , true);
|
|
%
|
|
%
|
|
-% Note::
|
|
|
|
|
|
|
|
|
|
|
|
% Authors: Alexander Freytag
|
|
% Authors: Alexander Freytag
|