source: trunk/src/toolbox_calib/is3D.m @ 919

Last change on this file since 919 was 908, checked in by g7moreau, 9 years ago
  • Update Copyright to 2015
File size: 1.1 KB
Line 
1%=======================================================================
2% Copyright 2008-2015, LEGI UMR 5519 / CNRS UJF G-INP, Grenoble, France
3%   http://www.legi.grenoble-inp.fr
4%   Joel.Sommeria - Joel.Sommeria (A) legi.cnrs.fr
5%
6%     This file is part of the toolbox UVMAT.
7%
8%     UVMAT is free software; you can redistribute it and/or modify
9%     it under the terms of the GNU General Public License as published
10%     by the Free Software Foundation; either version 2 of the license,
11%     or (at your option) any later version.
12%
13%     UVMAT is distributed in the hope that it will be useful,
14%     but WITHOUT ANY WARRANTY; without even the implied warranty of
15%     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16%     GNU General Public License (see LICENSE.txt) for more details.
17%=======================================================================
18
19function test = is3D(X),
20
21
22Np = size(X,2);
23
24%% Check for planarity of the structure:
25
26X_mean = mean(X')';
27
28Y = X - (X_mean*ones(1,Np));
29
30YY = Y*Y';
31
32[U,S,V] = svd(YY);
33
34r = S(3,3)/S(2,2);
35
36test = (r > 1e-3);
37
Note: See TracBrowser for help on using the repository browser.