def __init__(self, min=0.95, max=1.0): super(RangePerCentFlowComputer_regularComputer, self).__init__(flowUtil.FlowComputer(), min, max)
sys.path.insert(0, '../') import jasf from jasf import jasf_cv import cv2 import flowUtil cam = cv2.VideoCapture(0) ret, frame = cam.read() h, w, d = frame.shape print frame.shape half_side = 200 grid = flowUtil.getGrid(w / 2 - half_side, h / 2 - half_side, half_side * 2, half_side * 2, 5, 5) flowComputer = flowUtil.FlowComputer() flowComputer.setGrid(grid) ret, frame = cam.read() flowFilter = flowUtil.FlowFilter() flowFilter2 = flowUtil.FlowFilter_ConnectedRegions(frame.shape[:2]) jasf_cv.getInputWindow() jasf_cv.getSettingsWindow() jasf.cv.setManyTrackbars(['low', 'upper'], [10, 25], [100, 100]) jasf.cv.setManyTrackbars(['low2', 'upper2'], [150, 50000], [10000, 50000]) while cam.isOpened(): ch = cv2.waitKey(5) & 0xFFFF if ch == ord('q'):
def __init__(self, computer=flowUtil.FlowComputer(), min=0.95, max=1.0): self.flowComputer = computer self.setPercentageInterval(min, max)