diff options
Diffstat (limited to 'Software/Visual_Studio/TCC')
8 files changed, 12 insertions, 0 deletions
diff --git a/Software/Visual_Studio/TCC/Tango.TCC.BL/CardDetectionConfig.cs b/Software/Visual_Studio/TCC/Tango.TCC.BL/CardDetectionConfig.cs index e63e0bdd1..b2b2bc197 100644 --- a/Software/Visual_Studio/TCC/Tango.TCC.BL/CardDetectionConfig.cs +++ b/Software/Visual_Studio/TCC/Tango.TCC.BL/CardDetectionConfig.cs @@ -19,6 +19,7 @@ namespace Tango.TCC.BL public double SimilarityTolerance { get; set; } public CardDetectionHistogramMethods HistogramMethod { get; set; } public bool EnableDoubleChecking { get; set; } + public bool EnforceBarcodeDetection { get; set; } public CardDetectionConfig() { diff --git a/Software/Visual_Studio/TCC/Tango.TCC.BL/CardDetector.cs b/Software/Visual_Studio/TCC/Tango.TCC.BL/CardDetector.cs index 50bcceeba..221659868 100644 --- a/Software/Visual_Studio/TCC/Tango.TCC.BL/CardDetector.cs +++ b/Software/Visual_Studio/TCC/Tango.TCC.BL/CardDetector.cs @@ -66,6 +66,7 @@ namespace Tango.TCC.BL SimilarityTolerance = config.SimilarityTolerance, HistogramMethod = (int)config.HistogramMethod, EnableDoubleChecking = config.EnableDoubleChecking, + EnforceBarcodeDetection = config.EnforceBarcodeDetection, }); detectionResult.Similarity = result.Similarity; diff --git a/Software/Visual_Studio/TCC/Tango.TCC.BL/Web/DefinitionResponse.cs b/Software/Visual_Studio/TCC/Tango.TCC.BL/Web/DefinitionResponse.cs index d6161e738..5ab6cfd6d 100644 --- a/Software/Visual_Studio/TCC/Tango.TCC.BL/Web/DefinitionResponse.cs +++ b/Software/Visual_Studio/TCC/Tango.TCC.BL/Web/DefinitionResponse.cs @@ -17,6 +17,7 @@ namespace Tango.TCC.BL.Web public double SimilarityTolerance { get; set; } public CardDetectionHistogramMethods HistogramMethod { get; set; } public bool EnableDoubleChecking { get; set; } + public bool EnforceBarcodeDetection { get; set; } public DefinitionResponse() { @@ -27,6 +28,7 @@ namespace Tango.TCC.BL.Web SimilarityTolerance = 50; HistogramMethod = CardDetectionHistogramMethods.Chi_Square; EnableDoubleChecking = true; + EnforceBarcodeDetection = true; } } } diff --git a/Software/Visual_Studio/TCC/Tango.TCC.CardDetector/CardDetection.cpp b/Software/Visual_Studio/TCC/Tango.TCC.CardDetector/CardDetection.cpp Binary files differindex 174d2d549..25b523e58 100644 --- a/Software/Visual_Studio/TCC/Tango.TCC.CardDetector/CardDetection.cpp +++ b/Software/Visual_Studio/TCC/Tango.TCC.CardDetector/CardDetection.cpp diff --git a/Software/Visual_Studio/TCC/Tango.TCC.CardDetector/CardDetectionConfig.h b/Software/Visual_Studio/TCC/Tango.TCC.CardDetector/CardDetectionConfig.h index 86d44ca34..90f3239be 100644 --- a/Software/Visual_Studio/TCC/Tango.TCC.CardDetector/CardDetectionConfig.h +++ b/Software/Visual_Studio/TCC/Tango.TCC.CardDetector/CardDetectionConfig.h @@ -17,6 +17,7 @@ namespace Tango property double SimilarityTolerance; property int HistogramMethod; property bool EnableDoubleChecking; + property bool EnforceBarcodeDetection; }; } } diff --git a/Software/Visual_Studio/TCC/Tango.TCC.Service/Controllers/ColorDetectionController.cs b/Software/Visual_Studio/TCC/Tango.TCC.Service/Controllers/ColorDetectionController.cs index b3a4d4808..0c4111189 100644 --- a/Software/Visual_Studio/TCC/Tango.TCC.Service/Controllers/ColorDetectionController.cs +++ b/Software/Visual_Studio/TCC/Tango.TCC.Service/Controllers/ColorDetectionController.cs @@ -33,6 +33,7 @@ namespace Tango.TCC.Service.Controllers HistogramMethod = TCCServiceConfig.HISTOGRAM_METHOD, SimilarityTolerance = TCCServiceConfig.SIMILARITY_TOLERANCE, EnableDoubleChecking = TCCServiceConfig.ENABLE_DOUBLE_CHECKING, + EnforceBarcodeDetection = TCCServiceConfig.ENFORCE_BARCODE_DETECTION, }; } diff --git a/Software/Visual_Studio/TCC/Tango.TCC.Service/TCCServiceConfig.cs b/Software/Visual_Studio/TCC/Tango.TCC.Service/TCCServiceConfig.cs index 8bedaefe9..14e9ef8cc 100644 --- a/Software/Visual_Studio/TCC/Tango.TCC.Service/TCCServiceConfig.cs +++ b/Software/Visual_Studio/TCC/Tango.TCC.Service/TCCServiceConfig.cs @@ -68,6 +68,11 @@ namespace Tango.TCC.Service public static bool ENABLE_DOUBLE_CHECKING => bool.Parse(ConfigurationManager.AppSettings[nameof(ENABLE_DOUBLE_CHECKING)].ToString()); /// <summary> + /// Gets a value indicating whether the card will be detected only when barcode detection is successful. + /// </summary> + public static bool ENFORCE_BARCODE_DETECTION => bool.Parse(ConfigurationManager.AppSettings[nameof(ENFORCE_BARCODE_DETECTION)].ToString()); + + /// <summary> /// Gets the mobile application ID. /// </summary> public static String APP_ID => ConfigurationManager.AppSettings[nameof(APP_ID)].ToString(); diff --git a/Software/Visual_Studio/TCC/Tango.TCC.Service/Web.config b/Software/Visual_Studio/TCC/Tango.TCC.Service/Web.config index d2433dc9b..291a5baec 100644 --- a/Software/Visual_Studio/TCC/Tango.TCC.Service/Web.config +++ b/Software/Visual_Studio/TCC/Tango.TCC.Service/Web.config @@ -38,6 +38,7 @@ <add key="SIMILARITY_TOLERANCE" value="50" /> <add key="HISTOGRAM_METHOD" value="Chi_Square" /> <add key="ENABLE_DOUBLE_CHECKING" value="True" /> + <add key="ENFORCE_BARCODE_DETECTION" value="True" /> <add key="APP_ID" value="Tdf793i4ughsiduf8749509237885ehgfdlkghlT" /> |
