예제 #1
0
        /// <summary>
        /// Release the memory associated with this scene text detector.
        /// </summary>
        protected override void DisposeObject()
        {
            if (_textDetector != null)
            {
                _textDetector.Dispose();
                _textDetector = null;
            }

            if (_ocr != null)
            {
                _ocr.Dispose();
                _ocr = null;
            }

            if (_freetype != null)
            {
                _freetype.Dispose();
                _freetype = null;
            }
        }
예제 #2
0
        /// <summary>
        /// Clear and reset the model. Required Init function to be called again before calling ProcessAndRender.
        /// </summary>
        public void Clear()
        {
            if (_textDetector != null)
            {
                _textDetector.Dispose();
                _textDetector = null;
            }

            if (_ocr != null)
            {
                _ocr.Dispose();
                _ocr = null;
            }

            if (_freetype != null)
            {
                _freetype.Dispose();
                _freetype = null;
            }
        }