diff --git a/applicationCode/unitTests/testPython/testXfAbsdiff.py b/applicationCode/unitTests/testPython/testXfAbsdiff.py index d6d8c42..f7ad5ac 100755 --- a/applicationCode/unitTests/testPython/testXfAbsdiff.py +++ b/applicationCode/unitTests/testPython/testXfAbsdiff.py @@ -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") @@ -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") diff --git a/applicationCode/unitTests/testPython/testXfAdd.py b/applicationCode/unitTests/testPython/testXfAdd.py index 81ca278..cddd6e2 100755 --- a/applicationCode/unitTests/testPython/testXfAdd.py +++ b/applicationCode/unitTests/testPython/testXfAdd.py @@ -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") @@ -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") diff --git a/applicationCode/unitTests/testPython/testXfCalcHist.py b/applicationCode/unitTests/testPython/testXfCalcHist.py index 8d3a3ba..4021534 100755 --- a/applicationCode/unitTests/testPython/testXfCalcHist.py +++ b/applicationCode/unitTests/testPython/testXfCalcHist.py @@ -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") diff --git a/applicationCode/unitTests/testPython/testXfCornerHarris.py b/applicationCode/unitTests/testPython/testXfCornerHarris.py index 56cf6d4..c5a7261 100755 --- a/applicationCode/unitTests/testPython/testXfCornerHarris.py +++ b/applicationCode/unitTests/testPython/testXfCornerHarris.py @@ -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") diff --git a/applicationCode/unitTests/testPython/testXfInitUndistortRectifyMap.py b/applicationCode/unitTests/testPython/testXfInitUndistortRectifyMap.py index 6e696dc..87ca78e 100755 --- a/applicationCode/unitTests/testPython/testXfInitUndistortRectifyMap.py +++ b/applicationCode/unitTests/testPython/testXfInitUndistortRectifyMap.py @@ -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") diff --git a/applicationCode/unitTests/testPython/testXfIntegral.py b/applicationCode/unitTests/testPython/testXfIntegral.py index 99e72d7..606f660 100755 --- a/applicationCode/unitTests/testPython/testXfIntegral.py +++ b/applicationCode/unitTests/testPython/testXfIntegral.py @@ -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")