Example #1
0
File: blob.py Project: lacatus/TFM
    def drawglobalmask(self, global_mask):

        x, y, w, h = self.bound_rect

        global_mask[y:y + h, x:x + w] = cv2.add(global_mask[y:y + h, x:x + w],
                                                self.mask)

        return global_mask
Example #2
0
    def drawglobalmask(self, global_mask):

        x, y, w, h = self.bound_rect

        global_mask[y:y + h, x:x + w] = cv2.add(
            global_mask[y:y + h, x:x + w], self.mask)

        return global_mask
Example #3
0
File: blob.py Project: lacatus/TFM
    def drawmask(self, frame):

        # Create colored mask for visualization
        x, y, w, h = self.bound_rect

        mask_color = np.zeros((h, w, 3), dtype=np.uint8)
        mask_color[:, :, 1] = 255  # Assign blue color to created colored mask
        mask_color = cv2.bitwise_and(mask_color, mask_color, mask=self.mask)

        frame[y:y + h, x:x + w] = cv2.add(frame[y:y + h, x:x + w], mask_color)
Example #4
0
    def drawmask(self, frame):

        # Create colored mask for visualization
        x, y, w, h = self.bound_rect

        mask_color = np.zeros((h, w, 3), dtype=np.uint8)
        mask_color[:, :, 1] = 255  # Assign blue color to created colored mask
        mask_color = cv2.bitwise_and(mask_color, mask_color, mask=self.mask)

        frame[y:y + h, x:x + w] = cv2.add(frame[y:y + h, x:x + w], mask_color)