MCPcopy Index your code
hub / github.com/makelove/OpenCV-Python-Tutorial / preprocess

Method preprocess

官方samples/mosse.py:127–130  ·  view source on GitHub ↗
(self, img)

Source from the content-addressed store, hash-verified

125 draw_str(vis, (x1, y2+16), 'PSR: %.2f' % self.psr)
126
127 def preprocess(self, img):
128 img = np.log(np.float32(img)+1.0)
129 img = (img-img.mean()) / (img.std()+eps)
130 return img*self.win
131
132 def correlate(self, img):
133 C = cv2.mulSpectrums(cv2.dft(img, flags=cv2.DFT_COMPLEX_OUTPUT), self.H, 0, conjB=True)

Callers 2

__init__Method · 0.95
updateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected