def collect(self, frame): lgrad = " " * (frame.size[0] * frame.size[1]) VO.ost_do_prefilter_norm(frame.rawdata, lgrad, frame.size[0], frame.size[1], 31, scratch) frame.descriptors = [ VO.grab_16x16(lgrad, frame.size[0], p[0] - 7, p[1] - 7) for p in frame.kp ]
def __init__(self, lf, rf): self.lf = lf self.rf = rf self.rawdata = lf.tostring() self.size = lf.size (w, h) = self.size self.lgrad = " " * (w * h) VO.ost_do_prefilter_norm(self.rawdata, self.lgrad, w, h, 31, scratch) self.rgrad = " " * (w * h) VO.ost_do_prefilter_norm(rf.tostring(), self.rgrad, w, h, 31, scratch)
def collect(self, frame): lgrad = " " * (frame.size[0] * frame.size[1]) VO.ost_do_prefilter_norm(frame.rawdata, lgrad, frame.size[0], frame.size[1], 31, scratch) frame.descriptors = [ VO.grab_16x16(lgrad, frame.size[0], p[0]-7, p[1]-7) for p in frame.kp ]