with '#' will be ignored, and an empty message aborts the commit.
On branch master
Your branch is up to date with 'origin/master'.
Changes to be committed:
modified: hostdepend/ARM64MAC64
modified: include/Matrix3D.h
modified: src/Objects/General/Matrix3D/doc/Matrix3D.html
modified: src/Objects/General/Matrix3D/inc/Matrix3D.h
modified: src/Objects/General/Matrix3D/src/matrix3DUtil.c
modified: src/Tools/Config/Define.inc
modified: src/Tools/eosPoint/eosPointICP/Config/OptionControlFile
modified: src/Tools/eosPoint/eosPointICP/inc/eosPointICP.h
modified: src/Tools/eosPoint/eosPointICP/src/argCheck.c
modified: src/Tools/eosPoint/eosPointICP/src/eosPointICP.c
modified: src/Tools/eosPoint/eosPointICP/src/eosPointICP.html
modified: src/Tools/eosPoint/eosPointICP/src/eosPointICP.pane
modified: src/Tools/eosPoint/eosPointICP/src/init.c
modified: src/Tools/eosPoint/eosPointICP/src/usage.c
Changes not staged for commit:
modified: hostdepend/ARM64MAC64 (new commits)
modified: include/eosMATH.h
-Subproject commit 92a934bf811f81116e570020ea58fb27ebc2b2f0
+Subproject commit 7ebda9ed2e21a84121c743deccecaf54165f3f59
extern void matrix3DRotationAntiSetFollowingEulerAngle(Matrix3D Matrix, const char Mode[4], matrix3DParaTypeReal rot1, matrix3DParaTypeReal rot2, matrix3DParaTypeReal rot3, long mode);
extern void matrix3DEulerAngleGetFromMatrix3D(Matrix3D Matrix, const char Mode[4], matrix3DParaTypeReal* rot1, matrix3DParaTypeReal* rot2, matrix3DParaTypeReal* rot3, long mode);
+/*
+*/
+extern void matrix3DScale(Matrix3D, double ratio);
/* prototype end */
extern void matrix3DRotationAntiSetFollowingEulerAngle(Matrix3D Matrix, const char Mode[4], matrix3DParaTypeReal rot1, matrix3DParaTypeReal rot2, matrix3DParaTypeReal rot3, long mode);
extern void matrix3DEulerAngleGetFromMatrix3D(Matrix3D Matrix, const char Mode[4], matrix3DParaTypeReal* rot1, matrix3DParaTypeReal* rot2, matrix3DParaTypeReal* rot3, long mode);
+/*
+*/
+extern void matrix3DScale(Matrix3D, double ratio);
/* prototype end */
extern void matrix3DRotationAntiSetFollowingEulerAngle(Matrix3D Matrix, const char Mode[4], matrix3DParaTypeReal rot1, matrix3DParaTypeReal rot2, matrix3DParaTypeReal rot3, long mode);
extern void matrix3DEulerAngleGetFromMatrix3D(Matrix3D Matrix, const char Mode[4], matrix3DParaTypeReal* rot1, matrix3DParaTypeReal* rot2, matrix3DParaTypeReal* rot3, long mode);
+/*
+*/
+extern void matrix3DScale(Matrix3D, double ratio);
/* prototype end */
}
void
+matrix3DScale(Matrix3D mat, double ratio)
+{
+ int i, j;
+
+ for(i=0; i<4; i++) {
+ for(j=0; j<4; j++) {
+ mat[i][j] *= ratio;
+ }
+ }
+}
+
+void
matrix3DInverse(Matrix3D mat)
{
int i, j;
WORLDNAME=Tools
WORLDNAME=Tools
WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
# FileFormat
"-i","-i[nput]","Input: eosPoint","Essential","1","1","In","inFile","NULL"
"-it","-i[nput]t[ype]","eosPointType","Optional","1","1","InType","Integer","2"
+"-iMat","-i[nput]Mat[rix]","Input: Matrix3D for initial","Optional","1","1","InMat","inFile","NULL"
"-r","-r[eference]","Input: esoPoint","Essential","1","1","Ref","inFile","NULL"
"-rt","-r[eference]t[ype]","Input: esoPoint","Optional","1","1","RefType","Integer","2"
+"-rMat","-r[eference]Mat[rix]","Input: Matrix3D for initial","Optional","1","1","RefMat","inFile","NULL"
"-o","-o[utput]","OutputDataFile","Essential","1","1","Out","outFile","NULL"
"-ot","-o[utput]t[ype]","OutputDataFile","Essential","1","1","OutType","Integer","2"
-"-c","-c[onfig]","ConfigurationFile","Optional","1","1","configFile","inFile","NULL"
"-EAMode","-EAMode","Euler Angle","Optional","1","1","EAMode","String","ZEYS"
+"-R","-R[atio]","Mag","Optional","1","1","Ratio","Real","1.0"
"-Iter","-Iter[ationLimit]","IteretionLimit","Optional","1","1","IterationLimit","Integer","10000"
"-Pattern","-Pattern","Pickup Pattern","Optional","1","1","Pattern","Integer","10"
"-Thres","-Thres[hold]","Threshold","Optional","1","1","ScoreThreshold","Real","0.0"
"-Pick","-Pick[upPercent]","Pickup Percent","Optional","1","1","Pickup","Real","0.8"
+"-debug","-debug","Debug Mode","Optional","1","1","Debug","Integer","0"
"-m","-m[ode]","Mode","Optional","1","1","mode","Integer","0"
+"-c","-c[onfig]","ConfigurationFile","Optional","1","1","configFile","inFile","NULL"
long flagInType;
long InType;
+ long flagInMat;
+ char* InMat;
+ FILE* fptInMat;
+
long flagRef;
char* Ref;
FILE* fptRef;
long flagRefType;
long RefType;
+ long flagRefMat;
+ char* RefMat;
+ FILE* fptRefMat;
+
long flagOut;
char* Out;
FILE* fptOut;
long flagOutType;
long OutType;
- long flagconfigFile;
- char* configFile;
- FILE* fptconfigFile;
-
long flagEAMode;
char* EAMode;
+ long flagRatio;
+ float Ratio;
+
long flagIterationLimit;
long IterationLimit;
long flagPickup;
float Pickup;
+ long flagDebug;
+ long Debug;
+
long flagmode;
long mode;
+ long flagconfigFile;
+ char* configFile;
+ FILE* fptconfigFile;
+
} eosPointICPInfo;
#ifdef __cplusplus
extern "C" {
}
SBREAK;
}
+ SCASE("iMat") {
+ if(i+1<argc) {
+ info->InMat = stringGetNthWord(argv[i+1], 1, " ,");
+ i++;
+ info->flagInMat++;
+ } else {
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ }
+ SBREAK;
+ }
SCASE("r") {
if(i+1<argc) {
info->Ref = stringGetNthWord(argv[i+1], 1, " ,");
}
SBREAK;
}
+ SCASE("rMat") {
+ if(i+1<argc) {
+ info->RefMat = stringGetNthWord(argv[i+1], 1, " ,");
+ i++;
+ info->flagRefMat++;
+ } else {
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ }
+ SBREAK;
+ }
SCASE("o") {
if(i+1<argc) {
info->Out = stringGetNthWord(argv[i+1], 1, " ,");
}
SBREAK;
}
- SCASE("c") {
+ SCASE("EAMode") {
if(i+1<argc) {
- info->configFile = stringGetNthWord(argv[i+1], 1, " ,");
+ info->EAMode = stringGetNthWord(argv[i+1], 1, " ,");
i++;
- info->flagconfigFile++;
+ info->flagEAMode++;
} else {
usage(argv[0]);
exit(EXIT_FAILURE);
}
SBREAK;
}
- SCASE("EAMode") {
+ SCASE("R") {
if(i+1<argc) {
- info->EAMode = stringGetNthWord(argv[i+1], 1, " ,");
+ info->Ratio = stringGetNthRealData(argv[i+1], 1, " ,");
i++;
- info->flagEAMode++;
+ info->flagRatio++;
} else {
usage(argv[0]);
exit(EXIT_FAILURE);
}
SBREAK;
}
+ SCASE("debug") {
+ if(i+1<argc) {
+ info->Debug = stringGetNthIntegerData(argv[i+1], 1, " ,");
+ i++;
+ info->flagDebug++;
+ } else {
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ }
+ SBREAK;
+ }
SCASE("m") {
if(i+1<argc) {
info->mode = stringGetNthIntegerData(argv[i+1], 1, " ,");
}
SBREAK;
}
+ SCASE("c") {
+ if(i+1<argc) {
+ info->configFile = stringGetNthWord(argv[i+1], 1, " ,");
+ i++;
+ info->flagconfigFile++;
+ } else {
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ }
+ SBREAK;
+ }
SCASE("h") {
usage(argv[0]);
exit(EXIT_SUCCESS);
#define DEBUG
+static int __debug_mode__=0;
+
/*
Example:
typedef struct leosPointICPInfo {
int cnt_in_point, cnt_ref_point;
eosPoint inP, refP, pickup_inP;
eosPointIcpResult icp_result_set, best_icp_result_set;
+ Matrix3D inMat;
+ Matrix3D refMat;
init0(&info);
argCheck(&info, argc, argv);
init1(&info);
DEBUGPRINT("Program Start\n");
+ __debug_mode__ = info.Debug;
eosPointRead(info.fptIn, &inP, info.InType);
+ if(1<=__debug_mode__) {
+ eosPointWrite(stderr, &inP, info.InType);
+ }
+ matrix3DInit(inMat);
+ if(info.flagInMat) {
+ matrix3DFileRead(info.fptInMat, inMat);
+ }
+ if(info.flagRatio) {
+ matrix3DScale(inMat, info.Ratio);
+ }
+ eosPointRotate(&inP, inMat);
+
+ if(1<=__debug_mode__) {
+ eosPointWrite(stderr, &inP, info.InType);
+ }
+
eosPointRead(info.fptRef, &refP, info.RefType);
+ matrix3DInit(refMat);
+ if(info.flagRefMat) {
+ matrix3DFileRead(info.fptRefMat, refMat);
+ }
+ if(info.flagRatio) {
+ matrix3DScale(refMat, info.Ratio);
+ }
+ eosPointRotate(&refP, refMat);
matrix3DInit(icp_result_set.matrix);
matrix3DInit(best_icp_result_set.matrix);
Options:
[-i[nput] In (NULL ).as(inFile ) ] :Essential :Input: eosPoint
[-i[nput]t[ype] InType (2 ).as(Integer ) ] :Optional :eosPointType
+ [-i[nput]Mat[rix] InMat (NULL ).as(inFile ) ] :Optional :Input: Matrix3D for initial
[-r[eference] Ref (NULL ).as(inFile ) ] :Essential :Input: esoPoint
[-r[eference]t[ype] RefType (2 ).as(Integer ) ] :Optional :Input: esoPoint
+ [-r[eference]Mat[rix]RefMat (NULL ).as(inFile ) ] :Optional :Input: Matrix3D for initial
[-o[utput] Out (NULL ).as(outFile ) ] :Essential :OutputDataFile
[-o[utput]t[ype] OutType (2 ).as(Integer ) ] :Essential :OutputDataFile
- [-c[onfig] configFile (NULL ).as(inFile ) ] :Optional :ConfigurationFile
[-EAMode EAMode (ZEYS ).as(String ) ] :Optional :Euler Angle
+ [-R[atio] Ratio (1.0 ).as(Real ) ] :Optional :Mag
[-Iter[ationLimit] IterationLimit (10000 ).as(Integer ) ] :Optional :IteretionLimit
[-Pattern Pattern (10 ).as(Integer ) ] :Optional :Pickup Pattern
[-Thres[hold] ScoreThreshold (0.0 ).as(Real ) ] :Optional :Threshold
[-Pick[upPercent] Pickup (0.8 ).as(Real ) ] :Optional :Pickup Percent
+ [-debug Debug (0 ).as(Integer ) ] :Optional :Debug Mode
[-m[ode] mode (0 ).as(Integer ) ] :Optional :Mode
+ [-c[onfig] configFile (NULL ).as(inFile ) ] :Optional :ConfigurationFile
----- Additional Usage -----
eosPointFormat
type-0: x y z
-Q 1 0 5.25x1+47+0 'Close'
-I 1 0 1 1 0 1 -1x1+1+1.500000 ' ' 'In' 'Input: eosPoint' i
-i 1 0 1 0 0 -1x1+1+3.000000 0 0 2 0 0 'InType' 'eosPointType' it
- -I 1 0 1 1 0 1 -1x1+1+4.500000 ' ' 'Ref' 'Input: esoPoint' r
- -i 1 0 1 0 0 -1x1+1+6.000000 0 0 2 0 0 'RefType' 'Input: esoPoint' rt
- -O 1 0 1 1 0 1 -1x1+1+7.500000 ' ' 'Out' 'OutputDataFile' o
- -i 1 0 1 1 0 -1x1+1+9.000000 0 0 2 0 0 'OutType' 'OutputDataFile' ot
- -I 1 0 1 0 0 1 -1x1+1+10.500000 ' ' 'configFile' 'ConfigurationFile' c
- -s 1 0 1 0 0 -1x1+1+12.000000 0 0 0 0 0 'EAMode' 'Euler Angle' EAMode
- -i 1 0 1 0 0 -1x1+1+13.500000 0 0 10000 0 0 'IterationLimit' 'IteretionLimit' Iter
- -i 1 0 1 0 0 -1x1+1+15.000000 0 0 10 0 0 'Pattern' 'Pickup Pattern' Pattern
- -f 1 0 1 0 0 -1x1+1+16.500000 0 0 0.000000 0 0 0 'ScoreThreshold' 'Threshold' Thres
- -f 1 0 1 0 0 -1x1+1+18.000000 0 0 0.800000 0 0 0 'Pickup' 'Pickup Percent' Pick
- -i 1 0 1 0 0 -1x1+1+19.500000 0 0 0 0 0 'mode' 'Mode' m
+ -I 1 0 1 0 0 1 -1x1+1+4.500000 ' ' 'InMat' 'Input: Matrix3D for initial' iMat
+ -I 1 0 1 1 0 1 -1x1+1+6.000000 ' ' 'Ref' 'Input: esoPoint' r
+ -i 1 0 1 0 0 -1x1+1+7.500000 0 0 2 0 0 'RefType' 'Input: esoPoint' rt
+ -I 1 0 1 0 0 1 -1x1+1+9.000000 ' ' 'RefMat' 'Input: Matrix3D for initial' rMat
+ -O 1 0 1 1 0 1 -1x1+1+10.500000 ' ' 'Out' 'OutputDataFile' o
+ -i 1 0 1 1 0 -1x1+1+12.000000 0 0 2 0 0 'OutType' 'OutputDataFile' ot
+ -s 1 0 1 0 0 -1x1+1+13.500000 0 0 0 0 0 'EAMode' 'Euler Angle' EAMode
+ -f 1 0 1 0 0 -1x1+1+15.000000 0 0 1.000000 0 0 0 'Ratio' 'Mag' R
+ -i 1 0 1 0 0 -1x1+1+16.500000 0 0 10000 0 0 'IterationLimit' 'IteretionLimit' Iter
+ -i 1 0 1 0 0 -1x1+1+18.000000 0 0 10 0 0 'Pattern' 'Pickup Pattern' Pattern
+ -f 1 0 1 0 0 -1x1+1+19.500000 0 0 0.000000 0 0 0 'ScoreThreshold' 'Threshold' Thres
+ -f 1 0 1 0 0 -1x1+1+21.000000 0 0 0.800000 0 0 0 'Pickup' 'Pickup Percent' Pick
+ -i 1 0 1 0 0 -1x1+1+22.500000 0 0 0 0 0 'Debug' 'Debug Mode' debug
+ -i 1 0 1 0 0 -1x1+1+24.000000 0 0 0 0 0 'mode' 'Mode' m
+ -I 1 0 1 0 0 1 -1x1+1+25.500000 ' ' 'configFile' 'ConfigurationFile' c
-E
-E
-E
{
info->fptIn = NULL; info->flagIn = 0;
info->InType = 2; info->flagInType = 0;
+ info->fptInMat = NULL; info->flagInMat = 0;
info->fptRef = NULL; info->flagRef = 0;
info->RefType = 2; info->flagRefType = 0;
+ info->fptRefMat = NULL; info->flagRefMat = 0;
info->fptOut = NULL; info->flagOut = 0;
info->OutType = 2; info->flagOutType = 0;
- info->fptconfigFile = NULL; info->flagconfigFile = 0;
info->EAMode = stringGetNthWord("ZEYS", 1, "\0"); info->flagEAMode = 0;
+ info->Ratio = 1.0; info->flagRatio = 0;
info->IterationLimit = 10000; info->flagIterationLimit = 0;
info->Pattern = 10; info->flagPattern = 0;
info->ScoreThreshold = 0.0; info->flagScoreThreshold = 0;
info->Pickup = 0.8; info->flagPickup = 0;
+ info->Debug = 0; info->flagDebug = 0;
info->mode = 0; info->flagmode = 0;
+ info->fptconfigFile = NULL; info->flagconfigFile = 0;
}
void
if(info->flagInType) {
}
+ if(info->flagInMat) {
+ info->fptInMat = fileOpen(info->InMat, "r");
+ }
+
if(!info->flagRef) {
stringGetFromFile(s, "Ref", stdin, stdout, 0);
info->Ref = stringGetNthWord(s, 1, " ,\t");
if(info->flagRefType) {
}
+ if(info->flagRefMat) {
+ info->fptRefMat = fileOpen(info->RefMat, "r");
+ }
+
if(!info->flagOut) {
stringGetFromFile(s, "Out", stdin, stdout, 0);
info->Out = stringGetNthWord(s, 1, " ,\t");
if(info->flagOutType) {
}
- if(info->flagconfigFile) {
- info->fptconfigFile = fileOpen(info->configFile, "r");
+ if(info->flagEAMode) {
}
- if(info->flagEAMode) {
+ if(info->flagRatio) {
}
if(info->flagIterationLimit) {
if(info->flagPickup) {
}
+ if(info->flagDebug) {
+ }
+
if(info->flagmode) {
}
+ if(info->flagconfigFile) {
+ info->fptconfigFile = fileOpen(info->configFile, "r");
+ }
+
}
#ifdef KHOROS
#include <stdio.h>
fprintf(stderr, "Options:\n");
fprintf(stderr, " [-i[nput] In (NULL ).as(inFile ) ] :Essential :Input: eosPoint\n");
fprintf(stderr, " [-i[nput]t[ype] InType (2 ).as(Integer ) ] :Optional :eosPointType\n");
+ fprintf(stderr, " [-i[nput]Mat[rix] InMat (NULL ).as(inFile ) ] :Optional :Input: Matrix3D for initial\n");
fprintf(stderr, " [-r[eference] Ref (NULL ).as(inFile ) ] :Essential :Input: esoPoint\n");
fprintf(stderr, " [-r[eference]t[ype] RefType (2 ).as(Integer ) ] :Optional :Input: esoPoint\n");
+ fprintf(stderr, " [-r[eference]Mat[rix]RefMat (NULL ).as(inFile ) ] :Optional :Input: Matrix3D for initial\n");
fprintf(stderr, " [-o[utput] Out (NULL ).as(outFile ) ] :Essential :OutputDataFile\n");
fprintf(stderr, " [-o[utput]t[ype] OutType (2 ).as(Integer ) ] :Essential :OutputDataFile\n");
- fprintf(stderr, " [-c[onfig] configFile (NULL ).as(inFile ) ] :Optional :ConfigurationFile\n");
fprintf(stderr, " [-EAMode EAMode (ZEYS ).as(String ) ] :Optional :Euler Angle\n");
+ fprintf(stderr, " [-R[atio] Ratio (1.0 ).as(Real ) ] :Optional :Mag\n");
fprintf(stderr, " [-Iter[ationLimit] IterationLimit (10000 ).as(Integer ) ] :Optional :IteretionLimit\n");
fprintf(stderr, " [-Pattern Pattern (10 ).as(Integer ) ] :Optional :Pickup Pattern\n");
fprintf(stderr, " [-Thres[hold] ScoreThreshold (0.0 ).as(Real ) ] :Optional :Threshold\n");
fprintf(stderr, " [-Pick[upPercent] Pickup (0.8 ).as(Real ) ] :Optional :Pickup Percent\n");
+ fprintf(stderr, " [-debug Debug (0 ).as(Integer ) ] :Optional :Debug Mode\n");
fprintf(stderr, " [-m[ode] mode (0 ).as(Integer ) ] :Optional :Mode\n");
+ fprintf(stderr, " [-c[onfig] configFile (NULL ).as(inFile ) ] :Optional :ConfigurationFile\n");
additionalUsage();
}