def redraw(self):
     M = cv.asMat(self.m, force_single_channel=True)
     size = cv.Size(int(self.size[0,0]), int(self.size[0,1]))
     img2 = cv.Mat()
     if size.width > 0 and size.height > 0:
         cv.warpAffine(self.img, img2, M, size, borderValue=cv.CV_RGB(255,255,255))
         cv.imshow("Affine Demo", img2)
예제 #2
0
 def affine(self):
     self.img2 = cv.Mat()
     M = cv.asMat(self.m, force_single_channel=True)
     cv.warpAffine(self.img1,
                   self.img2,
                   M,
                   self.img1.size(),
                   borderValue=cv.CV_RGB(255, 255, 255))
예제 #3
0
 def redraw(self):
     M = cv.asMat(self.m, force_single_channel=True)
     size = cv.Size(int(self.size[0, 0]), int(self.size[0, 1]))
     img2 = cv.Mat()
     if size.width > 0 and size.height > 0:
         cv.warpAffine(self.img,
                       img2,
                       M,
                       size,
                       borderValue=cv.CV_RGB(255, 255, 255))
         cv.imshow("Affine Demo", img2)
 def affine(self):
     self.img2 = cv.Mat()
     M = cv.asMat(self.m, force_single_channel=True)
     cv.warpAffine(self.img1, self.img2, M, self.img1.size(), 
         borderValue=cv.CV_RGB(255,255,255))