mirror of
https://github.com/opencv/opencv.git
synced 2025-06-11 11:45:30 +08:00
minor changes : Replace ndarray.ptp() with np.ptp() for NumPy 2.0 Compatibility
This commit is contained in:
parent
855f20fdfe
commit
ef474e06fc
@ -107,7 +107,7 @@ class MOSSE:
|
||||
h, w = f.shape
|
||||
f = np.roll(f, -h//2, 0)
|
||||
f = np.roll(f, -w//2, 1)
|
||||
kernel = np.uint8( (f-f.min()) / f.ptp()*255 )
|
||||
kernel = np.uint8( (f-f.min()) / np.ptp(f)*255 )
|
||||
resp = self.last_resp
|
||||
resp = np.uint8(np.clip(resp/resp.max(), 0, 1)*255)
|
||||
vis = np.hstack([self.last_img, kernel, resp])
|
||||
|
@ -62,7 +62,7 @@ def main():
|
||||
vs.append(v)
|
||||
mi = np.argmin(vs, 0)
|
||||
a += np.choose(mi, ms) * 0.025
|
||||
a = (a-a.min()) / a.ptp()
|
||||
a = (a-a.min()) / np.ptp(a)
|
||||
|
||||
if out:
|
||||
out.write(a)
|
||||
|
Loading…
Reference in New Issue
Block a user