سلام من یک کد در زبان C#‎‎‎‎‎ با استفاده از کینکت و کتابخانه های OpenCvو Emgu نوشتم برای تشخیص و ردیابی دایره. داده ها رو توسط سنسور کینکت میگیرم و تصویر عمق رو به بازه مورد نظر تقسیم میکنم و gray image رو تشکیل میدم. بعد با استفاده از Hough Circle دایره هارو تشخیط میدم.
مشکل این هست که سرعت پردازش وقتی دایره ای شناسایی میشه به شدت پایین میاد و تا چند فریم متوالی پردازش متوقف میشه.
اگر پیشنهادی برای ارتقای کد و یا ردیابی دایره به وسیله کینکت در C#‎‎‎‎‎ دارید خوشحال میشم بدونم.
                depthFrame.CopyFrameDataToArray(depthData);
// Object recognition;
//Slicedepthimage is a Custom class
var depthBmp = depthFrame.SliceDepthImage((int)sliderMin.Value, (int)sliderMax.Value);
Image<Bgr, Byte> openCVImg = new Image<Bgr, byte>(depthBmp.ToBitmap());
Image<Gray, byte> gray_image = openCVImg.Convert<Gray, byte>();
#region circle test
double cannyThreshold = 180.0;
double circleAccumulatorThreshold = 140;
CircleF[] circles = gray_image.HoughCircles(
new Gray(cannyThreshold),
new Gray(circleAccumulatorThreshold),
2.0, // Resolution of the accumulator used to detect centers of the circles
100.0, // min distance
25, // min radius
0 // max radius
)[0]; // Get the circles from the first channel
foreach (CircleF circle in circles)
{
openCVImg.Draw(circle, new Bgr(255, 0, 0), 4);
}
#endregion