def __init__(self, filepath, platesize, platecolor_min, platecolor_max): self.filename = filepath self.plate_size = int(platesize) #plate square size in milimeter self.imagesize = 3000 self.plate_color_min = platecolor_min self.plate_color_max = platecolor_max # initialization self.image = image_functions() self.camera = video_functions() self.foreground = foreground_detector() self.radius = radius_detector() self.height = height_detector() self.object_detection = object_detector() self.filename_image = 'excel_files/SLUMP_data_image.xls' self.filename_video = 'excel_files/SLUMP_data_video.xls' self.ezxf = xlwt.easyxf self.hdngs = [ ' Time (s) ', ' edge distance from center point ', ' Diameter_ew (mm) ', ' radius_ns (mm) ', ' Height (mm) ' ] self.heading_xf = self.ezxf( 'font: bold on; align: wrap on, vert centre, horiz center') self.data = []
def __init__(self): self.image = image_functions()
# # construct the argument parser and parse the arguments ap = argparse.ArgumentParser() ap.add_argument("-i", "--image", help="path to the image file") ap.add_argument("-v", "--video", help="path to the video file") ap.add_argument("-ps", "--platesize", type=int, default=1000, help="plate size in milimeter") args = vars(ap.parse_args()) # ################################################################################ # # initialization image = image_functions() camera = video_functions() foreground = foreground_detector() radius = radius_detector() object_detection = object_detector() filename_image = 'excel_files/SCC_data_image.xls' filename_video = 'excel_files/SCC_data_video.xls' ezxf = xlwt.easyxf hdngs = [ ' Time (s) ', ' edge distance from center point ', ' Diameter_ew (mm) ', ' Diameter_ns (mm) ' ] heading_xf = ezxf('font: bold on; align: wrap on, vert centre, horiz center') data = []
def __init__(self): # initialize the first frame in the video stream self.image = image_functions() self.object_detection = object_detector() self.entropy = Entropy()