Skip to content

Instantly share code, notes, and snippets.

@ochilab
Created May 30, 2013 03:20
Show Gist options
  • Save ochilab/5675542 to your computer and use it in GitHub Desktop.
Save ochilab/5675542 to your computer and use it in GitHub Desktop.
OpenCVSharpでトリミングする関数
private IplImage trimming(IplImage src, int x, int y, int width, int height){
IplImage dest = new IplImage(width, height, src.Depth, src.NChannels);
Cv.SetImageROI(src, new CvRect(x, y, width, height));
dest = Cv.CloneImage(src);
Cv.ResetImageROI(src);
return dest;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment