public SymbolRecognitionWorker(string inputPath, ScanningMethod scanningMethod, DescriptorMethod descriptorMethod, MachineLearningMethod machineLearningMethod) { #region SURF //SetParameters(inputPath, scanningMethod, descriptorMethod, machineLearningMethod); //switch (scanningMethod) //{ // case ScanningMethod.ScanningByPixel: // break; // case ScanningMethod.ScanningByImageDimention: // // _scanImage.ScanByImageDimension(inputPath, out _element, out _test, out _gElement, _log); // _scanImage.ScanByPixel(inputPath, 50, 50, out _element, out _test, out _gElement, _log); // break; // default: // break; //} //switch (descriptorMethod) //{ // case DescriptorMethod.SIFT: // break; // case DescriptorMethod.SURF: // ApplySURF(); // break; // case DescriptorMethod.DCT: // break; // default: // break; //} #endregion }
private void SetParameters(string inputPath, ScanningMethod scanningMethod, DescriptorMethod descriptorMethod, MachineLearningMethod machineLearningMethod) { _symbolParameters = new Utility.SymbolParameters(); _hessianThreshould = _symbolParameters.HessianThresh; _uniquenessThresh = _symbolParameters.UniquenessThress; _histogramMatchingScore = _symbolParameters.HistogramMatchingScore; _tm = _symbolParameters.TM; _log = File.AppendText(inputPath + "/log.txt"); _machineLearningMethod = machineLearningMethod; _scanningMethod = scanningMethod; _descriptorType = descriptorMethod; //check the FilePath _inputPath = inputPath; _inPath = inputPath + "/in"; _outPath = inputPath + "/out"; _intermediatePath = inputPath + "/Intermediate"; ValidateFilePath(_inPath, "in"); ValidateFilePath(_outPath, "out"); ValidateFilePath(_intermediatePath, "Intermediate"); ValidateFilePath(_inputPath, ""); _descriptor = new Descriptor(); _machineLearning = new MachineLearning(); _scanImage = new ScanImage(); }