Beispiel #1
0
 def onkey(self, key):
     Correction.onkey(self, key)
     if key == 'p':
         self.constraint.next()
         self.p_correction = None
         if key == 'a':
             for i in range(5):
                 self.constraint.next()
                 self.p_correction = None
Beispiel #2
0
    def __init__(self, **kw):
        Correction.__init__(self, **kw)
        #self.full_target = 50*numpy.ones((self.H, self.W, 3), dtype=numpy.uint8)
        self.set_pyr_level(7)

        self.coeff = 0.5

        cv2.namedWindow("error")
        cv2.namedWindow("correction")

        cv2.createTrackbar("coeff", "correction", 5, 100, lambda x: self.set_coeff(x/10.0))
        cv2.createTrackbar("pyr level", "correction", 7, 10, self.set_pyr_level)