def paintrotbox(self, frame): # OpenCV 2.4.8 box = cv2.cv.BoxPoints(self.rot_box) """ # OpenCV 3.0.0 box = cv2.boxPoints(self.rot_box) """ box = np.int0(box) cv2.drawContours(frame, [box], 0, (0, 0, 255), 2)
def paintrotboxcolor(self, frame, color): box = cv2.cv.BoxPoints(self.rot_box) box = np.int0(box) if self.overlap and self.overcome: cv2.drawContours(frame, [box], 0, (255, 255, 255), 2) elif self.overlap: cv2.drawContours(frame, [box], 0, (0, 0, 0), 2) elif self.overcome: cv2.drawContours(frame, [box], 0, (255, 0, 255), 2) else: cv2.drawContours(frame, [box], 0, color, 2)
def paintrotboxcolor(self, frame, color): # OpenCV 2.4.8 box = cv2.cv.BoxPoints(self.rot_box) """ # OpenCV 3.0.0 box = cv2.boxPoints(self.rot_box) """ box = np.int0(box) if self.overlap and self.overcome: cv2.drawContours(frame, [box], 0, (255, 255, 255), 2) elif self.overlap: cv2.drawContours(frame, [box], 0, (0, 0, 0), 2) elif self.overcome: cv2.drawContours(frame, [box], 0, (255, 0, 255), 2) else: cv2.drawContours(frame, [box], 0, color, 2) self.paintellipse(frame)
def paintrotbox(self, frame): box = cv2.cv.BoxPoints(self.rot_box) box = np.int0(box) cv2.drawContours(frame, [box], 0, (0, 0, 255), 2)