Created
May 30, 2013 03:20
-
-
Save ochilab/5675542 to your computer and use it in GitHub Desktop.
OpenCVSharpでトリミングする関数
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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