plateform stringclasses 1
value | repo_name stringlengths 13 113 | name stringlengths 3 74 | ext stringclasses 1
value | path stringlengths 12 229 | size int64 23 843k | source_encoding stringclasses 9
values | md5 stringlengths 32 32 | text stringlengths 23 843k |
|---|---|---|---|---|---|---|---|---|
github | siam1251/Fast-SeqSLAM-master | crop_borders.m | .m | Fast-SeqSLAM-master/graphs/altmany-export_fig-113e357/crop_borders.m | 4,855 | utf_8 | 28cc044092bcab4daa2a35a4434fa835 | function [A, vA, vB, bb_rel] = crop_borders(A, bcol, padding, crop_amounts)
%CROP_BORDERS Crop the borders of an image or stack of images
%
% [B, vA, vB, bb_rel] = crop_borders(A, bcol, [padding])
%
%IN:
% A - HxWxCxN stack of images.
% bcol - Cx1 background colour vector.
% padding - scalar indicating ... |
github | siam1251/Fast-SeqSLAM-master | isolate_axes.m | .m | Fast-SeqSLAM-master/graphs/altmany-export_fig-113e357/isolate_axes.m | 4,851 | utf_8 | 611d9727e84ad6ba76dcb3543434d0ce | function fh = isolate_axes(ah, vis)
%ISOLATE_AXES Isolate the specified axes in a figure on their own
%
% Examples:
% fh = isolate_axes(ah)
% fh = isolate_axes(ah, vis)
%
% This function will create a new figure containing the axes/uipanels
% specified, and also their associated legends and colorbars. The o... |
github | siam1251/Fast-SeqSLAM-master | im2gif.m | .m | Fast-SeqSLAM-master/graphs/altmany-export_fig-113e357/im2gif.m | 6,234 | utf_8 | 8ee74d7d94e524410788276aa41dd5f1 | %IM2GIF Convert a multiframe image to an animated GIF file
%
% Examples:
% im2gif infile
% im2gif infile outfile
% im2gif(A, outfile)
% im2gif(..., '-nocrop')
% im2gif(..., '-nodither')
% im2gif(..., '-ncolors', n)
% im2gif(..., '-loops', n)
% im2gif(..., '-delay', n)
%
% This function c... |
github | siam1251/Fast-SeqSLAM-master | read_write_entire_textfile.m | .m | Fast-SeqSLAM-master/graphs/altmany-export_fig-113e357/read_write_entire_textfile.m | 961 | utf_8 | 775aa1f538c76516c7fb406a4f129320 | %READ_WRITE_ENTIRE_TEXTFILE Read or write a whole text file to/from memory
%
% Read or write an entire text file to/from memory, without leaving the
% file open if an error occurs.
%
% Reading:
% fstrm = read_write_entire_textfile(fname)
% Writing:
% read_write_entire_textfile(fname, fstrm)
%
%IN:
% fn... |
github | siam1251/Fast-SeqSLAM-master | pdf2eps.m | .m | Fast-SeqSLAM-master/graphs/altmany-export_fig-113e357/pdf2eps.m | 1,522 | utf_8 | 4c8f0603619234278ed413670d24bdb6 | %PDF2EPS Convert a pdf file to eps format using pdftops
%
% Examples:
% pdf2eps source dest
%
% This function converts a pdf file to eps format.
%
% This function requires that you have pdftops, from the Xpdf suite of
% functions, installed on your system. This can be downloaded from:
% http://www.foolabs.c... |
github | siam1251/Fast-SeqSLAM-master | print2array.m | .m | Fast-SeqSLAM-master/graphs/altmany-export_fig-113e357/print2array.m | 9,613 | utf_8 | e398a6296734121e6e1983a45298549a | function [A, bcol] = print2array(fig, res, renderer, gs_options)
%PRINT2ARRAY Exports a figure to an image array
%
% Examples:
% A = print2array
% A = print2array(figure_handle)
% A = print2array(figure_handle, resolution)
% A = print2array(figure_handle, resolution, renderer)
% A = print2array(figur... |
github | siam1251/Fast-SeqSLAM-master | append_pdfs.m | .m | Fast-SeqSLAM-master/graphs/altmany-export_fig-113e357/append_pdfs.m | 2,759 | utf_8 | 9b52be41aff48bea6f27992396900640 | %APPEND_PDFS Appends/concatenates multiple PDF files
%
% Example:
% append_pdfs(output, input1, input2, ...)
% append_pdfs(output, input_list{:})
% append_pdfs test.pdf temp1.pdf temp2.pdf
%
% This function appends multiple PDF files to an existing PDF file, or
% concatenates them into a PDF file if the o... |
github | siam1251/Fast-SeqSLAM-master | using_hg2.m | .m | Fast-SeqSLAM-master/graphs/altmany-export_fig-113e357/using_hg2.m | 1,037 | utf_8 | 3303caab5694b040103ccb6b689387bf | %USING_HG2 Determine if the HG2 graphics engine is used
%
% tf = using_hg2(fig)
%
%IN:
% fig - handle to the figure in question.
%
%OUT:
% tf - boolean indicating whether the HG2 graphics engine is being used
% (true) or not (false).
% 19/06/2015 - Suppress warning in R2015b; cache result for i... |
github | siam1251/Fast-SeqSLAM-master | eps2pdf.m | .m | Fast-SeqSLAM-master/graphs/altmany-export_fig-113e357/eps2pdf.m | 8,624 | utf_8 | 24048681d3f737f221497896307fd2f1 | function eps2pdf(source, dest, crop, append, gray, quality, gs_options)
%EPS2PDF Convert an eps file to pdf format using ghostscript
%
% Examples:
% eps2pdf source dest
% eps2pdf(source, dest, crop)
% eps2pdf(source, dest, crop, append)
% eps2pdf(source, dest, crop, append, gray)
% eps2pdf(source, de... |
github | siam1251/Fast-SeqSLAM-master | ghostscript.m | .m | Fast-SeqSLAM-master/graphs/altmany-export_fig-113e357/ghostscript.m | 7,902 | utf_8 | ff62a40d651197dbea5d3c39998b3bad | function varargout = ghostscript(cmd)
%GHOSTSCRIPT Calls a local GhostScript executable with the input command
%
% Example:
% [status result] = ghostscript(cmd)
%
% Attempts to locate a ghostscript executable, finally asking the user to
% specify the directory ghostcript was installed into. The resulting path... |
github | siam1251/Fast-SeqSLAM-master | fix_lines.m | .m | Fast-SeqSLAM-master/graphs/altmany-export_fig-113e357/fix_lines.m | 6,441 | utf_8 | ffda929ebad8144b1e72d528fa5d9460 | %FIX_LINES Improves the line style of eps files generated by print
%
% Examples:
% fix_lines fname
% fix_lines fname fname2
% fstrm_out = fixlines(fstrm_in)
%
% This function improves the style of lines in eps files generated by
% MATLAB's print function, making them more similar to those seen on
% scre... |
github | siam1251/Fast-SeqSLAM-master | flann_search.m | .m | Fast-SeqSLAM-master/flann/flann_search.m | 3,506 | utf_8 | cffd29579f0290f0f680a3f12cb7a671 | %Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
%Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
%
%THE BSD LICENSE
%
%Redistribution and use in source and binary forms, with or without
%modification, are permitted provided that the following conditions
%are met:
%
... |
github | siam1251/Fast-SeqSLAM-master | flann_load_index.m | .m | Fast-SeqSLAM-master/flann/flann_load_index.m | 1,578 | utf_8 | f9bcc41fd5972c5c987d6a4d41bdc796 | %Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
%Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
%
%THE BSD LICENSE
%
%Redistribution and use in source and binary forms, with or without
%modification, are permitted provided that the following conditions
%are met:
%
... |
github | siam1251/Fast-SeqSLAM-master | test_flann.m | .m | Fast-SeqSLAM-master/flann/test_flann.m | 10,100 | utf_8 | d65a8eac8c411227a355b4ddbe6de38a | %Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
%Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
%
%THE BSD LICENSE
%
%Redistribution and use in source and binary forms, with or without
%modification, are permitted provided that the following conditions
%are met:
%
... |
github | siam1251/Fast-SeqSLAM-master | flann_free_index.m | .m | Fast-SeqSLAM-master/flann/flann_free_index.m | 1,614 | utf_8 | 5d719d8d60539b6c90bee08d01e458b5 | %Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
%Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
%
%THE BSD LICENSE
%
%Redistribution and use in source and binary forms, with or without
%modification, are permitted provided that the following conditions
%are met:
%
... |
github | siam1251/Fast-SeqSLAM-master | flann_save_index.m | .m | Fast-SeqSLAM-master/flann/flann_save_index.m | 1,563 | utf_8 | 5a44d911827fba5422041529b3c01cf6 | %Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
%Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
%
%THE BSD LICENSE
%
%Redistribution and use in source and binary forms, with or without
%modification, are permitted provided that the following conditions
%are met:
%
... |
github | siam1251/Fast-SeqSLAM-master | flann_set_distance_type.m | .m | Fast-SeqSLAM-master/flann/flann_set_distance_type.m | 1,926 | utf_8 | 8ba72989a4ac1bd6b30bec841b9def25 | %Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
%Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
%
%THE BSD LICENSE
%
%Redistribution and use in source and binary forms, with or without
%modification, are permitted provided that the following conditions
%are met:
%
... |
github | siam1251/Fast-SeqSLAM-master | sift.m | .m | Fast-SeqSLAM-master/draw_features/sift.m | 2,466 | utf_8 | 414f6d11875ffa2761038d8b112488e5 | % [image, descriptors, locs] = sift(imageFile)
%
% This function reads an image and returns its SIFT keypoints.
% Input parameters:
% imageFile: the file name for the image.
%
% Returned:
% image: the image array in double format
% descriptors: a K-by-128 matrix, where each row gives an invariant
% ... |
github | siam1251/Fast-SeqSLAM-master | appendimages.m | .m | Fast-SeqSLAM-master/draw_features/siftDemoV4/appendimages.m | 461 | utf_8 | a7ad42558236d4f7bd90dc6e72631d54 | % im = appendimages(image1, image2)
%
% Return a new image that appends the two images side-by-side.
function im = appendimages(image1, image2)
% Select the image with the fewest rows and fill in enough empty rows
% to make it the same height as the other image.
rows1 = size(image1,1);
rows2 = size(image2,1);
if (... |
github | siam1251/Fast-SeqSLAM-master | showkeys.m | .m | Fast-SeqSLAM-master/draw_features/siftDemoV4/showkeys.m | 1,699 | utf_8 | 4e67466c0fd7739350cb2af5767e10a4 | % showkeys(image, locs)
%
% This function displays an image with SIFT keypoints overlayed.
% Input parameters:
% image: the file name for the image (grayscale)
% locs: matrix in which each row gives a keypoint location (row,
% column, scale, orientation)
function showkeys(image, locs)
disp('Drawin... |
github | siam1251/Fast-SeqSLAM-master | sift.m | .m | Fast-SeqSLAM-master/draw_features/siftDemoV4/sift.m | 2,466 | utf_8 | 414f6d11875ffa2761038d8b112488e5 | % [image, descriptors, locs] = sift(imageFile)
%
% This function reads an image and returns its SIFT keypoints.
% Input parameters:
% imageFile: the file name for the image.
%
% Returned:
% image: the image array in double format
% descriptors: a K-by-128 matrix, where each row gives an invariant
% ... |
github | siam1251/Fast-SeqSLAM-master | match.m | .m | Fast-SeqSLAM-master/draw_features/siftDemoV4/match.m | 1,941 | utf_8 | 8b21ce74b4e02359b997273701345d26 | % num = match(image1, image2)
%
% This function reads two images, finds their SIFT features, and
% displays lines connecting the matched keypoints. A match is accepted
% only if its distance is less than distRatio times the distance to the
% second closest match.
% It returns the number of matches displayed.
%
%... |
github | jianxiongxiao/ProfXkit-master | points2normals.m | .m | ProfXkit-master/points2normals.m | 2,552 | utf_8 | dfc71c0533d195b17cabe47cc78b496b | function normals = points2normals(points)
% estimating a normal vector based on nearby 100 points
% points is 3 * n matrix for n points
if size(points,2)==3 && size(points,1)~=3
points = points';
end
normals = lsqnormest(points, 100);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
github | jianxiongxiao/ProfXkit-master | PCAvertex.m | .m | ProfXkit-master/obj2off/PCAvertex.m | 659 | utf_8 | 6c8fef996f6c810adad6b830ef0800e1 | function vmatOut = PCAvertex(vmat)
% vmat: 3xN
[C,V]= PCA(vmat(1:2,:),2);
Vproj = C'*vmat(1:2,:);
vmatOut = [Vproj;vmat(3,:)];
end
function [C,V]= PCA(data,num)
%data 300*N, C vector , V value
data(sum(isnan(data),2)>0,:)=[];
[~,N] = size(data);
mn ... |
github | jianxiongxiao/ProfXkit-master | read_wobj.m | .m | ProfXkit-master/obj2off/read_wobj.m | 14,369 | utf_8 | 1dac5218ab27b8c13898d49a05d9a637 | function OBJ=read_wobj(fullfilename)
% Read the objects from a Wavefront OBJ file
%
% OBJ=read_wobj(filename);
%
% OBJ struct containing:
%
% OBJ.vertices : Vertices coordinates
% OBJ.vertices_texture: Texture coordinates
% OBJ.vertices_normal : Normal vectors
% OBJ.vertices_point : Vertice data used for poi... |
github | jianxiongxiao/ProfXkit-master | quaternion.m | .m | ProfXkit-master/rectifyroom/quaternion.m | 85,196 | utf_8 | 2aebad0378f433bf4d26b837b20047a3 | classdef quaternion
% classdef quaternion, implements quaternion mathematics and 3D rotations
%
% Properties (SetAccess = protected):
% e(4,1) components, basis [1; i; j; k]: e(1) + i*e(2) + j*e(3) + k*e(4)
% i*j=k, j*i=-k, j*k=i, k*j=-i, k*i=j, i*k=-j, i*i = j*j = k*k = -1
%
% Constructors:
% q = quater... |
github | jianxiongxiao/ProfXkit-master | rectify.m | .m | ProfXkit-master/rectifyroom/rectify.m | 5,343 | utf_8 | 58bf71d96dbaac2764184242fe621b7e | function [Rtilt,R] = rectify(XYZ)
%% XYZ is HxWx3 matrix
% X = XYZ(:,:,1);Y = XYZ(:,:,2);Z = XYZ(:,:,3);
% XYZnew = Rtilt*[X(:),Y(:),Z(:)]'
[Rtilt,R,world_center] = dominantAxes([eye(3) zeros(3,1)],XYZ);
function [Rtilt,R,world_center] = dominantAxes(cameraRt, pts)
XYZ = pts;... |
github | jianxiongxiao/ProfXkit-master | points2normals.m | .m | ProfXkit-master/rectifyroom/points2normals.m | 2,551 | utf_8 | cffcb4a1ea7aa3af3e895f74f76491fa | function normals = points2normals(points)
% estimating a normal vector based on nearby 100 points
% points is 3 * n matrix for n points
if size(points,2)==3 && size(points,1)~=3
points = points';
end
normals = lsqnormest(points, 50);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
github | jianxiongxiao/ProfXkit-master | quaternion.m | .m | ProfXkit-master/depthImproveStructureIO/quaternion.m | 85,196 | utf_8 | 2aebad0378f433bf4d26b837b20047a3 | classdef quaternion
% classdef quaternion, implements quaternion mathematics and 3D rotations
%
% Properties (SetAccess = protected):
% e(4,1) components, basis [1; i; j; k]: e(1) + i*e(2) + j*e(3) + k*e(4)
% i*j=k, j*i=-k, j*k=i, k*j=-i, k*i=j, i*k=-j, i*i = j*j = k*k = -1
%
% Constructors:
% q = quater... |
github | jianxiongxiao/ProfXkit-master | rectify.m | .m | ProfXkit-master/depthImproveStructureIO/rectify.m | 5,343 | utf_8 | bd641fe58842594e88f1d3d86a1f5271 | function [Rtilt,R] = rectify(XYZ)
%% XYZ is HxWx3 matrix
% X = XYZ(:,:,1);Y = XYZ(:,:,2);Z = XYZ(:,:,3);
% XYZnew = Rtilt*[X(:),Y(:),Z(:)]'
[Rtilt,R,world_center] = dominantAxes([eye(3) zeros(3,1)],XYZ);
function [Rtilt,R,world_center] = dominantAxes(cameraRt, pts)
XYZ = pts;... |
github | jianxiongxiao/ProfXkit-master | loadStructureIOdata.m | .m | ProfXkit-master/depthImproveStructureIO/loadStructureIOdata.m | 1,696 | utf_8 | cfffdd283dc7a2322c9963dab946a95a | % Load data taken from Structure IO
function data = loadStructureIOdata(directory, frameIDs)
% Get image file list
imageFiles = dir(fullfile(directory, 'color', '*.jpg'));
depthFiles = dir(fullfile(directory, 'depth', '*.png'));
% Set default frames to go through
if length(frameIDs) == 0
frameIDs = 1:length(imag... |
github | jianxiongxiao/ProfXkit-master | loadSUN3Dv2.m | .m | ProfXkit-master/depthImproveStructureIO/loadSUN3Dv2.m | 4,264 | utf_8 | 200caa9bc4374066976ff436d05416b9 | function data = loadSUN3Dv2(sequenceName, frameIDs)
if ~exist('sequenceName','var')
sequenceName = '2014-04-29_14-39-49_094959634447';
end
SUN3Dpath = '/n/fs/sun3d/sun3dv2/';
%{
fileID = fopen(fullfile(SUN3Dpath,sequenceName,'image/time.dat'));
imageTimestamp = fread(fileID,'int64');
fclose(fileID);
data.image ... |
github | jianxiongxiao/ProfXkit-master | estimateRt.m | .m | ProfXkit-master/depthImproveStructureIO/estimateRt.m | 501 | utf_8 | d7ad6f4ea024b18ceb9915fec69b9a71 | % Usage: Rt = estimateRt(x1, x2)
% Rt = estimateRt(x)
%
% Arguments:
% x1, x2 - Two sets of corresponding 3xN set of homogeneous
% points.
%
% x - If a single argument is supplied it is assumed that it
% is in the form x = [x1; x2]
% Returns:
% ... |
github | jianxiongxiao/ProfXkit-master | get_depth.m | .m | ProfXkit-master/depthImproveStructureIO/get_depth.m | 131 | utf_8 | 8ee8bdf3980d7e82262719804012ca95 |
function depth = get_depth(depth)
depth = bitor(bitshift(depth,-3), bitshift(depth,16-3));
depth = double(depth)/1000;
end |
github | jianxiongxiao/ProfXkit-master | points2ply.m | .m | ProfXkit-master/depthImproveStructureIO/points2ply.m | 1,440 | utf_8 | aac4b7c6b547a9c026121d967f85a036 |
function points2ply(PLYfilename, coordinate, rgb)
% coordinate is 3 * n single matrix for n points
% rgb is 3 * n uint8 matrix for n points range [0, 255]
if size(coordinate,2)==3 && size(coordinate,1)~=3
coordinate = coordinate';
end
isValid = (~isnan(coordinate(1,:))) & (~is... |
github | jianxiongxiao/ProfXkit-master | undistort.m | .m | ProfXkit-master/depthImproveStructureIO/undistort.m | 4,632 | utf_8 | e1febb403e3759f567009ee0a0442cce | function x = undistort( xd, k, seed )
%[x] = undistort(xd, k)
%INPUT: xd: distorted (normalized) point coordinates in the image plane (2xN matrix)
% k: Distortion coefficients (radial and tangential) (5x1 vector)
% seed: (OPTIONAL) seed point corrdinates for undistortion
% optimization
% Written... |
github | jianxiongxiao/ProfXkit-master | points2normals.m | .m | ProfXkit-master/depthImproveStructureIO/points2normals.m | 2,551 | utf_8 | cffcb4a1ea7aa3af3e895f74f76491fa | function normals = points2normals(points)
% estimating a normal vector based on nearby 100 points
% points is 3 * n matrix for n points
if size(points,2)==3 && size(points,1)~=3
points = points';
end
normals = lsqnormest(points, 50);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
github | jianxiongxiao/ProfXkit-master | transformPointCloud.m | .m | ProfXkit-master/depthImproveStructureIO/transformPointCloud.m | 130 | utf_8 | ebf18e96a2a3d9ca20da267e9d345dcd |
function XYZtransform = transformPointCloud(XYZ,Rt)
XYZtransform = Rt(1:3,1:3) * XYZ + repmat(Rt(1:3,4),1,size(XYZ,2));
end
|
github | jianxiongxiao/ProfXkit-master | icp.m | .m | ProfXkit-master/depthImproveStructureIO/icp.m | 19,013 | utf_8 | 08b226a4c6ddc02c96cb999b6f8dc8fe | function [TR, TT, ER, maxD, t] = icp(q,p,varargin)
% this is modified version of the original version
%
% Perform the Iterative Closest Point algorithm on three dimensional point
% clouds.
%
% [TR, TT] = icp(q,p) returns the rotation matrix TR and translation
% vector TT that minimizes the distances from (TR * p + TT... |
github | jianxiongxiao/ProfXkit-master | ransacfitRt.m | .m | ProfXkit-master/depthImproveStructureIO/ransacfitRt.m | 2,888 | utf_8 | 738399412f806f9855724ff192fe4494 | % Usage: [Rt, inliers] = ransacfitRt(x1, x2, t)
%
% Arguments:
% x1 - 3xN set of 3D points.
% x2 - 3xN set of 3D points such that x1<->x2.
% t - The distance threshold between data point and the model
% used to decide whether a point is an inlier or not.
%
% Note that it ... |
github | jianxiongxiao/ProfXkit-master | show.m | .m | ProfXkit-master/depthImproveStructureIO/lib/peter/show.m | 4,944 | utf_8 | e2225be3d05b416c72fc6f1acbde02d0 | % SHOW - Displays an image with the right size and colors and with a title.
%
% Usage:
% h = show(im)
% h = show(im, figNo)
% h = show(im, title)
% h = show(im, figNo, title)
%
% Arguments: im - Either a 2 or 3D array of pixel values or the name
% of an image f... |
github | jianxiongxiao/ProfXkit-master | nonmaxsuppts.m | .m | ProfXkit-master/depthImproveStructureIO/lib/peter/nonmaxsuppts.m | 5,086 | utf_8 | 6d711b2f28fd3ea2543d59f3e89139b7 | % NONMAXSUPPTS - Non-maximal suppression for features/corners
%
% Non maxima suppression and thresholding for points generated by a feature
% or corner detector.
%
% Usage: [r,c] = nonmaxsuppts(cim, radius, thresh, im)
% /
% ... |
github | jianxiongxiao/ProfXkit-master | ransacfitfundmatrix.m | .m | ProfXkit-master/depthImproveStructureIO/lib/peter/ransacfitfundmatrix.m | 5,544 | utf_8 | b87d72c56902f27c573b6c545f6754ab | % RANSACFITFUNDMATRIX - fits fundamental matrix using RANSAC
%
% Usage: [F, inliers] = ransacfitfundmatrix(x1, x2, t)
%
% Arguments:
% x1 - 2xN or 3xN set of homogeneous points. If the data is
% 2xN it is assumed the homogeneous scale factor is 1.
% x2 - 2xN or 3xN set of homogeneo... |
github | jianxiongxiao/ProfXkit-master | matrix2quaternion.m | .m | ProfXkit-master/depthImproveStructureIO/lib/peter/matrix2quaternion.m | 2,010 | utf_8 | ad7a1983aceaa9953be167eddabb22ae | % MATRIX2QUATERNION - Homogeneous matrix to quaternion
%
% Converts 4x4 homogeneous rotation matrix to quaternion
%
% Usage: Q = matrix2quaternion(T)
%
% Argument: T - 4x4 Homogeneous transformation matrix
% Returns: Q - a quaternion in the form [w, xi, yj, zk]
%
% See Also QUATERNION2MATRIX
% Copyright (c) 2008 ... |
github | jianxiongxiao/ProfXkit-master | harris.m | .m | ProfXkit-master/depthImproveStructureIO/lib/peter/harris.m | 4,707 | utf_8 | 9123c3c21835dfa4d233abe149d6620d | % HARRIS - Harris corner detector
%
% Usage: cim = harris(im, sigma)
% [cim, r, c] = harris(im, sigma, thresh, radius, disp)
% [cim, r, c, rsubp, csubp] = harris(im, sigma, thresh, radius, disp)
%
% Arguments:
% im - image to be processed.
% sigma - standard... |
github | jianxiongxiao/ProfXkit-master | hnormalise.m | .m | ProfXkit-master/depthImproveStructureIO/lib/peter/hnormalise.m | 1,010 | utf_8 | 5c1ed3ba361fa6f28b1517af1924af40 | % HNORMALISE - Normalises array of homogeneous coordinates to a scale of 1
%
% Usage: nx = hnormalise(x)
%
% Argument:
% x - an Nxnpts array of homogeneous coordinates.
%
% Returns:
% nx - an Nxnpts array of homogeneous coordinates rescaled so
% that the scale values nx(N,:) are all 1.
%
... |
github | jianxiongxiao/ProfXkit-master | homography2d.m | .m | ProfXkit-master/depthImproveStructureIO/lib/peter/homography2d.m | 2,493 | utf_8 | 60985e0ab95fe690d769c83adff61080 | % HOMOGRAPHY2D - computes 2D homography
%
% Usage: H = homography2d(x1, x2)
% H = homography2d(x)
%
% Arguments:
% x1 - 3xN set of homogeneous points
% x2 - 3xN set of homogeneous points such that x1<->x2
%
% x - If a single argument is supplied it is assumed ... |
github | jianxiongxiao/ProfXkit-master | iscolinear.m | .m | ProfXkit-master/depthImproveStructureIO/lib/peter/iscolinear.m | 2,318 | utf_8 | 65025b7413f8f6b4cb16dd1689a5900f | % ISCOLINEAR - are 3 points colinear
%
% Usage: r = iscolinear(p1, p2, p3, flag)
%
% Arguments:
% p1, p2, p3 - Points in 2D or 3D.
% flag - An optional parameter set to 'h' or 'homog'
% indicating that p1, p2, p3 are homogneeous
% coordinates with arbitrary s... |
github | jianxiongxiao/ProfXkit-master | monofilt.m | .m | ProfXkit-master/depthImproveStructureIO/lib/peter/monofilt.m | 6,435 | utf_8 | 07ef46eb32d19a4d79e9ec304c6cb2d3 | % MONOFILT - Apply monogenic filters to an image to obtain 2D analytic signal
%
% Implementation of Felsberg's monogenic filters
%
% Usage: [f, h1f, h2f, A, theta, psi] = ...
% monofilt(im, nscale, minWaveLength, mult, sigmaOnf, orientWrap)
% 3 4 2 0.65 ... |
github | jianxiongxiao/ProfXkit-master | ransacfithomography.m | .m | ProfXkit-master/depthImproveStructureIO/lib/peter/ransacfithomography.m | 4,920 | utf_8 | d479d49f7c8e8689283005bcbe340b61 | % RANSACFITHOMOGRAPHY - fits 2D homography using RANSAC
%
% Usage: [H, inliers] = ransacfithomography(x1, x2, t)
%
% Arguments:
% x1 - 2xN or 3xN set of homogeneous points. If the data is
% 2xN it is assumed the homogeneous scale factor is 1.
% x2 - 2xN or 3xN set of homogeneous po... |
github | jianxiongxiao/ProfXkit-master | fundmatrix.m | .m | ProfXkit-master/depthImproveStructureIO/lib/peter/fundmatrix.m | 3,961 | utf_8 | 250dfa8051640daab30229f35667f4d6 | % FUNDMATRIX - computes fundamental matrix from 8 or more points
%
% Function computes the fundamental matrix from 8 or more matching points in
% a stereo pair of images. The normalised 8 point algorithm given by
% Hartley and Zisserman p265 is used. To achieve accurate results it is
% recommended that 12 or more poi... |
github | jianxiongxiao/ProfXkit-master | hline.m | .m | ProfXkit-master/depthImproveStructureIO/lib/peter/hline.m | 1,584 | utf_8 | 7887599478d2ebb7e50fdef565f8f3f5 | % HLINE - Plot 2D lines defined in homogeneous coordinates.
%
% Function for ploting 2D homogeneous lines defined by 2 points
% or a line defined by a single homogeneous vector
%
% Usage: hline(p1,p2) where p1 and p2 are 2D homogeneous points.
% hline(p1,p2,'colour_name') 'black' 'red' 'white' etc
% ... |
github | jianxiongxiao/ProfXkit-master | ransac.m | .m | ProfXkit-master/depthImproveStructureIO/lib/peter/ransac.m | 9,583 | utf_8 | f79cf643308f984914c65e4023a0ac9b | % RANSAC - Robustly fits a model to data with the RANSAC algorithm
%
% Usage:
%
% [M, inliers] = ransac(x, fittingfn, distfn, degenfn s, t, feedback, ...
% maxDataTrials, maxTrials)
%
% Arguments:
% x - Data sets to which we are seeking to fit a model M
% It is assumed ... |
github | jianxiongxiao/ProfXkit-master | gaussfilt.m | .m | ProfXkit-master/depthImproveStructureIO/lib/peter/gaussfilt.m | 892 | utf_8 | 266e718eee73f61a8bc07650565a1692 | % GAUSSFILT - Small wrapper function for convenient Gaussian filtering
%
% Usage: smim = gaussfilt(im, sigma)
%
% Arguments: im - Image to be smoothed.
% sigma - Standard deviation of Gaussian filter.
%
% Returns: smim - Smoothed image.
%
% See also: INTEGGAUSSFILT
% Peter Kovesi
% Centre for Explorti... |
github | jianxiongxiao/ProfXkit-master | derivative5.m | .m | ProfXkit-master/depthImproveStructureIO/lib/peter/derivative5.m | 4,808 | utf_8 | 989b39a3f681a8cad7375573fa1a7a0f | % DERIVATIVE5 - 5-Tap 1st and 2nd discrete derivatives
%
% This function computes 1st and 2nd derivatives of an image using the 5-tap
% coefficients given by Farid and Simoncelli. The results are significantly
% more accurate than MATLAB's GRADIENT function on edges that are at angles
% other than vertical or horizont... |
github | jianxiongxiao/ProfXkit-master | quaternion2matrix.m | .m | ProfXkit-master/depthImproveStructureIO/lib/peter/quaternion2matrix.m | 1,413 | utf_8 | 7296cadf62f6ca9273e726ffd7e19d95 | % QUATERNION2MATRIX - Quaternion to a 4x4 homogeneous transformation matrix
%
% Usage: T = quaternion2matrix(Q)
%
% Argument: Q - a quaternion in the form [w xi yj zk]
% Returns: T - 4x4 Homogeneous rotation matrix
%
% See also MATRIX2QUATERNION, NEWQUATERNION, QUATERNIONROTATE
% Copyright (c) 2008 Peter Kovesi
... |
github | jianxiongxiao/ProfXkit-master | matchbymonogenicphase.m | .m | ProfXkit-master/depthImproveStructureIO/lib/peter/matchbymonogenicphase.m | 9,328 | utf_8 | e63225faedcf391fb6411d27d71a208e | % MATCHBYMONOGENICPHASE - match image feature points using monogenic phase data
%
% Function generates putative matches between previously detected
% feature points in two images by looking for points that have minimal
% differences in monogenic phase data within windows surrounding each point.
% Only points that corre... |
github | jianxiongxiao/ProfXkit-master | normalise2dpts.m | .m | ProfXkit-master/depthImproveStructureIO/lib/peter/normalise2dpts.m | 2,361 | utf_8 | 2b9d94a3681186006a3fd47a45faf939 | % NORMALISE2DPTS - normalises 2D homogeneous points
%
% Function translates and normalises a set of 2D homogeneous points
% so that their centroid is at the origin and their mean distance from
% the origin is sqrt(2). This process typically improves the
% conditioning of any equations used to solve homographies, fun... |
github | jianxiongxiao/ProfXkit-master | hcross.m | .m | ProfXkit-master/depthImproveStructureIO/lib/peter/hcross.m | 919 | utf_8 | dbb3f3d4ef79e25ca3000ea976409e0c | % HCROSS - Homogeneous cross product, result normalised to s = 1.
%
% Function to form cross product between two points, or lines,
% in homogeneous coodinates. The result is normalised to lie
% in the scale = 1 plane.
%
% Usage: c = hcross(a,b)
%
% Copyright (c) 2000-2005 Peter Kovesi
% School of Computer Science & ... |
github | jianxiongxiao/ProfXkit-master | matchbycorrelation.m | .m | ProfXkit-master/depthImproveStructureIO/lib/peter/matchbycorrelation.m | 7,076 | utf_8 | 12d7e8d4ad6e140c94444ddc3682d518 | % MATCHBYCORRELATION - match image feature points by correlation
%
% Function generates putative matches between previously detected
% feature points in two images by looking for points that are maximally
% correlated with each other within windows surrounding each point.
% Only points that correlate most strongly with... |
github | jianxiongxiao/ProfXkit-master | vl_compile.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/vl_compile.m | 5,060 | utf_8 | 978f5189bb9b2a16db3368891f79aaa6 | function vl_compile(compiler)
% VL_COMPILE Compile VLFeat MEX files
% VL_COMPILE() uses MEX() to compile VLFeat MEX files. This command
% works only under Windows and is used to re-build problematic
% binaries. The preferred method of compiling VLFeat on both UNIX
% and Windows is through the provided Makefile... |
github | jianxiongxiao/ProfXkit-master | vl_noprefix.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/vl_noprefix.m | 1,875 | utf_8 | 97d8755f0ba139ac1304bc423d3d86d3 | function vl_noprefix
% VL_NOPREFIX Create a prefix-less version of VLFeat commands
% VL_NOPREFIX() creats prefix-less stubs for VLFeat functions
% (e.g. SIFT for VL_SIFT). This function is seldom used as the stubs
% are included in the VLFeat binary distribution anyways. Moreover,
% on UNIX platforms, the stub... |
github | jianxiongxiao/ProfXkit-master | vl_pegasos.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/misc/vl_pegasos.m | 2,837 | utf_8 | d5e0915c439ece94eb5597a07090b67d | % VL_PEGASOS [deprecated]
% VL_PEGASOS is deprecated. Please use VL_SVMTRAIN() instead.
function [w b info] = vl_pegasos(X,Y,LAMBDA, varargin)
% Verbose not supported
if (sum(strcmpi('Verbose',varargin)))
varargin(find(strcmpi('Verbose',varargin),1))=[];
fprintf('Option VERBOSE is no longer supported.\n');
en... |
github | jianxiongxiao/ProfXkit-master | vl_svmpegasos.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/misc/vl_svmpegasos.m | 1,178 | utf_8 | 009c2a2b87a375d529ed1a4dbe3af59f | % VL_SVMPEGASOS [deprecated]
% VL_SVMPEGASOS is deprecated. Please use VL_SVMTRAIN() instead.
function [w b info] = vl_svmpegasos(DATA,LAMBDA, varargin)
% Verbose not supported
if (sum(strcmpi('Verbose',varargin)))
varargin(find(strcmpi('Verbose',varargin),1))=[];
fprintf('Option VERBOSE is no longer suppor... |
github | jianxiongxiao/ProfXkit-master | vl_override.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/misc/vl_override.m | 4,654 | utf_8 | e233d2ecaeb68f56034a976060c594c5 | function config = vl_override(config,update,varargin)
% VL_OVERRIDE Override structure subset
% CONFIG = VL_OVERRIDE(CONFIG, UPDATE) copies recursively the fileds
% of the structure UPDATE to the corresponding fields of the
% struture CONFIG.
%
% Usually CONFIG is interpreted as a list of paramters with their
... |
github | jianxiongxiao/ProfXkit-master | vl_quickvis.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/quickshift/vl_quickvis.m | 3,696 | utf_8 | 27f199dad4c5b9c192a5dd3abc59f9da | function [Iedge dists map gaps] = vl_quickvis(I, ratio, kernelsize, maxdist, maxcuts)
% VL_QUICKVIS Create an edge image from a Quickshift segmentation.
% IEDGE = VL_QUICKVIS(I, RATIO, KERNELSIZE, MAXDIST, MAXCUTS) creates an edge
% stability image from a Quickshift segmentation. RATIO controls the tradeoff
% bet... |
github | jianxiongxiao/ProfXkit-master | vl_demo_aib.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/demo/vl_demo_aib.m | 2,928 | utf_8 | 590c6db09451ea608d87bfd094662cac | function vl_demo_aib
% VL_DEMO_AIB Test Agglomerative Information Bottleneck (AIB)
D = 4 ;
K = 20 ;
randn('state',0) ;
rand('state',0) ;
X1 = randn(2,300) ; X1(1,:) = X1(1,:) + 2 ;
X2 = randn(2,300) ; X2(1,:) = X2(1,:) - 2 ;
X3 = randn(2,300) ; X3(2,:) = X3(2,:) + 2 ;
figure(1) ; clf ; hold on ;
vl_plotframe(X... |
github | jianxiongxiao/ProfXkit-master | vl_demo_alldist.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/demo/vl_demo_alldist.m | 5,460 | utf_8 | 6d008a64d93445b9d7199b55d58db7eb | function vl_demo_alldist
%
numRepetitions = 3 ;
numDimensions = 1000 ;
numSamplesRange = [300] ;
settingsRange = {{'alldist2', 'double', 'l2', }, ...
{'alldist', 'double', 'l2', 'nosimd'}, ...
{'alldist', 'double', 'l2' }, ...
{'alldist2', 's... |
github | jianxiongxiao/ProfXkit-master | vl_demo_svm.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/demo/vl_demo_svm.m | 1,235 | utf_8 | 7cf6b3504e4fc2cbd10ff3fec6e331a7 | % VL_DEMO_SVM Demo: SVM: 2D linear learning
function vl_demo_svm
y=[];X=[];
% Load training data X and their labels y
load('vl_demo_svm_data.mat')
Xp = X(:,y==1);
Xn = X(:,y==-1);
figure
plot(Xn(1,:),Xn(2,:),'*r')
hold on
plot(Xp(1,:),Xp(2,:),'*b')
axis equal ;
vl_demo_print('svm_training') ;
% Parameters
lambda =... |
github | jianxiongxiao/ProfXkit-master | vl_demo_kdtree_sift.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/demo/vl_demo_kdtree_sift.m | 6,832 | utf_8 | e676f80ac330a351f0110533c6ebba89 | function vl_demo_kdtree_sift
% VL_DEMO_KDTREE_SIFT
% Demonstrates the use of a kd-tree forest to match SIFT
% features. If FLANN is present, this function runs a comparison
% against it.
% AUTORIGHS
rand('state',0) ;
randn('state',0);
do_median = 0 ;
do_mean = 1 ;
% try to setup flann
if ~exist('flann_search'... |
github | jianxiongxiao/ProfXkit-master | vl_impattern.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/imop/vl_impattern.m | 6,876 | utf_8 | 1716a4d107f0186be3d11c647bc628ce | function im = vl_impattern(varargin)
% VL_IMPATTERN Generate an image from a stock pattern
% IM=VLPATTERN(NAME) returns an instance of the specified
% pattern. These stock patterns are useful for testing algoirthms.
%
% All generated patterns are returned as an image of class
% DOUBLE. Both gray-scale and colou... |
github | jianxiongxiao/ProfXkit-master | vl_tpsu.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/imop/vl_tpsu.m | 1,755 | utf_8 | 09f36e1a707c069b375eb2817d0e5f13 | function [U,dU,delta]=vl_tpsu(X,Y)
% VL_TPSU Compute the U matrix of a thin-plate spline transformation
% U=VL_TPSU(X,Y) returns the matrix
%
% [ U(|X(:,1) - Y(:,1)|) ... U(|X(:,1) - Y(:,N)|) ]
% [ ]
% [ U(|X(:,M) - Y(:,1)|) ... U(|X(:,M) - Y(:,N)|) ]
%
% where X... |
github | jianxiongxiao/ProfXkit-master | vl_xyz2lab.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/imop/vl_xyz2lab.m | 1,570 | utf_8 | 09f95a6f9ae19c22486ec1157357f0e3 | function J=vl_xyz2lab(I,il)
% VL_XYZ2LAB Convert XYZ color space to LAB
% J = VL_XYZ2LAB(I) converts the image from XYZ format to LAB format.
%
% VL_XYZ2LAB(I,IL) uses one of the illuminants A, B, C, E, D50, D55,
% D65, D75, D93. The default illuminatn is E.
%
% See also: VL_XYZ2LUV(), VL_HELP().
% Copyright ... |
github | jianxiongxiao/ProfXkit-master | vl_test_gmm.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_gmm.m | 1,332 | utf_8 | 76782cae6c98781c6c38d4cbf5549d94 | function results = vl_test_gmm(varargin)
% VL_TEST_GMM
% Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson.
% All rights reserved.
%
% This file is part of the VLFeat library and is made available under
% the terms of the BSD license (see the COPYING file).
vl_test_init ;
end
function s = setup()
randn('st... |
github | jianxiongxiao/ProfXkit-master | vl_test_twister.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_twister.m | 1,251 | utf_8 | 2bfb5a30cbd6df6ac80c66b73f8646da | function results = vl_test_twister(varargin)
% VL_TEST_TWISTER
vl_test_init ;
function test_illegal_args()
vl_assert_exception(@() vl_twister(-1), 'vl:invalidArgument') ;
vl_assert_exception(@() vl_twister(1, -1), 'vl:invalidArgument') ;
vl_assert_exception(@() vl_twister([1, -1]), 'vl:invalidArgument') ;
function te... |
github | jianxiongxiao/ProfXkit-master | vl_test_kdtree.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_kdtree.m | 2,449 | utf_8 | 9d7ad2b435a88c22084b38e5eb5f9eb9 | function results = vl_test_kdtree(varargin)
% VL_TEST_KDTREE
vl_test_init ;
function s = setup()
randn('state',0) ;
s.X = single(randn(10, 1000)) ;
s.Q = single(randn(10, 10)) ;
function test_nearest(s)
for tmethod = {'median', 'mean'}
for type = {@single, @double}
conv = type{1} ;
tmethod = char(tmethod) ;... |
github | jianxiongxiao/ProfXkit-master | vl_test_imwbackward.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_imwbackward.m | 514 | utf_8 | 33baa0784c8f6f785a2951d7f1b49199 | function results = vl_test_imwbackward(varargin)
% VL_TEST_IMWBACKWARD
vl_test_init ;
function s = setup()
s.I = im2double(imread(fullfile(vl_root,'data','spots.jpg'))) ;
function test_identity(s)
xr = 1:size(s.I,2) ;
yr = 1:size(s.I,1) ;
[x,y] = meshgrid(xr,yr) ;
vl_assert_almost_equal(s.I, vl_imwbackward(xr,yr,s.I,... |
github | jianxiongxiao/ProfXkit-master | vl_test_alphanum.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_alphanum.m | 1,624 | utf_8 | 2da2b768c2d0f86d699b8f31614aa424 | function results = vl_test_alphanum(varargin)
% VL_TEST_ALPHANUM
vl_test_init ;
function s = setup()
s.strings = ...
{'1000X Radonius Maximus','10X Radonius','200X Radonius','20X Radonius','20X Radonius Prime','30X Radonius','40X Radonius','Allegia 50 Clasteron','Allegia 500 Clasteron','Allegia 50B Clasteron','Al... |
github | jianxiongxiao/ProfXkit-master | vl_test_printsize.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_printsize.m | 1,447 | utf_8 | 0f0b6437c648b7a2e1310900262bd765 | function results = vl_test_printsize(varargin)
% VL_TEST_PRINTSIZE
vl_test_init ;
function s = setup()
s.fig = figure(1) ;
s.usletter = [8.5, 11] ; % inches
s.a4 = [8.26772, 11.6929] ;
clf(s.fig) ; plot(1:10) ;
function teardown(s)
close(s.fig) ;
function test_basic(s)
for sigma = [1 0.5 0.2]
vl_printsize(s.fig, s... |
github | jianxiongxiao/ProfXkit-master | vl_test_cummax.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_cummax.m | 762 | utf_8 | 3dddb5736dfffacdd94b156e67cb9c14 | function results = vl_test_cummax(varargin)
% VL_TEST_CUMMAX
vl_test_init ;
function test_basic()
vl_assert_almost_equal(...
vl_cummax(1), 1) ;
vl_assert_almost_equal(...
vl_cummax([1 2 3 4], 2), [1 2 3 4]) ;
function test_multidim()
a = [1 2 3 4 3 2 1] ;
b = [1 2 3 4 4 4 4] ;
for k=1:6
dims = ones(1,6) ;
dim... |
github | jianxiongxiao/ProfXkit-master | vl_test_imintegral.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_imintegral.m | 1,429 | utf_8 | 4750f04ab0ac9fc4f55df2c8583e5498 | function results = vl_test_imintegral(varargin)
% VL_TEST_IMINTEGRAL
vl_test_init ;
function state = setup()
state.I = ones(5,6) ;
state.correct = [ 1 2 3 4 5 6 ;
2 4 6 8 10 12 ;
3 6 9 12 15 18 ;
4 8 12 ... |
github | jianxiongxiao/ProfXkit-master | vl_test_sift.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_sift.m | 1,318 | utf_8 | 806c61f9db9f2ebb1d649c9bfcf3dc0a | function results = vl_test_sift(varargin)
% VL_TEST_SIFT
vl_test_init ;
function s = setup()
s.I = im2single(imread(fullfile(vl_root,'data','box.pgm'))) ;
[s.ubc.f, s.ubc.d] = ...
vl_ubcread(fullfile(vl_root,'data','box.sift')) ;
function test_ubc_descriptor(s)
err = [] ;
[f, d] = vl_sift(s.I,...
... |
github | jianxiongxiao/ProfXkit-master | vl_test_binsum.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_binsum.m | 1,301 | utf_8 | 5bbd389cbc4d997e413d809fe4efda6d | function results = vl_test_binsum(varargin)
% VL_TEST_BINSUM
vl_test_init ;
function test_three_args()
vl_assert_almost_equal(...
vl_binsum([0 0], 1, 2), [0 1]) ;
vl_assert_almost_equal(...
vl_binsum([1 7], -1, 1), [0 7]) ;
vl_assert_almost_equal(...
vl_binsum([1 7], -1, [1 2 2 2 2 2 2 2]), [0 0]) ;
function te... |
github | jianxiongxiao/ProfXkit-master | vl_test_lbp.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_lbp.m | 1,056 | utf_8 | 3b5cca50109af84014e56a4280a3352a | function results = vl_test_lbp(varargin)
% VL_TEST_TWISTER
vl_test_init ;
function test_one_on()
I = {} ;
I{1} = [0 0 0 ; 0 0 1 ; 0 0 0] ;
I{2} = [0 0 0 ; 0 0 0 ; 0 0 1] ;
I{3} = [0 0 0 ; 0 0 0 ; 0 1 0] ;
I{4} = [0 0 0 ; 0 0 0 ; 1 0 0] ;
I{5} = [0 0 0 ; 1 0 0 ; 0 0 0] ;
I{6} = [1 0 0 ; 0 0 0 ; 0 0 0] ;
I{7} = [0 1 0 ;... |
github | jianxiongxiao/ProfXkit-master | vl_test_colsubset.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_colsubset.m | 828 | utf_8 | be0c080007445b36333b863326fb0f15 | function results = vl_test_colsubset(varargin)
% VL_TEST_COLSUBSET
vl_test_init ;
function s = setup()
s.x = [5 2 3 6 4 7 1 9 8 0] ;
function test_beginning(s)
vl_assert_equal(1:5, vl_colsubset(1:10, 5, 'beginning')) ;
vl_assert_equal(1:5, vl_colsubset(1:10, .5, 'beginning')) ;
function test_ending(s)
vl_assert_equa... |
github | jianxiongxiao/ProfXkit-master | vl_test_alldist.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_alldist.m | 2,373 | utf_8 | 9ea1a36c97fe715dfa2b8693876808ff | function results = vl_test_alldist(varargin)
% VL_TEST_ALLDIST
vl_test_init ;
function s = setup()
vl_twister('state', 0) ;
s.X = 3.1 * vl_twister(10,10) ;
s.Y = 4.7 * vl_twister(10,7) ;
function test_null_args(s)
vl_assert_equal(...
vl_alldist(zeros(15,12), zeros(15,0), 'kl2'), ...
zeros(12,0)) ;
vl_assert_equa... |
github | jianxiongxiao/ProfXkit-master | vl_test_ihashsum.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_ihashsum.m | 581 | utf_8 | edc283062469af62056b0782b171f5fc | function results = vl_test_ihashsum(varargin)
% VL_TEST_IHASHSUM
vl_test_init ;
function s = setup()
rand('state',0) ;
s.data = uint8(round(16*rand(2,100))) ;
sel = find(all(s.data==0)) ;
s.data(1,sel)=1 ;
function test_hash(s)
D = size(s.data,1) ;
K = 5 ;
h = zeros(1,K,'uint32') ;
id = zeros(D,K,'uint8');
next = zer... |
github | jianxiongxiao/ProfXkit-master | vl_test_grad.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_grad.m | 434 | utf_8 | 4d03eb33a6a4f68659f868da95930ffb | function results = vl_test_grad(varargin)
% VL_TEST_GRAD
vl_test_init ;
function s = setup()
s.I = rand(150,253) ;
s.I_small = rand(2,2) ;
function test_equiv(s)
vl_assert_equal(gradient(s.I), vl_grad(s.I)) ;
function test_equiv_small(s)
vl_assert_equal(gradient(s.I_small), vl_grad(s.I_small)) ;
function test_equiv... |
github | jianxiongxiao/ProfXkit-master | vl_test_whistc.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_whistc.m | 1,384 | utf_8 | 81c446d35c82957659840ab2a579ec2c | function results = vl_test_whistc(varargin)
% VL_TEST_WHISTC
vl_test_init ;
function test_acc()
x = ones(1, 10) ;
e = 1 ;
o = 1:10 ;
vl_assert_equal(vl_whistc(x, o, e), 55) ;
function test_basic()
x = 1:10 ;
e = 1:10 ;
o = ones(1, 10) ;
vl_assert_equal(histc(x, e), vl_whistc(x, o, e)) ;
x = linspace(-1,11,100) ;
o =... |
github | jianxiongxiao/ProfXkit-master | vl_test_roc.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_roc.m | 1,019 | utf_8 | 9b2ae71c9dc3eda0fc54c65d55054d0c | function results = vl_test_roc(varargin)
% VL_TEST_ROC
vl_test_init ;
function s = setup()
s.scores0 = [5 4 3 2 1] ;
s.scores1 = [5 3 4 2 1] ;
s.labels = [1 1 -1 -1 -1] ;
function test_perfect_tptn(s)
[tpr,tnr] = vl_roc(s.labels,s.scores0) ;
vl_assert_almost_equal(tpr, [0 1 2 2 2 2] / 2) ;
vl_assert_almost_equal(tnr,... |
github | jianxiongxiao/ProfXkit-master | vl_test_dsift.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_dsift.m | 2,048 | utf_8 | fbbfb16d5a21936c1862d9551f657ccc | function results = vl_test_dsift(varargin)
% VL_TEST_DSIFT
vl_test_init ;
function s = setup()
I = im2double(imread(fullfile(vl_root,'data','spots.jpg'))) ;
s.I = rgb2gray(single(I)) ;
function test_fast_slow(s)
binSize = 4 ; % bin size in pixels
magnif = 3 ; % bin size / keypoint scale
scale = binSize... |
github | jianxiongxiao/ProfXkit-master | vl_test_alldist2.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_alldist2.m | 2,284 | utf_8 | 89a787e3d83516653ae8d99c808b9d67 | function results = vl_test_alldist2(varargin)
% VL_TEST_ALLDIST
vl_test_init ;
% TODO: test integer classes
function s = setup()
vl_twister('state', 0) ;
s.X = 3.1 * vl_twister(10,10) ;
s.Y = 4.7 * vl_twister(10,7) ;
function test_null_args(s)
vl_assert_equal(...
vl_alldist2(zeros(15,12), zeros(15,0), 'kl2'), ...
... |
github | jianxiongxiao/ProfXkit-master | vl_test_fisher.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_fisher.m | 1,703 | utf_8 | 41b28dce7f0d0ae5cb6abd942acbef56 | function results = vl_test_fisher(varargin)
% VL_TEST_FISHER
vl_test_init ;
function s = setup()
randn('state',0) ;
dimension = 5 ;
numData = 21 ;
numComponents = 3 ;
s.x = randn(dimension,numData) ;
s.mu = randn(dimension,numComponents) ;
s.sigma2 = ones(dimension,numComponents) ;
s.prior = ones(1,numComponents) ;
s... |
github | jianxiongxiao/ProfXkit-master | vl_test_imsmooth.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_imsmooth.m | 1,837 | utf_8 | 718235242cad61c9804ba5e881c22f59 | function results = vl_test_imsmooth(varargin)
% VL_TEST_IMSMOOTH
vl_test_init ;
function s = setup()
I = im2double(imread(fullfile(vl_root,'data','spots.jpg'))) ;
I = max(min(vl_imdown(I),1),0) ;
s.I = single(I) ;
function test_pad_by_continuity(s)
% Convolving a constant signal padded with continuity does not change... |
github | jianxiongxiao/ProfXkit-master | vl_test_svmtrain.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_svmtrain.m | 4,277 | utf_8 | 071b7c66191a22e8236fda16752b27aa | function results = vl_test_svmtrain(varargin)
% VL_TEST_SVMTRAIN
vl_test_init ;
end
function s = setup()
randn('state',0) ;
Np = 10 ;
Nn = 10 ;
xp = diag([1 3])*randn(2, Np) ;
xn = diag([1 3])*randn(2, Nn) ;
xp(1,:) = xp(1,:) + 2 + 1 ;
xn(1,:) = xn(1,:) - 2 + 1 ;
s.x = [xp xn] ;
s.y = [ones(1,Np) ... |
github | jianxiongxiao/ProfXkit-master | vl_test_phow.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_phow.m | 549 | utf_8 | f761a3bb218af855986263c67b2da411 | function results = vl_test_phow(varargin)
% VL_TEST_PHOPW
vl_test_init ;
function s = setup()
s.I = im2double(imread(fullfile(vl_root,'data','spots.jpg'))) ;
s.I = single(s.I) ;
function test_gray(s)
[f,d] = vl_phow(s.I, 'color', 'gray') ;
assert(size(d,1) == 128) ;
function test_rgb(s)
[f,d] = vl_phow(s.I, 'color',... |
github | jianxiongxiao/ProfXkit-master | vl_test_kmeans.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_kmeans.m | 3,632 | utf_8 | 719f7fca81e19eed5cc45c2ca251aad0 | function results = vl_test_kmeans(varargin)
% VL_TEST_KMEANS
% Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson.
% All rights reserved.
%
% This file is part of the VLFeat library and is made available under
% the terms of the BSD license (see the COPYING file).
vl_test_init ;
function s = setup()
randn('sta... |
github | jianxiongxiao/ProfXkit-master | vl_test_hikmeans.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_hikmeans.m | 463 | utf_8 | dc3b493646e66316184e86ff4e6138ab | function results = vl_test_hikmeans(varargin)
% VL_TEST_IKMEANS
vl_test_init ;
function s = setup()
rand('state',0) ;
s.data = uint8(rand(2,1000) * 255) ;
function test_basic(s)
[tree, assign] = vl_hikmeans(s.data,3,100) ;
assign_ = vl_hikmeanspush(tree, s.data) ;
vl_assert_equal(assign,assign_) ;
function test_elka... |
github | jianxiongxiao/ProfXkit-master | vl_test_aib.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_aib.m | 1,277 | utf_8 | 78978ae54e7ebe991d136336ba4bf9c6 | function results = vl_test_aib(varargin)
% VL_TEST_AIB
vl_test_init ;
function s = setup()
s = [] ;
function test_basic(s)
Pcx = [.3 .3 0 0
0 0 .2 .2] ;
% This results in the AIB tree
%
% 1 - \
% 5 - \
% 2 - / \
% - 7
% 3 - \ /
% 6 - /
% 4 - /
%
% coded by the map [5 ... |
github | jianxiongxiao/ProfXkit-master | vl_test_plotbox.m | .m | ProfXkit-master/depthImproveStructureIO/lib/vlfeat/toolbox/xtest/vl_test_plotbox.m | 414 | utf_8 | aa06ce4932a213fb933bbede6072b029 | function results = vl_test_plotbox(varargin)
% VL_TEST_PLOTBOX
vl_test_init ;
function test_basic(s)
figure(1) ; clf ;
vl_plotbox([-1 -1 1 1]') ;
xlim([-2 2]) ;
ylim([-2 2]) ;
close(1) ;
function test_multiple(s)
figure(1) ; clf ;
randn('state', 0) ;
vl_plotbox(randn(4,10)) ;
close(1) ;
function test_style(s)
figure... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.