crop in opencv using python
i want to divide an image into four parts in opencv using python as i am knew to it i am not able to do this.please help me out.
i want to divide an image into four parts in opencv using python as i am knew to it i am not able to do this.please help me out.
the images used in python are plain numpy arrays. you can get any subrect with a range operation like:
imsub = img[ ymin:ymax, xmin:xmax ]
so, for a 640x480 image:
tl = img[:240, :320]
tr = img[:240, 320:]
bl = img[240:, :320]
br = img[240:, 320:]
Asked: 2014-11-08 00:56:47 -0600
Seen: 1,368 times
Last updated: Nov 08 '14
Area of a single pixel object in OpenCV
Weird result while finding angle
cv2.perspectiveTransform() with Python
cv2 bindings incompatible with numpy.dstack function?
Getting single frames from video with python
Line detection and timestamps, video, Python
Different behaviour of OpenCV Python arguments in 32 and 64-bit systems