Skip to content

Commit

Permalink
Doco upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
petercorke committed Sep 22, 2012
1 parent eaea529 commit 912c002
Show file tree
Hide file tree
Showing 23 changed files with 259 additions and 91 deletions.
16 changes: 15 additions & 1 deletion anaglyph.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
% different colors. By default the left image is red, and the right
% image is cyan.
%
% ANAGLYPH(LEFT, RIGHT) as above but display the anaglyph.
%
% A = ANAGLYPH(LEFT, RIGHT, COLOR) as above but the string COLOR describes
% the color coding as a string with 2 letters, the first for left, the second
% for right, and each is one of:
Expand All @@ -19,7 +21,19 @@
% correction. If DISP is positive the disparity is increased, if negative it
% is reduced. These adjustments are achieved by trimming the images. Use
% this option to make the images more natural/comfortable to view, useful
% if the images were captured with a non-human stereo baseline or field of view.
% if the images were captured with a stereo baseline significantly different
% the human eye separation (typically 65mm).
%
% Example::
% Load the left and right images
% L = iread('rocks2-l.png', 'reduce', 2);
% R = iread('rocks2-r.png', 'reduce', 2);
% then display the anaglyph for viewing with red-cyan glasses
% anaglyph(L, R);
%
% References::
% - Robotics, Vision & Control, Section 14.3,
% P. Corke, Springer 2011.
%
% See also STDISP.

Expand Down
8 changes: 6 additions & 2 deletions cmfxyz.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@
% is the color matching function of the corresponding element of LAMBDA.
%
% XYZ = CMFXYZ(LAMBDA, E) is the CIE XYZ color matching (1x3) function for an
% illumination spectrum defined by intensity E (Nx1) and wavelength
% LAMBDA (Nx1) [m].
% illumination spectrum E (Nx1) defined at corresponding wavelengths
% LAMBDA (Nx1).
%
% Note::
% - CIE 1931 2-deg XYZ CMFs from cvrl.ioo.ucl.ac.uk
%
% References::
% - Robotics, Vision & Control, Section 14.3,
% P. Corke, Springer 2011.
%
% See also CMFRGB, CCXYZ.


Expand Down
4 changes: 2 additions & 2 deletions colorkmeans.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
% Notes::
% - The k-means clustering algorithm used in the first three forms is
% computationally expensive and time consuming.
% - Clustering is performed in rg-chromaticity space.
% - Clustering is performed in xy-chromaticity space.
% - The residual is an indication of quality of fit, low is good.
%
% See also
% See also RGB2XYZ, KMEANS.



Expand Down
15 changes: 10 additions & 5 deletions iblobs.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
% 'connect',C set connectivity, 4 (default) or 8
% 'greyscale' compute greyscale moments 0 (default) or 1
% 'boundary' compute boundary (default off)
% 'area',[A1,A2] accept only blobs with area in interval A1 to A2
% 'shape',[S1,S2] accept only blobs with shape in interval S1 to S2
% 'touch' ignore blobs that touch the edge (default accept)
% 'area',[A1,A2] accept only blobs with area in the interval A1 to A2
% 'shape',[S1,S2] accept only blobs with shape in the interval S1 to S2
% 'touch',T accept only blobs that touch (1) or do not touch (0)
% the edge (default accept all)
% 'class',C accept only blobs of pixel value C (default all)
%
% The RegionFeature object has many properties including:
Expand All @@ -37,11 +38,15 @@
% circularity 1 for a circle, less for other shapes
% moments a structure containing moments of order 0 to 2
%
% References::
% - Robotics, Vision & Control, Section 13.1,
% P. Corke, Springer 2011.

% Notes::
% - the RegionFeature objects are ordered by the raster order of the top most
% - The RegionFeature objects are ordered by the raster order of the top most
% point (smallest v coordinate) in each blob.
%
% See also RegionFeature, ILABEL, IMOMENTS.
% See also RegionFeature, ILABEL, IDISPLABEL, IMOMENTS.


% Copyright (C) 1993-2011, by Peter I. Corke
Expand Down
29 changes: 19 additions & 10 deletions iconcat.m
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
%ICONCAT Concatenate images
%
% C = ICONCAT(IM,OPTIONS) concatenates images from the cell array IM. The
% images do not have to be of the same size, and smaller images are surrounded
% by background pixels which can be specified.
% C = ICONCAT(IM,OPTIONS) concatenates images from the cell array IM.
%
% ICONCAT(IM,OPTIONS) as above but displays the concatenated images
% using idisp.
% using IDISP.
%
% [C,U] = ICONCAT(IM,OPTIONS) as above but also returns the vector U whose
% elements are the coordinates of the left (or top in vertical mode) edge of
% the corresponding image.
% the corresponding image within the concatenated image.
%
% Options::
% 'dir',D direction of concatenation: 'horizontal' (default) or 'vertical'.
% 'bgval',B value of unset background pixels
% 'bgval',B value of padding pixels (default NaN)
%
% Examples::
%
% Horizontally concatenate three images
% c = iconcat({im1, im2, im3}, 'h');
%
% Find the first column of each of the three images
% [c,u] = iconcat({im1, im2, im3}, 'h');
% where u is a 3-vector such that im3 starts in the u(3)'rd column of c.
%
% Notes::
% - Works for color or greyscale images
% - Direction can be abbreviated to first character, 'h' or 'v'
% - In vertical mode all images are right justified
% - In horizontal mode all images are top justified
% - The images do not have to be of the same size, and smaller images are
% surrounded by background pixels which can be specified.
% - Works for color or greyscale images.
% - Direction can be abbreviated to first character, 'h' or 'v'.
% - In vertical mode all images are right justified.
% - In horizontal mode all images are top justified.
%
% See also IDISP.

Expand Down
40 changes: 27 additions & 13 deletions icorner.m
Original file line number Diff line number Diff line change
@@ -1,39 +1,52 @@
%ICORNER Corner detector
%
% F = ICORNER(IM, OPTIONS) is a vector of PointFeature objects describing
% detected corner features. This is a non-scale space detector and by
% default the Harris method is used. If IM is an image sequence a cell array
% of PointFeature vectors is returned.
% corner features detected in the image IM. This is a non-scale space detector
% and by default the Harris method is used but Shi-Tomasi and Noble are also
% supported.
%
% If IM is an image sequence a cell array of PointFeature vectors for the
% correspnding frames of IM.
%
% The PointFeature object has many properties including:
% u horizontal coordinate
% v vertical coordinate
% strength corner strength
% descriptor corner descriptor (vector)
%
% See PointFeature for full details
%
% Options::
% 'detector',D choose the detector where D is one of 'harris' (default),
% 'noble' or 'klt'
% 'sigma',S kernel width for smoothing (default 2)
% 'deriv',D kernel for gradient (default kdgauss(2))
% 'cmin',CM minimum corner strength
% 'cminthresh',CT minimum corner strength as a fraction of maximum corner
% strength
% 'edgegap',E don't return features closer than E to the edge of
% 'edgegap',E don't return features closer than E pixels to the edge of
% image (default 2)
% 'suppress',R don't return a feature closer than R pixels to an earlier
% feature (default 0)
% 'nfeat',N return the N strongest corners (default Inf)
% 'detector',D choose the detector where D is one of 'harris' (default),
% 'noble' or 'klt'
% 'sigma',S kernel width for smoothing (default 2)
% 'deriv',D kernel for gradient (default kdgauss(2))
% 'k',K set the value of k for Harris detector
% 'k',K set the value of k for the Harris detector
% 'patch',P use a PxP patch of surrounding pixel values as the
% feature vector. The vector has zero mean and unit norm.
% 'color' specify that IM is a color image not a sequence
%
% Example::
%
% Compute the 100 strongest Harris features for the image
% c = icorner(im, 'nfeat', 100);
% and overlay them on the image
% idisp(im);
% c.plot();
%
% Notes::
% - Corners are processed in order from strongest to weakest.
% - The function stops when:
% - the corner strength drops below cmin
% - the corner strenght drops below cMinThresh x strongest corner
% - the corner strength drops below cmin, or
% - the corner strength drops below cMinThresh x strongest corner, or
% - the list of corners is exhausted
% - Features are returned in descending strength order
% - If IM has more than 2 dimensions it is either a color image or a sequence
Expand All @@ -51,15 +64,15 @@
% - "A combined corner and edge detector",
% C.G. Harris and M.J. Stephens,
% Proc. Fourth Alvey Vision Conf., Manchester, pp 147-151, 1988.
%
% - "Finding corners",
% J.Noble,
% Image and Vision Computing, vol.6, pp.121-128, May 1988.
%
% - "Good features to track",
% J. Shi and C. Tomasi,
% Proc. Computer Vision and Pattern Recognition, pp. 593-593,
% IEEE Computer Society, 1994.
% - Robotics, Vision & Control, Section 13.3,
% P. Corke, Springer 2011.
%
% See also PointFeature, ISURF.

Expand Down Expand Up @@ -87,6 +100,7 @@

% TODO, can handle image sequence, return 3D array of corner_strength if requested
% and cell array of corner vectors
% handle tiling

% parse options into parameter struct
opt.k = 0.04;
Expand Down
13 changes: 9 additions & 4 deletions idouble.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
%IDOUBLE Convert integer image to double
%
% IMD = IDOUBLE(IM) returns an image with double precision elements in the
% range 0 to 1. The integer pixels are assumed to span the range 0 to the
% maximum value of their integer class.
% IMD = IDOUBLE(IM) is an image with double precision elements in the
% range 0 to 1 corresponding to the elements of IM. The integer pixels IM
% are assumed to span the range 0 to the maximum value of their integer class.
%
% See also IINT.
% Notes::
% - Works for an image with arbitrary number of dimensions, eg. a color
% image or image sequence.
% - There is a linear mapping (scaling) of the values of IMD to IM.
%
% See also IINT, CAST.


% Copyright (C) 1993-2011, by Peter I. Corke
Expand Down
14 changes: 14 additions & 0 deletions ierode.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,26 @@
% OUT = IERODE(IM, SE, N, OPTIONS) as above but the structuring element
% SE is applied N times, that is N erosions.
%
% Options::
% 'border' the border value is replicated (default)
% 'none' pixels beyond the border are not included in the window
% 'trim' output is not computed for pixels where the structuring element
% crosses the image border, hence output image had reduced
% dimensions.
% 'wrap' the image is assumed to wrap around, left to right, top to
% bottom.
%
% Notes::
% - Cheaper to apply a smaller structuring element multiple times than
% one large one, the effective structuing element is the Minkowski sum
% of the structuring element with itself N times.
% - Windowing options of IMORPH can be passed.
%
% Reference::
% - Robotics, Vision & Control, Section 12.5,
% P. Corke, Springer 2011.
%
%
% See also IDILATE, ICLOSE, IOPEN, IMORPH.

% Copyright (C) 1993-2011, by Peter I. Corke
Expand Down
6 changes: 3 additions & 3 deletions iisum.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%IISUM Sum of integral image
%
% S = IISUM(II, Y1, Y2, X1, X2) is the sum of pixels in the rectangular image
% region defined by its top-left (X1,Y1) and bottom-right (X2,Y2). II is
% S = IISUM(II, U1, V1, U2, V2) is the sum of pixels in the rectangular image
% region defined by its top-left (U1,V1) and bottom-right (U2,V2). II is
% a precomputed integral image.
%
% See also INTGIMAGE.
Expand All @@ -24,7 +24,7 @@
% You should have received a copy of the GNU Leser General Public License
% along with MVTB. If not, see <http://www.gnu.org/licenses/>.

function s = iisum(ii, r1, r2, c1, c2)
function s = iisum(ii, c1, r1, c2, r2)

r1 = r1 - 1;
if r1 < 1
Expand Down
2 changes: 1 addition & 1 deletion imorph.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
%
% OUT = IMORPH(IM, SE, OP) is the image IM after morphological processing
% with the operator OP and structuring element SE.

%
% The structuring element SE is a small matrix with binary values that indicate
% which elements of the template window are used in the operation.
%
Expand Down
12 changes: 8 additions & 4 deletions iopen.m
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
%IOPEN Morphological opening
%
% OUT = IOPEN(IM, SE, OPTIONS) is the image IM after morphological opening
% with the structuring element SE. This is an erosion followed by dilation.
% with the structuring element SE. This is a morphological erosion followed
% by dilation.
%
% OUT = IOPEN(IM, SE, N, OPTIONS) as above but the structuring element
% SE is applied N times, that is N erosions followed by N dilations.
%
% Notes::
% - Cheaper to apply a smaller structuring element multiple times than
% one large one, the effective structuing element is the Minkowski sum
% - For binary image an opening operation can be used to eliminate small white
% noise regions.
% - It is cheaper to apply a smaller structuring element multiple times than
% one large one, the effective structuring element is the Minkowski sum
% of the structuring element with itself N times.
% - Windowing options of IMORPH can be passed.
% - Windowing options of IMORPH can be passed. By default output image is
% same size as input image.
%
% See also ICLOSE, IDILATE, IERODE, IMORPH.

Expand Down
9 changes: 5 additions & 4 deletions ipad.m
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
%IPAD Pad an image with constants
%
% OUT = IPAD(IM, SIDES, N) is a padded version of the image IM with a block
% of NaN values N pixels wide on the sides of IM as specified by SIDES which
% is a string containing one or more of the characters:
% of NaN values N pixels wide on the sides of IM as specified by SIDES.
%
% OUT = IPAD(IM, SIDES, N, V) as above but pads with pixels of value V.
%
% SIDES is a string containing one or more of the characters:
% 't' top
% 'b' bottom
% 'l' left
% 'r' right
%
% OUT = IPAD(IM, SIDES, N, V) as above but pads with pixels of value V.
%
% Examples::
%
% Add a band of zero pixels 20 pixels high across the top of the image:
Expand Down
Loading

0 comments on commit 912c002

Please sign in to comment.