/// <summary>
        ///   Initializes a new instance of the <see cref="FastRetinaKeypointDescriptor"/> class.
        /// </summary>
        ///
        internal FastRetinaKeypointDescriptor(UnmanagedImage image,
                                              IntegralImage integral, FastRetinaKeypointPattern pattern)
        {
            this.Extended            = false;
            this.IsOrientationNormal = true;
            this.IsScaleNormal       = true;
            this.Image    = image;
            this.Integral = integral;

            this.pattern = pattern;
        }
        /// <summary>
        ///   Gets the <see cref="FastRetinaKeypointDescriptor">
        ///   feature descriptor</see> for the last processed image.
        /// </summary>
        ///
        public FastRetinaKeypointDescriptor GetDescriptor()
        {
            if (descriptor == null || pattern == null)
            {
                if (pattern == null)
                {
                    pattern = new FastRetinaKeypointPattern(octaves, scale);
                }

                descriptor          = new FastRetinaKeypointDescriptor(grayImage, integral, pattern);
                descriptor.Extended = featureType == FastRetinaKeypointDescriptorType.Extended;
            }

            return(descriptor);
        }