@@ -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))
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user