private static FrameFingerPrintWrapper Convert(FrameFingerPrint?frameFingerPrint)
        {
            FrameFingerPrint frameFingerPrintNotNull = TypeUtils.NullThrows(frameFingerPrint);

            byte[] edgeGrayScaleThumb = (
                from i in Enumerable.Range(0, frameFingerPrintNotNull.EdgeGrayScaleThumbLength)
                select frameFingerPrintNotNull.EdgeGrayScaleThumb(i)
                ).ToArray();
            return(new FrameFingerPrintWrapper
            {
                FrameNumber = frameFingerPrintNotNull.FrameNumber,
                PHashCode = frameFingerPrintNotNull.PHash,
                EdgeGrayScaleThumb = edgeGrayScaleThumb,
            });
        }
        private static Offset <FrameFingerPrint>[] CreateFrameFingerPrintArray(FlatBufferBuilder builder, VideoFingerPrintWrapper videoFingerPrint)
        {
            int frameFingerPrintCounter = 0;
            var frameFingerPrintArray   = new Offset <FrameFingerPrint> [videoFingerPrint.FingerPrints.Length];

            foreach (FrameFingerPrintWrapper frameFingerPrint in videoFingerPrint.FingerPrints)
            {
                VectorOffset grayScaleImageOffset = FrameFingerPrint.CreateEdgeGrayScaleThumbVector(builder, frameFingerPrint.EdgeGrayScaleThumb);

                FrameFingerPrint.StartFrameFingerPrint(builder);
                FrameFingerPrint.AddFrameNumber(builder, frameFingerPrint.FrameNumber);
                FrameFingerPrint.AddPHash(builder, frameFingerPrint.PHashCode);
                FrameFingerPrint.AddEdgeGrayScaleThumb(builder, grayScaleImageOffset);

                frameFingerPrintArray[frameFingerPrintCounter] = FrameFingerPrint.EndFrameFingerPrint(builder);
                frameFingerPrintCounter++;
            }

            return(frameFingerPrintArray);
        }