To crop a selected area from a image usign emgucv, the C# wrapper for openCV,
Contour<Point> currentContour = biggestContour.ApproxPoly(biggestContour.Perimeter * 0.0025, storage);
currentFrame.Draw(currentContour, new Bgr(Color.BlueViolet), 2);
box = biggestContour.GetMinAreaRect();
PointF[] points = box.GetVertices();
handRect = box.MinAreaRect();
currentFrame.ROI = hand.rect;
currentFrame = currentFrame.Copy();
CvInvoke.cvResetImageROI(currentFrame);
pictureBox1.Image = currentFrame.ToBitmap();
Hope this is helpful to those who get stuck in the middle of image pre-processing as I got myself into.
CvInvoke.cvResetImageROI(currentFrame);
pictureBox1.Image = currentFrame.ToBitmap();
Hope this is helpful to those who get stuck in the middle of image pre-processing as I got myself into.
Helpful.
ReplyDeleteCan you provide source code as well?
ReplyDeleteThank You and that i have a keen give: What Home Renovation Expenses Are Tax Deductible victorian renovation
ReplyDelete