vendor: OpenCV 5.0.0 snapshot at 755e50675d97db9b7d449d8bd6b09888646f6c6e
This commit is contained in:
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import cv2 as cv
|
||||
import numpy as np
|
||||
import sys
|
||||
|
||||
img1 = cv.imread(sys.argv[1])
|
||||
img1 = img1.astype(np.float32)
|
||||
|
||||
shift = np.array([5., 5.])
|
||||
|
||||
mapTest = cv.reg.MapShift(shift)
|
||||
img2 = mapTest.warp(img1)
|
||||
mapper = cv.reg.MapperGradShift()
|
||||
mappPyr = cv.reg.MapperPyramid(mapper)
|
||||
|
||||
resMap = mappPyr.calculate(img1, img2)
|
||||
mapShift = cv.reg.MapTypeCaster_toShift(resMap)
|
||||
|
||||
print(mapShift.getShift())
|
||||
Reference in New Issue
Block a user