public async Task <string> PerformAnnotation(Texture2D snap)
        {
            var frameBreak = new WaitForEndOfFrame();

            if (RescaleInput)
            {
                snap = GenericUtils.Resize(snap, (int)scaleResolution.x, (int)scaleResolution.y);
            }

            _width  = snap.width;
            _height = snap.height;

            // Convert to base64 encoding.
            string _selectedImageData = ImageConvert.Convert(snap);

            if (MasoutisManager.category == (int)Enums.MasoutisCategories.product)
            {
                AnnotateImage(_selectedImageData, productFeatureTypes);
            }
            else
            {
                AnnotateImage(_selectedImageData, shelfFeatureTypes);
            }
            while (annotationCompleted != true)
            {
                await frameBreak;
            }
            return(textAnnotation);
        }
Esempio n. 2
0
        public async Task <string> PerformAnnotation(Texture2D snap)
        {
            textAnnotation = string.Empty;

            if (RescaleInput)
            {
                snap = GenericUtils.Resize(snap, (int)scaleResolution.x, (int)scaleResolution.y);
            }

            _width  = snap.width;
            _height = snap.height;

            // Convert to base64 encoding.
            string _selectedImageData = ImageConvert.Convert(snap);

            AnnotateImage(_selectedImageData, fullFeatureTypes);

            while (annotationCompleted != true)
            {
                await new WaitForEndOfFrame();
            }
            return(textAnnotation);
        }