/// <summary>
        /// Synchronous Analyze
        /// </summary>
        private void AnalyzeSync()
        {
            List <MLSkeleton> list        = new List <MLSkeleton>();
            SparseArray       sparseArray = analyzer.AnalyseFrame(mFrame);

            for (int i = 0; i < sparseArray.Size(); i++)
            {
                list.Add((MLSkeleton)sparseArray.ValueAt(i));
            }
            // Remove invalid point.
            List <MLSkeleton> skeletons = SkeletonUtils.GetValidSkeletons(list);

            if (skeletons != null && !(skeletons.Count == 0))
            {
                ProcessSuccess(skeletons);
            }
            else
            {
                ProcessFailure();
            }
        }
        public void TransactResult(MLAnalyzer.Result result)
        {
            this.mGraphicOverlay.Clear();

            SparseArray       sparseArray = result.AnalyseList;
            List <MLSkeleton> list        = new List <MLSkeleton>();

            for (int i = 0; i < sparseArray.Size(); i++)
            {
                list.Add((MLSkeleton)sparseArray.ValueAt(i));
            }
            // Remove invalid point.
            List <MLSkeleton> skeletons = SkeletonUtils.GetValidSkeletons(list);
            SkeletonGraphic   graphic   = new SkeletonGraphic(this.mGraphicOverlay, skeletons);

            this.mGraphicOverlay.Add(graphic);

            if (mActivity != null && !mActivity.IsFinishing)
            {
                mActivity.CompareSimilarity(skeletons);
            }
        }