Opencv emgu GPU斑点检测
我对Emgu GPU功能(使用Emgu 2.4 x64)的当前状态感到困惑。GPUImage中可用的方法非常有限——我正在尝试将其用于blob检测。特别是像这样的代码结构可以使用GPU来加速blob提取 关于如何利用Emgu的GPU功能有什么想法吗?或者,除了在CUDA中重写之外,还有哪些选择可以利用GPUOpencv emgu GPU斑点检测,opencv,emgucv,Opencv,Emgucv,我对Emgu GPU功能(使用Emgu 2.4 x64)的当前状态感到困惑。GPUImage中可用的方法非常有限——我正在尝试将其用于blob检测。特别是像这样的代码结构可以使用GPU来加速blob提取 关于如何利用Emgu的GPU功能有什么想法吗?或者,除了在CUDA中重写之外,还有哪些选择可以利用GPU 使用(Image currentGrayFrame=imgCurrentFrame.Convert()) { 使用(MemStorage=newmemstorage()) { current
使用(Image currentGrayFrame=imgCurrentFrame.Convert())
{
使用(MemStorage=newmemstorage())
{
currentGrayFrame._平滑高斯(3);
currentGrayFrame.\u GammaCorrect(1.8d);
currentGrayFrame._EqualizeHist();
CvInvoke.cvCanny(currentGrayFrame,currentGrayFrame,120,60,3);
int-blobID=0;
用于(等高线=currentGrayFrame.FindContours(链近似法、CV近似法、RETR类型、CV近似法、外部存储);
等高线!=null;等高线=等高线.HNext)
{
轮廓=轮廓.近似多边形(轮廓.周长*0.001);
如果(轮廓面积>100)
如果(总轮廓>5)
{
矩形rect=轮廓.BoundingRectangle;
Image imgBlob=imgCurrentFrame.Copy(rect);
{
//位图bmpBlob=imgBlob.Bitmap;
blobsList.Add(新Blob
{
BlobID=++BlobID,
BlobImage=imgBlob,
位置=矩形,
});
//imgBlob.Dispose();
}
}
}
}
}
问题是什么?如何在emgu中使用CUDA?问题是如何使用GPU在emgu中重写上述方法(canny->contour->bounding Box)。@Mikos有进展吗?我在emguCV没有看到任何CudaBlob或CudaInvoke.Blob。
using (Image<Gray, Byte> currentGrayFrame = imgCurrentFrame.Convert<Gray, Byte>())
{
using (MemStorage storage = new MemStorage())
{
currentGrayFrame._SmoothGaussian(3);
currentGrayFrame._GammaCorrect(1.8d);
currentGrayFrame._EqualizeHist();
CvInvoke.cvCanny(currentGrayFrame, currentGrayFrame, 120, 60, 3);
int blobID = 0;
for (Contour<System.Drawing.Point> contours = currentGrayFrame.FindContours(CHAIN_APPROX_METHOD.CV_CHAIN_APPROX_SIMPLE, RETR_TYPE.CV_RETR_EXTERNAL, storage);
contours != null; contours = contours.HNext)
{
Contour<Point> contour = contours.ApproxPoly(contours.Perimeter * 0.001);
if (contour.Area > 100)
if (contour.Total > 5)
{
Rectangle rect = contour.BoundingRectangle;
Image<Bgr, Byte> imgBlob = imgCurrentFrame.Copy(rect);
{
//Bitmap bmpBlob = imgBlob.Bitmap;
blobsList.Add(new Blob
{
BlobID = ++blobID,
BlobImage = imgBlob,
Location = rect,
});
//imgBlob.Dispose();
}
}
}
}
}