Created
August 20, 2014 17:23
-
-
Save danielthiel/9ba6db066bfe6051bb41 to your computer and use it in GitHub Desktop.
crop images with opencv (OpenCV)
This file contains hidden or 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
""" | |
found here: http://amiest-devblog.blogspot.de/2008/08/how-to-crop-images-with-opencv-in.html | |
opencv: http://opencv.org/ | |
""" | |
cropped = cvCreateImage( cvSize(new_width, new_height), 8, 3) | |
src_region = cvGetSubRect(image, opencv.cvRect(left, top, new_width, new_height) ) | |
cvCopy(src_region, cropped) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment