diff --git a/pcbdevice/main.py b/pcbdevice/main.py index d256265..c4947e6 100644 --- a/pcbdevice/main.py +++ b/pcbdevice/main.py @@ -1,5 +1,6 @@ from pcbdevice.utils.path import path from pcbdevice.utils.pbmformator import formatPbm +from pcbdevice.utils.plotimg import plotPath from pcbdevice.utils.savetofile import matrixToFile if __name__ == "__main__": @@ -11,7 +12,7 @@ if __name__ == "__main__": matrixToFile(formatPbm(resourcesRawPath + 'test1ascii.pbm'), resourcesFormattedPath + 'test1.csv') - matrixToFile(path(formatPbm(resourcesRawPath + 'test100x100.pbm'), 4), resourcesPathOutput + 'test100x100.csv') + plotPath(path(formatPbm(resourcesRawPath + 'test100x100.pbm'), 5)) diff --git a/pcbdevice/utils/path.py b/pcbdevice/utils/path.py index 6030e8c..ce8f1c4 100644 --- a/pcbdevice/utils/path.py +++ b/pcbdevice/utils/path.py @@ -63,10 +63,10 @@ def twoRemoving(image, rTool): for column in range(width): if image[line][column] == 1: - for px in range(1, 2 * rTool): - for pixel in range(1, 2*rTool): - if image[line - rTool + px][column - rTool + pixel] == 2: - image[line - rTool + px][column - rTool + pixel] = 0 + for pixelx in range(1, 2 * rTool): + for pixely in range(1, 2*rTool): + if image[line - rTool + pixelx][column - rTool + pixely] == 2: + image[line - rTool + pixelx][column - rTool + pixely] = 0 print("image width = " + str(width)) print("image height = " + str(height))