No BSD License
Highlights from
GeoML
-
GeoML: intro
-
ATE_EdgeDistance(varargin)
ATE_EDGEDISTANCE Computes the energy using the distance from edges.
-
ATE_GradientNorm(varargin)
ATE_GRADIENTNORM Computes the energy using the norm of gradient.
-
ATOptimize(img,model,free,Eex...
ATOPTIMIZE Optimizes a shape model over an image.
-
GeoMLConvertToTree(model,visi...
GEOMLCONVERTTOTREE Converts a tree containing a model.
-
GeoMLGenerateTree(model,visib...
GEOMLGENERATETREE Generates a tree containing a model.
-
GeoMLIterate(model,join,mode)
GEOMLITERATE Iterate on a model.
-
GeoMLParseModel(modelname)
GEOMLPARSEMODEL Parsing of a GeoML XML model description.
-
gauss(x, sigma, mu, norm)
GAUSS Return the monodimensional gaussian function
-
gaussianFilter(varargin)
GAUSSIANFILTER Filters an image using the gaussian derivative filter
-
impixels(img,P)
IMPIXELS Get the values of image pixels at defined points.
-
imscale(img, range)
IMSCALE Scale an image to fit the range
-
imtype(img, type)
IMTYPE Chenges the type of an image
-
plotpoints(X,symbol)
PLOTPOINTS This function allow to plot a series of points
-
plotshape(X, closed, symbol)
PLOTSHAPE This function allow to plot a single shape
-
points2dnormalize(Pi,mustRemo...
POINTS2DNORMALIZE Normalize 2d points
-
points2domogenize(Pi)
POINTS2DOMOGENIZE Enshure a 3-coords omogeneous set of points
-
View all files
from
GeoML
by Gabriele Lombardi
A general morphable template tool for image segmentation.
|
| GeoMLParseModel(modelname) |
function [model,free,freestruct] = GeoMLParseModel(modelname)
% GEOMLPARSEMODEL Parsing of a GeoML XML model description.
%
% function [model,free] = GeoMLParseModel(modelname)
%
% This function parse a GeoML XML model descriptin file starting from its
% name, the model file must be in the current directory and the GeoML jar
% file must be loaded, its dependencies must be loaded too.
%
% Params
% ------
% IN:
% modelname = The model name without extension.
% OUT:
% model = The GeoML model as a Java class.
% free = The free parameters.
% freestruct = A struct containing the free variables by name (multiple
% equal names gives errors).
%
% Pre
% ---
% - The model file must be in the current directory, with the correct
% filename and readable from the user.
% - The DTD file must be in the current directory if accessed with SYSTEM
% or accessible via Web if accessed with PUBLIC.
% - The model file must be a valid GeoML file.
%
% Post
% ----
% - A Java com.dsi.libs.geoml.Group class containing the model is
% returned.
% Checking the number of parameters:
if nargin<1 || ~isa(modelname,'char')
error('A valid model file name must be provided!');
end
% Importing the Java classes:
import com.dsi.libs.geoml.matlab.GeoMLMatlabUtils;
% Obtaining the model:
o = GeoMLMatlabUtils.parseFile([pwd filesep modelname '.xml']);
model = o(1);
free = o(2);
% Converting the free variables in a struct:
if nargout>2
% Preparing the struct:
freestruct = struct;
% Iterating on variables:
for ind=1:numel(free)
% Adding a variable:
freestruct = setfield(freestruct,char(free(ind).getName),free(ind));
end
end
|
|
Contact us at files@mathworks.com