public static void Main(string[] args) { // Configure application var builder = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json", false, true); IConfigurationRoot configuration = builder.Build(); JsonConvert.DefaultSettings = () => new JsonSerializerSettings { Formatting = Formatting.Indented, ContractResolver = new CamelCasePropertyNamesContractResolver() }; // Configure dependency injection var serviceProvider = new ServiceCollection() .AddSingleton <IConfiguration>(configuration) //.AddScoped<IVisionService, AzureComputerVisionService>() .AddScoped <IVisionService, GoogleCloudVisionService>() .BuildServiceProvider(); // Instantiate application IVisionService visionService = serviceProvider.GetService <IVisionService>(); OcrApp app = new OcrApp(visionService); // Process OCR workload app.Process(); }
public void Init() { visionService = Factory.GetVisionService(); inputCount = 0; StartCoroutine(ListenForInput()); }
public CognitiveLaunchController( IVisionService visionService, IAutoSuggestService autoSuggestService, IImageSearchService imageSearchService, ISpellCheckService spellCheckService, IWebSearchService webSearchService, INewsSearchService newsSearchService, IVideoSearchService videoSearchService, IVideoService videoService, IEmotionService emotionService, IFaceService faceService, ILinguisticService linguisticService, ISentimentService sentimentService, IEntityLinkingService entityLinkingService, ILanguageService languageService) { VisionService = visionService; AutoSuggestService = autoSuggestService; ImageSearchService = imageSearchService; SpellCheckService = spellCheckService; WebSearchService = webSearchService; NewsSearchService = newsSearchService; VideoSearchService = videoSearchService; VideoService = videoService; EmotionService = emotionService; FaceService = faceService; LinguisticService = linguisticService; SentimentService = sentimentService; EntityLinkingService = entityLinkingService; LanguageService = languageService; }
public CognitiveService(IContentModeratorService contentModeratorService, IVisionService visionService, ITextAnalyzeService textAnalyzeService) { _contentModeratorService = contentModeratorService; _visionService = visionService; _textAnalyzeService = textAnalyzeService; }
public OcrApp(IVisionService visionService) { if (visionService == null) { throw new ArgumentNullException(nameof(visionService)); } _visionService = visionService; }
public PhotoService(ITableRepository tableRepository, IBlobRepository blobRepository, IVisionService visionService) { _tableRepository = tableRepository; _blobRepository = blobRepository; _visionService = visionService; }
public AnalyzeService(IOptions <AnalyzeSetting> analyzeSetting, ITwitterService twitterService, IVisionService visionService, ICategorizedImageRepository categolizedImageRepository, ILogger logger) { this.AnalyzeSetting = analyzeSetting.Value; this.TwitterService = twitterService; this.VisionService = visionService; this.CategolizedImageRepository = categolizedImageRepository; this.Logger = logger; }
/// <summary> /// ctor(); /// </summary> public DriveAutoDetailsViewModel(IPickMediaService pickMediaService, IVisionService visionService, IDriveAutoService driveAutoService) { _visionService = visionService; _pickMediaService = pickMediaService; _driveAutoService = driveAutoService; ActionBarViewModel = DependencyLocator.Resolve <CommonActionBarViewModel>(); IsBackButtonAvailable = NavigationService.IsBackButtonAvailable; }
public ImageAnalysisService( IImageSearchSettings settings, IImageSearchService searchService, ISitecoreDataWrapper dataWrapper, IFaceService faceService, IVisionService visionService, ICognitiveImageAnalysisFactory imageAnalysisFactory) { _settings = settings; _searchService = searchService; _dataWrapper = dataWrapper; _faceService = faceService; _visionService = visionService; _imageAnalysisFactory = imageAnalysisFactory; }
public CognitiveLaunchController( IVisionService visionService, IAutoSuggestService autoSuggestService, IImageSearchService imageSearchService, ISpellCheckService spellCheckService, IWebSearchService webSearchService, INewsSearchService newsSearchService, IVideoSearchService videoSearchService, IVideoService videoService, IEmotionService emotionService, IFaceService faceService, ILinguisticService linguisticService, ITextAnalyticsService textAnalyticsService, IEntityLinkingService entityLinkingService, IContentModeratorService contentModeratorService, IAcademicSearchService academicSearchService, IWebLanguageModelService webLanguageModelService, ISpeakerIdentificationService speakerIdentificationService, ISpeakerVerificationService speakerVerificationService) { VisionService = visionService; AutoSuggestService = autoSuggestService; ImageSearchService = imageSearchService; SpellCheckService = spellCheckService; WebSearchService = webSearchService; NewsSearchService = newsSearchService; VideoSearchService = videoSearchService; VideoService = videoService; EmotionService = emotionService; FaceService = faceService; LinguisticService = linguisticService; TextAnalyticsService = textAnalyticsService; EntityLinkingService = entityLinkingService; ContentModeratorService = contentModeratorService; AcademicSearchService = academicSearchService; WebLanguageModelService = webLanguageModelService; SpeakerIdentificationService = speakerIdentificationService; SpeakerVerificationService = speakerVerificationService; }
public HomeController(IVisionService visionService, IHostingEnvironment environment) { _visionService = visionService; _environment = environment; }
public ImageExtractionService() { VisionService = new VisionService(ConfigurationManager.AppSettings["OxfordKey"]); SpellService = new SpellService(); OpenCVService = new ImageProcessor(); }
public CustomVisionPageViewModel() { _visionService = new VisionService(); }
public PetCommandHandler(IVisionService visionService) { _visionService = visionService; }
public static void SetVisionService(IVisionService visionService) { Factory.visionService = visionService; Factory.visionService.Init(); }
public CelebrityService(IVisionService vs, IEntitySearchService ess) { this.visionService = vs; this.entityService = ess; }
public ImageProcessingServiceRepository(IVisionService visionService) { _visionService = visionService; }
public LandmarkService(IVisionService vs, IEntitySearchService ess) { this.visionService = vs; this.entityService = ess; }
public VisionProcessHandler(ILogger <VisionProcessHandler> logger, IStorageService storageService, IVisionService visionService) { _logger = logger; _storageService = storageService; _visionService = visionService; }
public VisionController(IVisionService service) { this.service = service; }
public ComputerVisionPageViewModel() { _visionService = new VisionService(); }
public PlantsInfoServiceRepository(IVisionService visionService) { _visionService = visionService; }