예제 #1
0
        private bool CheckSafeSearch(AnnotateImageResponse response)
        {
            var safeSearch = response.SafeSearchAnnotation;

            bool isAdult   = safeSearch.Adult != Likelihood.VeryUnlikely && safeSearch.Adult != Likelihood.Unlikely;
            bool isViolent = safeSearch.Violence != Likelihood.VeryUnlikely && safeSearch.Violence != Likelihood.Unlikely;
            bool isRacy    = safeSearch.Racy != Likelihood.VeryUnlikely && safeSearch.Racy != Likelihood.Unlikely;

            return(!(isAdult || isViolent || isRacy));
        }
예제 #2
0
        private bool CheckLogos(AnnotateImageResponse response, float minConfidence)
        {
            var list = response.LogoAnnotations.Where(x => x.Score >= minConfidence);

            return(list.Count() > 0);
        }
예제 #3
0
        public string error;                                //a string providing information about errors.

        public MachineVisionResponse(bool isError, AnnotateImageResponse response)
        {
            this.isError = isError;
            this.annotateImageResponse = response;
        }