Code covered by the BSD License
-
gi_acontour(task, varargin)
gi_acontour: graphical interface for ac_segmentation
-
gi_shape(varargin)
gi_shape: graphical interface for instantiating a polygon, a spline, or a mask
-
ac_area(acontour)
ac_area: signed area of an active contour
-
ac_clipping(acontour, framesi...
ac_clipping: clipping of an active contour
-
ac_deformation(acontour, defo...
ac_deformation: deformation of an active contour with topology management
-
ac_energy(task, varargin)
ac_energy: storage and plot of the energy of a set of active contours and
-
ac_evolution(task, about_acon...
ac_evolution: storage, properties, and plot of the evolution of a set of active
-
ac_isocontour(frame, level, o...
ac_isocontour: instantiation of an active contour describing a level set of a frame
-
ac_length(acontour)
ac_length: length of an active contour
-
ac_mask(acontour, mask_size)
ac_mask: conversion of an active contour into a binary mask
-
ac_plot(o_axes_handle, aconto...
ac_plot: plot of an active contour in a window of given height
-
ac_resampling(acontour, resol...
ac_resampling: approximately regular resampling of an active contour using a
-
ac_sampling(acontour, o_prope...
ac_sampling: sampling of an active contour
-
ac_segmentation(...
-
ac_usage_mean
ac_usage_mean: region competition of mean-based descriptors in grayscale
-
ac_usage_mean_basic
ac_usage_mean_basic: region competition of mean-based descriptors in grayscale
-
ac_usage_minlength
ac_usage_minlength: curvature flow
-
ac_validity(acontour)
ac_validity: check for validity of an active contour
-
po_circle(center, radius, num...
po_circle: instantiation of a closed polygon sampling a circle
-
po_ellipse(center, radii, til...
po_ellipse: instantiation of a closed polygon sampling an ellipse
-
po_isocontour(frame, level, o...
po_isocontour: instantiation of a (set of) closed polygon(s) sampling a level set of a frame
-
po_mask(polygon, mask_size)
po_mask: conversion of a closed polygon into a binary mask
-
po_orientation(polygon, o_ori...
po_orientation: orientation of a closed polygon as a positive or negative real number
-
po_plot(polygon, o_window_hei...
po_plot: plot of an open or a closed polygon in a window of given height
-
po_rectangle(center, lengths,...
po_rectangle: instantiation of a closed polygon sampling a rectangle
-
po_rouctangle(center, lengths...
po_rouctangle: instantiation of a closed polygon sampling a chamfered rectangle
-
po_simple(polygon)
po_simple: test of closed polygon (non) self-intersection
-
po_square(center, width, tilt...
po_square: instantiation of a closed polygon sampling a square
-
Contents.m
-
Contents.m
-
View all files
from
Active Contour Toolbox
by Eric Debreuve
This toolbox provides some functions to segment an image or a video using active contours
|
| po_mask(polygon, mask_size)
|
function mask = po_mask(polygon, mask_size)
%po_mask: conversion of a closed polygon into a binary mask
% m = po_mask(p, m_size) computes the binary mask, m, of a closed polygon, p.
% Actually, since po_mask calls the Matlab function poly2mask, the polygon is
% automatically closed if not already. The size of m is given by m_size.
% m_size can be a 1x2 or a 2x1 matrix. Unlike poly2mask, the class of m is
% double.
%
% This function was written only to account for the interpretation of vertex
% coordinates made by the polygon toolbox (type: 'help polygon' for more
% information). The mask is actually computed by poly2mask.
%
%See also polygon, poly2mask.
%
%Polygon Toolbox by Eric Debreuve
%Last update: June 14, 2006
mask = double(poly2mask(polygon(2,:), polygon(1,:), mask_size(1), mask_size(2)));
|
|
Contact us at files@mathworks.com