1 /***************************************************************************************** 2 * Copyright (c) 2007 Hewlett-Packard Development Company, L.P. 3 * Permission is hereby granted, free of charge, to any person obtaining a copy of 4 * this software and associated documentation files (the "Software"), to deal in 5 * the Software without restriction, including without limitation the rights to use, 6 * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the 7 * Software, and to permit persons to whom the Software is furnished to do so, 8 * subject to the following conditions: 9 * 10 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 * 12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 13 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 14 * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 15 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 16 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 17 * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 *****************************************************************************************/ 19 20 /************************************************************************ 21 * SVN MACROS 22 * 23 * $LastChangedDate: 2011-02-08 11:00:11 +0530 (Tue, 08 Feb 2011) $ 24 * $Revision: 832 $ 25 * $Author: dineshm $ 26 * 27 ************************************************************************/ 28 29 /************************************************************************ 30 * FILE DESCR: Contains common macro Definitions. 31 * 32 * CONTENTS: 33 * 34 * AUTHOR: Vijayakumara M. 35 * 36 * DATE: December 01, Aug, 2005 37 * CHANGE HISTORY: 38 * Author Date Description of change 39 * Balaji, MNA 06 Jan, 2011 Macros defined in LTKInc.h are moved to this file 40 ************************************************************************/ 41 42 #ifndef __COMMONMACORS_H 43 #define __COMMONMACORS_H 44 45 #include "LTKTypes.h" 46 47 /** @file LTKmacros.h 48 * @brief Contains the macors used in reco/shaperec/pca and reco/shaperec/dtw modules. 49 */ 50 //macors used in reco/shaperec/pca and reco/shaperec/dtw modules. 51 52 /** @file LTKInc.h 53 */ 54 #define SUCCESS 0 55 #define FAILURE 1 56 57 #ifdef WIN32 58 #define SEPARATOR "\\" 59 #else 60 #define SEPARATOR "/" 61 #endif 62 63 #define COMMENTCHAR '#' 64 #define LIST_FILE_DELIMITER " \t\r" 65 66 //#define LTKReturnError(error) errorCode = error; return error; 67 #define LTKReturnError(error) return error; 68 69 #define SHAPESETFILE "shapeset.cfg" 70 #define PROFILEFILE "profile.cfg" 71 #define WORDFILE "word.cfg" 72 #define WORDPROFILEFILE "wordprofile.cfg" 73 #define STATSFILE "stats.txt" 74 #define NETWORKFILE "network.txt" 75 #define MODELSLISTFILE "modelslist.txt" 76 #define DICTIONARYFILE "dictionary.txt" 77 78 //File Extensions 79 #define CONFIGFILEEXT ".cfg" 80 #define DATFILEEXT ".mdt" 81 #define POSFILEEXT ".pos" 82 83 #define PI 3.1415926F 84 #define EPS 0.00001F 85 #define EPS1 0.001F 86 87 //Isolated character recognizers 88 #define PCA "pca" 89 #define DTW "dtw" 90 #define POS "pos" 91 #define ZONE "zone" 92 #define HOLISTIC "holistic" 93 #define BCC "bcc" 94 #define EigDef "eigdef" 95 #define NN "nn" 96 #define HMM "hmm" 97 #define ACTIVEDTW "activedtw" 98 #define NEURALNET "neuralnet" 99 100 //Feature Extractors 101 #define POINT_FLOAT "pointfloat" 102 #define SUBSTROKE "substroke" 103 #define PARAMETRIC_CURVE "parametriccurve" 104 #define L7 "l7" 105 #define L7RADIUS "L7Radius" 106 #define NPEN "npen" 107 #define NPEN_WINDOW_SIZE "NPenWindowSize" 108 #define RELHANDPOSSC "relhandpossc" 109 110 //Word recognizers 111 #define DP "dp" 112 #define BOXFLD "boxfld" 113 114 //PCA Config values 115 #define REVERSEFEATUREVECTORS "ReverseFeatureVectors" 116 #define TRACEDIMENSION "ResampTraceDimension" 117 #define NUMEIGENVECTORS "NumEigenVectors" 118 #define SIZETHRESHOLD "NormLineWidthThreshold" 119 #define ASPECTRATIOTHRESHOLD "NormPreserveAspectRatioThreshold" 120 #define DOTTHRESHOLD "NormDotSizeThreshold" 121 #define LOOPTHRESHOLD "LoopThreshold" 122 #define HOOKLENGTHTHRESHOLD1 "HookLengthThreshold1" 123 #define HOOKLENGTHTHRESHOLD2 "HookLengthThreshold2" 124 #define HOOKANGLETHRESHOLD "HookAngleThreshold" 125 #define SMOOTHFILTERLENGTH "SmoothWindowSize" 126 #define DISTANCEMEASURE "DistanceMeasure" 127 #define QUANTIZATIONSTEP "QuantizationStep" 128 #define CONFIDENCEMAPPINGFILE "ConfidenceMappingFile" 129 #define PRESERVEASPECTRATIO "NormPreserveAspectRatio" 130 #define PRESERVERELATIVEYPOSITION "NormPreserveRelativeYPosition" 131 #define RESAMPLINGMETHOD "ResampPointAllocation" 132 133 134 //NN Config values 135 #define FEATURES "Features" 136 #define PROTOTYPEDISTANCE "NNPrototypeDistanceMeasure" 137 #define NEARESTNEIGHBORS "NNRecoNumNearestNeighbors" 138 #define FEATUREPOINTDISTANCE "FeaturePointDistance" 139 #define DTWBANDING "NNDTWBandingRadius" 140 #define FEATUREEXTRACTOR "FeatureExtractor" 141 #define FEATUREREPRESENTATION "FeatureRepresentation" 142 #define LENGTHBASED "lengthbased" 143 #define POINTBASED "pointbased" 144 #define INTERPOINTDISTBASED "interpointdistbased" 145 #define LENGTHBASED_VARIABLE_NUMBER_OF_SAMPLES "lengthbasedvariablenumberofsamples" 146 147 //ACTIVEDTW Config values 148 #define RETAINPERCENTEIGENENERGY "ActiveDTWRetainPercentEigenEnergy" 149 #define EIGENSPREADVALUE "ActiveDTWEigenSpreadValue" 150 #define USESINGLETON "ActiveDTWUseSingleton" 151 #define MINCLUSTERSIZE "ActiveDTWMinClusterSize" 152 #define MAXCLUSTERSIZE "ActiveDTWMaxClusterSize" 153 #define MDTFILEUPDATEFREQ "ActiveDTWMDTFileUpdateFreq" 154 155 //NEURAL NET Config values 156 #define RANDOM_NUMBER_SEED "SeedValueForRandomNumberGenaretor" 157 #define NEURALNET_LEARNING_RATE "NeuralNetLearningRate" 158 #define NEURALNET_MOMEMTUM_RATE "NeuralNetMomemtumRate" 159 #define NEURALNET_TOTAL_ERROR "NeuralNetTotalError" 160 #define NEURALNET_INDIVIDUAL_ERROR "NeuralNetIndividualError" 161 #define NEURALNET_HIDDEN_LAYERS_SIZE "NeuralNetHiddenLayersSize" 162 #define NEURALNET_HIDDEN_LAYERS_UNITS "NeuralNetHiddenLayersUnitSize" 163 #define NEURALNET_NORMALISED_FACTOR "NeuralNetNormalizationFactor" 164 #define NEURALNET_WEIGHT_REESTIMATION "ReestimateNeuralnetConnectionWeights" 165 #define NEURALNET_TRAINING_ITERATION "NeuralnetTrainingIteration" 166 #define NEURALNET_TRAINING_SEQUENCE "PrepareTrainingSequence" 167 168 //holistic config values 169 #define NUMNNS "numnns" 170 #define WORSTCASEVALUE "worstcasevalue" 171 #define NUMRESAMPLEPOINTS1 "NumResamplePoints1" 172 #define NUMRESAMPLEPOINTS2 "NumResamplePoints2" 173 #define SMOOTHFILTERLENGTH1 "SmoothFilterLength1" 174 #define SMOOTHFILTERLENGTH2 "SmoothFilterLength2" 175 #define SWANGNORMFACTOR "SwangNormFactor" 176 #define SWANGHOOKTHRESH "SwangHookThresh" 177 #define HORIZSTROKEANGLETHRESH "HorizStrokeAngleThresh" 178 //#define CONFIDENCEMAPPINGFILE "ConfidenceMappingFile" 179 //for bcc 180 #define NUMCHOICES "NumChoices" 181 #define COMBINATIONSCHEME "Combination" 182 183 184 #define NORMALIZETRACES "normalizetraces" 185 #define RESAMPLETRACES "resampletraces" 186 #define CENTERTRACES "centertraces" 187 #define REORDERTRACES "reordertraces" 188 #define REORIENTTRACES "reorienttraces" 189 #define NUMXGRIDS "numxgrids" 190 #define NUMYGRIDS "numygrids" 191 #define DISTRIBUTIONTHRESHOLD "distributionthreshold" 192 #define MINSHAPESUBSET "minshapesubset" 193 #define XTOLERANCE "xtolerance" 194 #define YTOLERANCE "xtolerance" 195 #define NUMXZONES "numxzones" 196 #define NUMYZONES "numyzones" 197 #define DENSITYTHRESH "densitythresh" 198 #define SAMPLETHRESH "samplethresh" 199 #define MAXBOXCOUNT "MaxBoxCount" 200 #define BOXEDSHAPEPROJECT "BoxedShapeProject" 201 #define BOXEDSHAPEPROFILE "BoxedShapeProfile" 202 #define DPSHAPEPROJECT "DPShapeProject" 203 #define DPSHAPEPROFILE "DPShapeProfile" 204 #define NUMSYMBOLS "NumSymbols" 205 #define NUMSHAPECHOICES "NumShapeChoices" 206 #define MINSHAPECONFID "MinShapeConfid" 207 208 209 //settings for DTW 210 #define FLEXIBILITYINDEX "FlexibilityIndex" 211 #define PROTOTYPESELECTION "NNTrainPrototypeSelectionMethod" 212 #define BANDING "Banding" 213 #define NUMFEATURES "NumFeatures" 214 #define PROTOREDFACTOR "NNTrainPrototypeReductionFactorPerClass" 215 #define NUMCLUSTERS "NNTrainNumPrototypesPerClass" 216 #define DTWEUCLIDEANFILTER "NNRecoDTWEuFilterOutputSize" 217 #define REJECT_THRESHOLD "NNRecoRejectThreshold" 218 #define ADAPTIVE_kNN "NNRecoUseAdaptiveKNN" 219 220 //settings of word recognizer 221 #define REC_UNIT_INFO "rec_unit_info" 222 #define USE_GRAMMAR "use_grammar" 223 #define USE_WORDLIST "use_wordlist" 224 #define USE_POSITIONAL INFO "use_positional_info" 225 #define REC_MODE "rec_mode" 226 #define DICTIONARY_MODE "dictionary_mode" 227 228 //For Word recognizer 229 230 #define LTK_TRUE 0x01 231 #define LTK_FALSE 0x00 232 233 //Reset parameters for Recognition context 234 #define LTK_RST_INK 0x02 235 #define LTK_RST_RECOGNIZER 0x04 236 #define LTK_RST_ALL 0xff 237 238 //Recognition units 239 #define REC_UNIT_UNKNOWN 0x08 //No segment info 240 #define REC_UNIT_SYMBOL 0x10 //Symbol 241 #define REC_UNIT_CHAR 0x11 //Char 242 #define REC_UNIT_WORD 0x12 //Word 243 244 //Recognition mode for the recognizer 245 #define REC_MODE_BATCH 0x14 //batch mode 246 #define REC_MODE_STREAMING 0x16 //streaming (trace by trace) 247 248 249 //Dictionary options 250 #define DICT_DRIVEN 0x20 //recognizes only the words in the dictio 251 #define DICT_ASSISTED 0x21 252 #define DICT_OFF 0x22 253 254 255 /** 256 * @brief Defines the sequence of preprocessor functions to be executed 257 */ 258 #define PREPROCSEQUENCE "PreprocSequence" 259 260 /** 261 * @brief Defines the scale to be used to compute the number of iterations for LVQ training 262 */ 263 #define LVQITERATIONSCALE "LVQIterationScale" 264 265 /** 266 * @brief Defines initial value of alpha used in LVQ training 267 */ 268 #define LVQINITIALALPHA "LVQInitialAlpha" 269 270 /** 271 * @brief Defines the distance measure to be used in LVQ training. 272 */ 273 #define LVQDISTANCEMEASURE "LVQDistanceMeasure" 274 275 /** 276 * @brief Defines the name of the preprocessor dll file 277 */ 278 #define PREPROC "preproc" 279 280 /** 281 * @brief Defines the string compare functions 282 */ 283 #ifdef _WIN32 284 #define LTKSTRCMP _stricmp 285 #else 286 #define LTKSTRCMP strcasecmp 287 #endif 288 289 /** 290 * @brief Defines the name of the lipiengine dll file 291 */ 292 #define LIPIENGINE_MODULE_STR "lipiengine" 293 294 /** 295 * @brief Defines the name of the logger dll file 296 */ 297 #define LOGGER_MODULE_STR "logger" 298 299 /** 300 * @brief Defines the Lipi Root environment string 301 */ 302 #define LIPIROOT "$LIPI_ROOT" 303 304 /** 305 * @brief Defines the project is dynamic, where the numshapes can take any number of values 306 */ 307 #define DYNAMIC "Dynamic" 308 309 /** 310 * @brief Defines the header version for the model data file 311 */ 312 #define HEADERVERSION "1.0.0" 313 314 315 #define VERSION_STR_LEN_SMALL 4 316 317 /** 318 * @brief Defines the length of the version information 319 */ 320 #define VERSION_STR_LEN 10 321 322 /** 323 * @brief Defines the checksum header string length 324 */ 325 #define CKSUM_HDR_STR_LEN 10 326 327 /** 328 * @brief Defines the starting error number 329 */ 330 #define ERROR_START_NO 100 331 332 /** 333 * @brief Defines the maximum error number 334 */ 335 #define MAX_ERROR_NO 240 336 337 /** 338 * @brief Defines the maximum file path length 339 */ 340 #define MAX_PATH_LEN 255 341 342 /** 343 * @brief Defines the maximum string length 344 */ 345 #define MAX_STRLEN 255 346 347 /** 348 * @brief Defines the lipi root environment string used in LipiEngine.cfg 349 */ 350 #define LIPIROOT_ENV_STRING "LIPI_ROOT" 351 352 /** 353 * @brief Defines the lipi library environment string used in LipiEngine.cfg 354 */ 355 #define LIPILIB_ENV_STRING "LIPI_LIB" 356 357 /** 358 * @brief Defines the type of project used in LipiEngine.cfg 359 */ 360 #define PROJECT_TYPE_STRING "ProjectType" 361 362 #define PROJECT_TYPE_SHAPEREC "SHAPEREC" 363 364 /** 365 * @brief Defines the shape recognizer name used in LipiEngine.cfg 366 */ 367 #define SHAPE_RECOGNIZER_STRING "ShapeRecMethod" 368 369 /** 370 * @brief Defines the word recognizer name used in LipiEngine.cfg 371 */ 372 #define WORD_RECOGNIZER_STRING "WordRecognizer" 373 374 /** 375 * @brief Defines the path of the project directory in the Lipi tree 376 */ 377 #define PROJECTS_PATH_STRING SEPARATOR + "projects" + SEPARATOR 378 379 /** 380 * @brief Defines the path of the profile directory in the Lipi tree 381 */ 382 #define PROFILE_PATH_STRING SEPARATOR + "config" + SEPARATOR 383 384 /** 385 * @brief Defines the name of the default profile 386 */ 387 #define DEFAULT_PROFILE "default" 388 389 /** 390 * @brief Defines the name of profile config file 391 */ 392 #define PROFILE_CFG_STRING "profile.cfg" 393 394 /** 395 * @brief Defines the name of project config file 396 */ 397 #define PROJECT_CFG_STRING "project.cfg" 398 399 /** 400 * @brief Defines the NumShapes attributes in the project config file 401 */ 402 #define PROJECT_CFG_ATTR_NUMSHAPES_STR "NumShapes" 403 404 /** 405 * @brief Defines the name of the create shape recognizer function 406 */ 407 #define CREATESHAPERECOGNIZER_FUNC_NAME "createShapeRecognizer" 408 409 /** 410 * @brief Defines the name of the delete shape recognizer function 411 */ 412 #define DELETESHAPERECOGNIZER_FUNC_NAME "deleteShapeRecognizer" 413 414 /** 415 * @brief Defines the name of the createWordRecognizer function 416 */ 417 #define CREATEWORDRECOGNIZER_FUNC_NAME "createWordRecognizer" 418 419 /** 420 * @brief Defines the name of the deleteWordRecognizer function 421 */ 422 #define DELETEWORDRECOGNIZER_FUNC_NAME "deleteWordRecognizer" 423 424 /** 425 * @brief Defines the name of the resampleTraceGroup function 426 */ 427 #define RESAMPLE_TRACE_GROUP_FUNC "resampleTraceGroup" 428 429 /** 430 * @brief Defines the name of the resampleTraceGroup1 function 431 */ 432 #define RESAMPLE_TRACE_GROUP_ONE_FUNC "resampleTraceGroup1" 433 434 /** 435 * @brief Defines the name of the preprocess function 436 */ 437 #define PREPROCESS_FUNC "preprocess" 438 439 /** 440 * @brief Defines the name of the normalizeSize function 441 */ 442 #define NORMALIZE_FUNC "normalizeSize" 443 444 #define NORMALIZE_LARGE_FUNC "normalizeLargerSize" 445 446 /** 447 * @brief Defines the name of the removeDuplicate function 448 */ 449 #define REMOVE_DUPLICATE_POINTS_FUNC "removeDuplicatePoints" 450 451 /** 452 * @brief Defines the name of another removeDuplicate function 453 */ 454 #define REMOVE_DUPLICATE_POINTS_BY_ISI_FUNC "removeDuplicatePointsByISI" 455 456 /** 457 * @brief Defines the name of the smoothenTraceGroup function 458 */ 459 #define SMOOTHEN_TRACE_GROUP_FUNC "smoothenTraceGroup" 460 461 #define SMOOTHEN_MOVINGAVERAGE_TRACE_GROUP_FUNC "smoothingByMovingAverage" 462 463 /** 464 * @brief Defines the name of the dehookTraces function 465 */ 466 #define DEHOOKTRACES_FUNC "dehookTraces" 467 468 /** 469 * @brief Defines the name of the normalizeOrientation function 470 */ 471 #define NORMALIZE_ORIENTATION_FUNC "normalizeOrientation" 472 473 /** 474 * @brief Defines the Delimiter sequence for tokenize the strings 475 */ 476 #define DELEMITER_SEQUENCE " {}," 477 478 /** 479 * @brief Defines the Delimiter character for separating the function name with class name 480 */ 481 #define DELEMITER_FUNC "::" 482 483 /** 484 * @brief Defines the Delimiter sequence for tokenize the header information 485 */ 486 #define TOKENIZE_DELIMITER "<>=\n\r" 487 488 /** 489 * @brief Defines the string "CKS" (ChecKSum) 490 */ 491 #define CKS "CKS" 492 493 /** 494 * @brief Defines the project name used for header information 495 */ 496 #define PROJNAME "PROJNAME" 497 498 /** 499 * @brief Defines the project type used for header information 500 */ 501 #define PROJTYPE "PROJTYPE" 502 503 /** 504 * @brief Defines the recognizer name used for header information 505 */ 506 #define RECNAME "RECNAME" 507 508 /** 509 * @brief Defines the recognizer version used for header information 510 */ 511 #define RECVERSION "RECVERSION" 512 513 /** 514 * @brief Defines the string CREATETIME for header information 515 */ 516 #define CREATETIME "CREATETIME" 517 518 /** 519 * @brief Defines the string MODTIME for header information 520 */ 521 #define MODTIME "MODTIME" 522 523 /** 524 * @brief Defines the platform name (Windows or Linux) 525 */ 526 #define PLATFORM "PLATFORM" 527 528 /** 529 * @brief Defines the length of the comment used in header 530 */ 531 #define COMMENTLEN "COMMENTLEN" 532 533 /** 534 * @brief Defines the data offset length used in header 535 */ 536 #define DATAOFFSET "DATAOFFSET" 537 538 /** 539 * @brief Defines the number of shapes used in header information 540 */ 541 #define NUMSHAPES "NUMSHAPES" 542 543 /** 544 * @brief Defines the size of integer used in header information 545 */ 546 #define SIZEOFINT "SIZEOFINT" 547 548 /** 549 * @brief Defines the size of unsigned integer used in header information 550 */ 551 #define SIZEOFUINT "SIZEOFUINT" 552 553 /** 554 * @brief Defines the size of short integer used in header information 555 */ 556 #define SIZEOFSHORTINT "SIZEOFSHORTINT" 557 558 /** 559 * @brief Defines the size of float used in header information 560 */ 561 #define SIZEOFFLOAT "SIZEOFFLOAT" 562 563 /** 564 * @brief Defines the size of character used in header information 565 */ 566 #define SIZEOFCHAR "SIZEOFCHAR" 567 568 /** 569 * @brief Defines the header length 570 */ 571 #define HEADERLEN "HEADERLEN" 572 573 #define HIDDENLAYERSUNIT "HIDDENLAYERSUNIT" 574 575 /** 576 * @brief Defines the dataset for header information 577 */ 578 #define DATASET "DATASET" 579 580 /** 581 * @brief Defines the comment information in header 582 */ 583 #define COMMENT "COMMENT" 584 585 /** 586 * @brief Defines the type of byte order (Little Endian or Big Endian) 587 */ 588 #define BYTEORDER "BYTEORDER" 589 590 /** 591 * @brief Defines the operating system version 592 */ 593 #define OSVERSION "OSVERSION" 594 595 /** 596 * @brief Defines the type of processor architecture 597 */ 598 #define PROCESSOR_ARCHITEC "PROCESSOR_ARCHITEC" 599 600 /** 601 * @brief Defines the Header version for header information 602 */ 603 #define HEADERVER "HEADERVER" 604 605 606 #define PCA_ALGO "PCA" 607 #define WINDOWS "Windows" 608 #ifndef LINUX 609 #define LINUX "Linux" 610 #endif 611 612 //Defined twice 613 #define BYTEORDER "BYTEORDER" 614 615 /** 616 * @brief Defines the create preprocessor method name 617 */ 618 #define CREATEPREPROCINST "createPreprocInst" 619 620 /** 621 * @brief Defines the delete preprocessor method name 622 */ 623 #define DESTROYPREPROCINST "destroyPreprocInst" 624 625 #define FI_MIN 0 626 #define FI_MAX 2 627 628 /** 629 * @brief Defines the minimum value in which the prototype reduction factor can take 630 */ 631 #define PROTOTYPEREDFACT_MIN 0 632 633 /** 634 * @brief Defines the maximum value in which the prototype reduction factor can take 635 */ 636 #define PROTOTYPEREDFACT_MAX 100 637 638 /** 639 * @brief Defines the input file type is the ink file 640 */ 641 #define INK_FILE "ink" 642 643 /** 644 * @brief Defines the input file type is the feature file 645 */ 646 #define FEATURE_FILE "feature" 647 648 /** 649 * @brief Defines the DTW type of distance to be calculated 650 */ 651 #define DTW_DISTANCE "dtw" 652 653 /** 654 * @brief Defines the euclidean type of distance to be calculated 655 */ 656 #define EUCLIDEAN_DISTANCE "eu" 657 658 /** 659 * @brief Defines the delimiter for the feature extractor 660 */ 661 #define FEATURE_EXTRACTOR_DELIMITER "|" 662 663 /** 664 * @brief Define the delimiter for the hidden layer unit 665 */ 666 #define HIDDEN_LAYER_UNIT_DELIMITER ":" 667 668 /** 669 * @brief Defines the delimiter for the space (assuming only signle space between 670 * class and the features in MDT file 671 */ 672 #define CLASSID_FEATURES_DELIMITER " " 673 674 /** 675 * @brief Defines the code for PointFloat Feature Extractor 676 */ 677 #define POINT_FLOAT_SHAPE_FEATURE_EXTRACTOR 101 678 679 /** 680 * @brief Define the code for Angle Feature Extractor 681 */ 682 #define SUBSTROKE_SHAPE_FEATURE_EXTRACTOR 103 683 684 /** 685 * @brief Define the code for spline Feature Extractor 686 */ 687 #define PARAMETRIC_CURVE_SHAPE_FEATURE_EXTRACTOR 104 688 689 690 /** 691 * @brief Uesd in computation of Feature Extraction (Angle) 692 */ 693 #define DIRECTION_CODE_EAST 1 694 695 #define DIRECTION_CODE_NORTH_EAST 2 696 697 #define DIRECTION_CODE_NORTH 3 698 699 #define DIRECTION_CODE_NORTH_WEST 4 700 701 #define DIRECTION_CODE_WEST 5 702 703 #define DIRECTION_CODE_SOUTH_WEST 6 704 705 #define DIRECTION_CODE_SOUTH 7 706 707 #define DIRECTION_CODE_SOUTH_EAST 8 708 709 #define OVERLAP_THRESHOLD 15.0 710 711 712 /** 713 * @brief Defines the code for L7 Feature Extractor 714 */ 715 #define L7_SHAPE_FEATURE_EXTRACTOR 102 716 717 /** 718 * @brief Defines the create preprocessor method name 719 */ 720 #define CREATE_SHAPE_FEATURE_EXTRACTOR "createShapeFeatureExtractor" 721 722 /** 723 * @brief Defines the delete preprocessor method name 724 */ 725 #define DELETE_SHAPE_FEATURE_EXTRACTOR "deleteShapeFeatureExtractor" 726 727 #define LEARNING_RATE "LEARNING_RATE" 728 729 #define HIDDEN_LAYER "HIDDEN_LAYER" 730 731 #define NORMALISED_FACTOR "NORMALISED_FACTOR" 732 733 #define MOMEMTUM_RATE "MOMEMTUM_RATE" 734 735 #define FE_NAME "FE_NAME" 736 737 #define FE_VER "FE_VER" 738 739 #define PREPROC_SEQ "PREPROC_SEQ" 740 741 #define DOT_SIZE_THRES "DOT_SIZE_THRES" 742 743 #define ASP_RATIO_THRES "ASP_RATIO_THRES" 744 745 #define DOT_THRES "DOT_THRES" 746 747 #define PRESER_REL_Y_POS "PRESER_REL_Y_POS" 748 749 #define PRESER_ASP_RATIO "PRESER_ASP_RATIO" 750 751 #define NORM_LN_WID_THRES "NORM_LN_WID_THRES" 752 753 #define RESAMP_POINT_ALLOC "RESAMP_POINT_ALLOC" 754 755 #define SMOOTH_WIND_SIZE "SMOOTH_WIND_SIZE" 756 757 #define TRACE_DIM "TRACE_DIM" 758 759 #define PROTOTYPE_SELECTION_CLUSTERING "hier-clustering" 760 761 #define PROTOTYPE_SELECTION_LVQ "lvq" 762 763 #define PROTO_RED_FACTOR_AUTOMATIC "automatic" 764 765 #define PROTO_RED_FACTOR_NONE "none" 766 767 #define PROTO_RED_FACTOR_COMPLETE "complete" 768 769 #define DTW_EU_FILTER_ALL "all" 770 771 #define NAME_POINT_FLOAT_SHAPE_FEATURE_EXTRACTOR "PointFloatShapeFeatureExtractor" 772 773 #define NAME_SUBSTROKE_SHAPE_FEATURE_EXTRACTOR "SubStrokeShapeFeatureExtractor" 774 775 #define NAME_PARAMETRIC_CURVE_SHAPE_FEATURE_EXTRACTOR "ParametricCurveShapeFeatureExtractor" 776 777 #define NAME_L7_SHAPE_FEATURE_EXTRACTOR "L7ShapeFeatureExtractor" 778 779 #define NAME_NPEN_SHAPE_FEATURE_EXTRACTOR "NPenShapeFeatureExtractor" 780 781 #define NAME_RELHANDPOSSC_SHAPE_FEATURE_EXTRACTOR "RelHandPosSCFeatureExtractor" 782 783 #define NEW_LINE_DELIMITER '\n' 784 785 #define DELTE_SHAPE_FTR_POINTER_FUNC "deleteShapeFeaturePtr" 786 787 #define MDT_FOPEN_MODE "MDT_OPEN_MODE" 788 789 /** 790 @brief Defines the log file name 791 */ 792 #define LOG_FILE_NAME "LogFile" 793 794 /** 795 @brief Defines the log level 796 */ 797 #define LOG_LEVEL "LogLevel" 798 799 #define DEFAULT_LOG_FILE "lipi.log" 800 801 #define DEFAULT_LOG_LEVEL LTKLogger::LTK_LOGLEVEL_ERR 802 803 #define LOG_LEVEL_DEBUG "DEBUG" 804 805 #define LOG_LEVEL_ERROR "ERR" 806 807 #define LOG_LEVEL_INFO "INFO" 808 809 #define LOG_LEVEL_ALL "ALL" 810 811 #define LOG_LEVEL_VERBOSE "VERBOSE" 812 813 #define LOG_LEVEL_OFF "OFF" 814 815 #define MDT_UPDATE_FREQUENCY "NNMDTFileUpdateFreq" 816 /** 817 @brief Used in computation of Confidence 818 */ 819 #define MIN_NEARESTNEIGHBORS 2 820 821 #define EUCLIDEAN_FILTER_OFF -1 822 823 #define CONF_THRESHOLD_FILTER_OFF 0 824 825 #define NUM_CHOICES_FILTER_OFF -1 826 827 #define LTK_START_SHAPEID 0 828 829 #define ADAPT_SCHEME "AdaptScheme" 830 831 #define NAME_ADD_LVQ_ADAPT_SCHEME "AddLVQ" 832 833 #define MAX_PROTOTYPES "MaxNumPrototypes" 834 835 #define ADAPT_CONF_LOWER_BOUND "ConfidenceLowerBound" 836 837 #define ADAPT_CONF_UPPER_BOUND "ConfidenceUpperBound" 838 839 #define ADAPT_MISMATCH_HIGH_CONF "MismatchHighConfidence" 840 841 #define ADAPT_MISMATCH_LOW_CONF "MismatchLowConfidence" 842 843 #define ADAPT_MATCH_HIGH_CONF "MatchHighConfidence" 844 845 #define ADAPT_MATCH_LOW_CONF "MatchLowConfidence" 846 847 #define ADAPT_MIN_NUMBER_SAMPLES_PER_CLASS "MinimumNumberOfSamplesPerClass" 848 #define DEFAULT_PROFILE "default" 849 850 #define DEFAULT_CHANNEL_NAME "X" 851 852 #define DEFAULT_DATA_TYPE DT_FLOAT 853 854 #define X_CHANNEL_NAME "X" 855 856 #define Y_CHANNEL_NAME "Y" 857 858 #define DEFAULT_SAMPLING_RATE 100 859 860 #define DEFAULT_X_DPI 2000 861 862 #define DEFAULT_Y_DPI 2000 863 864 #define DEFAULT_LATENCY 0.0 865 866 #define DEFAULT_ERROR_CODE -1 867 868 #define LIPIENGINE_CFG_STRING "lipiengine.cfg" 869 870 #define DEFAULT_SHAPE_RECO_CHOICES 5 871 872 #define DEFAULT_SHAPE_RECO_MIN_CONFID 0.0 873 874 #define EMPTY_STRING " " 875 876 #define MDT_FILE_OPEN_MODE "NNMDTFileOpenMode" 877 878 #define MIN_PERCENT_EIGEN_ENERGY 1 879 880 #define MAX_PERCENT_EIGEN_ENERGY 100 881 882 #define MIN_EIGENSPREADVALUE 1 883 884 //neuralnet 885 #define CONTINUE 0 886 #define EXIT_FAILURE 1 887 #define EXIT_SUCCESSFULLY 2 888 889 //for hmm clasifire 890 891 #define FEATURE_DIMENTION 8 892 893 #endif // #ifndef __COMMONMACORS_H 894 895