コード例 #1
0
        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();
        }
コード例 #2
0
        public void Init()
        {
            visionService = Factory.GetVisionService();
            inputCount    = 0;

            StartCoroutine(ListenForInput());
        }
コード例 #3
0
 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;
 }
コード例 #4
0
 public CognitiveService(IContentModeratorService contentModeratorService, IVisionService visionService,
                         ITextAnalyzeService textAnalyzeService)
 {
     _contentModeratorService = contentModeratorService;
     _visionService           = visionService;
     _textAnalyzeService      = textAnalyzeService;
 }
コード例 #5
0
 public OcrApp(IVisionService visionService)
 {
     if (visionService == null)
     {
         throw new ArgumentNullException(nameof(visionService));
     }
     _visionService = visionService;
 }
コード例 #6
0
 public PhotoService(ITableRepository tableRepository,
                     IBlobRepository blobRepository,
                     IVisionService visionService)
 {
     _tableRepository = tableRepository;
     _blobRepository  = blobRepository;
     _visionService   = visionService;
 }
コード例 #7
0
 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;
 }
コード例 #8
0
        /// <summary>
        ///     ctor();
        /// </summary>
        public DriveAutoDetailsViewModel(IPickMediaService pickMediaService,
                                         IVisionService visionService,
                                         IDriveAutoService driveAutoService)
        {
            _visionService    = visionService;
            _pickMediaService = pickMediaService;
            _driveAutoService = driveAutoService;

            ActionBarViewModel = DependencyLocator.Resolve <CommonActionBarViewModel>();

            IsBackButtonAvailable = NavigationService.IsBackButtonAvailable;
        }
コード例 #9
0
 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;
 }
コード例 #10
0
 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;
 }
コード例 #11
0
 public HomeController(IVisionService visionService, IHostingEnvironment environment)
 {
     _visionService = visionService;
     _environment   = environment;
 }
コード例 #12
0
 public ImageExtractionService()
 {
     VisionService = new VisionService(ConfigurationManager.AppSettings["OxfordKey"]);
     SpellService  = new SpellService();
     OpenCVService = new ImageProcessor();
 }
コード例 #13
0
 public CustomVisionPageViewModel()
 {
     _visionService = new VisionService();
 }
コード例 #14
0
 public PetCommandHandler(IVisionService visionService)
 {
     _visionService = visionService;
 }
コード例 #15
0
 public static void SetVisionService(IVisionService visionService)
 {
     Factory.visionService = visionService;
     Factory.visionService.Init();
 }
コード例 #16
0
 public CelebrityService(IVisionService vs, IEntitySearchService ess)
 {
     this.visionService = vs;
     this.entityService = ess;
 }
 public ImageProcessingServiceRepository(IVisionService visionService)
 {
     _visionService = visionService;
 }
コード例 #18
0
ファイル: LandmarkService.cs プロジェクト: zp672087110/ai-edu
 public LandmarkService(IVisionService vs, IEntitySearchService ess)
 {
     this.visionService = vs;
     this.entityService = ess;
 }
コード例 #19
0
 public VisionProcessHandler(ILogger <VisionProcessHandler> logger, IStorageService storageService, IVisionService visionService)
 {
     _logger         = logger;
     _storageService = storageService;
     _visionService  = visionService;
 }
コード例 #20
0
 public VisionController(IVisionService service)
 {
     this.service = service;
 }
コード例 #21
0
 public ComputerVisionPageViewModel()
 {
     _visionService = new VisionService();
 }
コード例 #22
0
 public PlantsInfoServiceRepository(IVisionService visionService)
 {
     _visionService = visionService;
 }