def splitImage(self, img): img = Util.resize(img, 100, 20) img = Util.otsu(img) imgT=img[0:1,0:1] img1 = img[0:20, 7:33] img2 = img[0:20, 27:53] img3 = img[0:20, 47:73] img4 = img[0:20, 67:93] img1=Util.resize(img1,32,32) img2=Util.resize(img2,32,32) img3=Util.resize(img3,32,32) img4=Util.resize(img4,32,32) return [img1,img2, img3, img4]
def splitImage(self, img): img = Util.resize(img, 100, 20) img = Util.otsu(img) #img = Util.closing(img, 5) img1 = img[0:20, 7:25] img2 = img[0:20, 23:41] img3 = img[0:20, 39:57] img4 = img[0:20, 55:73] img1=Util.resize(img1,32,32) img2=Util.resize(img2,32,32) img3=Util.resize(img3,32,32) img4=Util.resize(img4,32,32) return [img1, img2, img3, img4]