Example #1
0
    def draw_zones(self, frame, width, height):
        # Re-initialize zones in case they have not been initalized
        if self.zones is None:
            self.zones = tools.get_zones(width, height, pitch=self.pitch)

        for zone in self.zones:
            cv2.line(frame, (zone[1], 0), (zone[1], height), BGR_COMMON['orange'], 1)
Example #2
0
 def _get_zones(self, width, height):
     return [(val[0], val[1], 0, height)
             for val in tools.get_zones(width,
                                        height,
                                        pitch=self.pitch)]