Skip to content

Commit

Permalink
correction for xfdst on return
Browse files Browse the repository at this point in the history
  • Loading branch information
Alireza Khodamoradi committed Sep 12, 2019
1 parent c598282 commit d37d65c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions applicationCode/unitTests/testPython/testXfAbsdiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
print("Start SW loop")
startSW=time.time()
for i in range(numberOfIterations):
dstSW = cv2.absdiff(src1=imgY1, src2=imgY2) #absdiff on ARM
cv2.absdiff(src1=imgY1, src2=imgY2, dst=dstSW) #absdiff on ARM
stopSW=time.time()
print("SW loop finished")

Expand All @@ -80,7 +80,7 @@
print("Start HW loop")
startPL=time.time()
for i in range(numberOfIterations):
xFdst = xv2.absdiff(src1=xFimgY1, src2=xFimgY2, dst=xFdst) #absdiff offloaded to PL, working on physically continuous numpy arrays
xv2.absdiff(src1=xFimgY1, src2=xFimgY2, dst=xFdst) #absdiff offloaded to PL, working on physically continuous numpy arrays
stopPL=time.time()
print("HW loop finished")

Expand Down
4 changes: 2 additions & 2 deletions applicationCode/unitTests/testPython/testXfAdd.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
print("Start SW loop")
startSW=time.time()
for i in range(numberOfIterations):
dstSW = cv2.add(imgY1, imgY2) #add on ARM
cv2.add(imgY1, imgY2, dst=dstSW) #add on ARM
stopSW=time.time()
print("SW loop finished")

Expand All @@ -81,7 +81,7 @@
print("Start HW loop")
startPL=time.time()
for i in range(numberOfIterations):
xFdst = xv2.add(src1=xFimgY1, src2=xFimgY2, dst=xFdst) #accumulateWeight offloaded to PL, working on physically continuous numpy arrays
xv2.add(src1=xFimgY1, src2=xFimgY2, dst=xFdst) #accumulateWeight offloaded to PL, working on physically continuous numpy arrays
stopPL=time.time()
print("HW loop finished")

Expand Down
4 changes: 2 additions & 2 deletions applicationCode/unitTests/testPython/testXfCalcHist.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@
print("Start SW loop")
startSW=time.time()
for i in range(numberOfIterations):
dstSW = cv2.calcHist([imgY1], [0], None, [256], [0,255]) #calcHist on ARM
cv2.calcHist([imgY1], [0], None, [256], [0,255], hist=dstSW) #calcHist on ARM
stopSW=time.time()
print("SW loop finished")

print("Start HW loop")
startPL=time.time()
for i in range(numberOfIterations):
xFhist = xv2.calcHist(images=[xFimgY1], channels=[0], mask=None, histSize=[256], ranges=[0,255], hist=xFhist) #calcHist offloaded to PL, working on physically continuous numpy arrays
xv2.calcHist(images=[xFimgY1], channels=[0], mask=None, histSize=[256], ranges=[0,255], hist=xFhist) #calcHist offloaded to PL, working on physically continuous numpy arrays
stopPL=time.time()
print("HW loop finished")

Expand Down
4 changes: 2 additions & 2 deletions applicationCode/unitTests/testPython/testXfCornerHarris.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@
print("Start SW loop")
startSW=time.time()
for i in range(numberOfIterations):
dstSW = cv2.cornerHarris(imgY1, 2, 3, 0.04) #cornerHarris on ARM
cv2.cornerHarris(imgY1, 2, 3, 0.04, dst=dstSW) #cornerHarris on ARM
stopSW=time.time()
print("SW loop finished")

print("Start HW loop")
startPL=time.time()
for i in range(numberOfIterations):
xFdst = xv2.cornerHarris(src=xFimgY1, blockSize=3, ksize=3, k=0.14, dst=xFdst, borderType=cv2.BORDER_DEFAULT) #cornerHarris offloaded to PL, working on physically continuous numpy arrays
xv2.cornerHarris(src=xFimgY1, blockSize=3, ksize=3, k=0.14, dst=xFdst, borderType=cv2.BORDER_DEFAULT) #cornerHarris offloaded to PL, working on physically continuous numpy arrays
stopPL=time.time()
print("HW loop finished")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@
print("Start SW loop")
startSW=time.time()
for i in range(numberOfIterations):
mapX, mapY = cv2.initUndistortRectifyMap(cameraMatrixLeft, distCoeffsLeft, Rleft, newCameraMatrixLeft, (width, height), cv2.CV_32FC1, mapX, mapY) # on ARM
cv2.initUndistortRectifyMap(cameraMatrixLeft, distCoeffsLeft, Rleft, newCameraMatrixLeft, (width, height), cv2.CV_32FC1, mapX, mapY) # on ARM
stopSW=time.time()
print("SW loop finished")

print("Start HW loop")
startPL=time.time()
for i in range(numberOfIterations):
xFmapX, xFmapY = xv2.initUndistortRectifyMap(cameraMatrixLeft, distCoeffsLeft, Rleft, newCameraMatrixLeft, (width, height), cv2.CV_32FC1, xFmapX, xFmapY)# offloaded to PL, working on physically continuous numpy arrays
xv2.initUndistortRectifyMap(cameraMatrixLeft, distCoeffsLeft, Rleft, newCameraMatrixLeft, (width, height), cv2.CV_32FC1, xFmapX, xFmapY)# offloaded to PL, working on physically continuous numpy arrays
stopPL=time.time()
print("HW loop finished")

Expand Down
2 changes: 1 addition & 1 deletion applicationCode/unitTests/testPython/testXfIntegral.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
print("Start SW loop")
startSW=time.time()
for i in range(numberOfIterations):
dstSW = cv2.integral(imgY1, dstSW) #integral on ARM
cv2.integral(imgY1, dstSW) #integral on ARM
stopSW=time.time()
print("SW loop finished")

Expand Down

0 comments on commit d37d65c

Please sign in to comment.