Skip to content

Commit 464bed7

Browse files
authored
Merge pull request #4105 from Nikhil-jaiswal007:fix/reg-python-sample
reg: fix broken Python sample - use dot notation and fix segfault
2 parents cf50aed + 7ab3e17 commit 464bed7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

modules/reg/samples/reg_shift.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77
img1 = cv.imread(sys.argv[1])
88
img1 = img1.astype(np.float32)
9+
910
shift = np.array([5., 5.])
10-
mapTest = cv.reg_MapShift(shift)
1111

12+
mapTest = cv.reg.MapShift(shift)
1213
img2 = mapTest.warp(img1)
13-
14-
mapper = cv.reg_MapperGradShift()
15-
mappPyr = cv.reg_MapperPyramid(mapper)
14+
mapper = cv.reg.MapperGradShift()
15+
mappPyr = cv.reg.MapperPyramid(mapper)
1616

1717
resMap = mappPyr.calculate(img1, img2)
1818
mapShift = cv.reg.MapTypeCaster_toShift(resMap)

0 commit comments

Comments
 (0)