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.
add a comment
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,414 times
Last updated: Nov 08 '14