Where can I learn/find examples of gesture recognitions streamed from Kinect, using OpenCV?

前端 未结 3 847
一个人的身影
一个人的身影 2020-12-29 15:12

I have Kinect and drivers for Windows and MacOSX. Are there any examples of gesture recognitions streamed from Kinect using OpenCV API? I\'m trying to achieve similar to Da

3条回答
  •  情歌与酒
    2020-12-29 15:46

    mage dest = new Image(this.bitmap.Width, this.bitmap.Height); CvInvoke.cvThreshold(src, dest, 220, 300, Emgu.CV.CvEnum.THRESH.CV_THRESH_BINARY); Bitmap nem1 = new Bitmap(dest.Bitmap); this.bitmap = nem1; Graphics g = Graphics.FromImage(this.bitmap);

                    using (MemStorage storage = new MemStorage()) //allocate storage for contour approximation
                        for (Contour contours = dest.FindContours(); contours != null; contours = contours.HNext)
                        {
                            g.DrawRectangle(new Pen(new SolidBrush(Color.Green)),contours.BoundingRectangle);
                           // CvInvoke.cvConvexHull2(contours,, Emgu.CV.CvEnum.ORIENTATION.CV_CLOCKWISE, 0);
                            IntPtr seq = CvInvoke.cvConvexHull2(contours,storage.Ptr, Emgu.CV.CvEnum.ORIENTATION.CV_CLOCKWISE, 0);
                           IntPtr defects = CvInvoke.cvConvexityDefects(contours, seq, storage);
                          Seq tr= contours.GetConvexHull(Emgu.CV.CvEnum.ORIENTATION.CV_CLOCKWISE);
    
                          Seq te = contours.GetConvexityDefacts(storage, Emgu.CV.CvEnum.ORIENTATION.CV_CLOCKWISE);
                          g.DrawRectangle(new Pen(new SolidBrush(Color.Green)), tr.BoundingRectangle);
                          //g.DrawRectangle(new Pen(new SolidBrush(Color.Green)), te.BoundingRectangle);
    
                        }
    

    I did as per your algorithm but it does not work What is wring?

提交回复
热议问题