Files
dev/script/image4.py
2018-01-19 10:56:53 +01:00

29 lines
993 B
Python
Executable File

run("pip")
img = BufferedImageImg(bi)
diamondShape = DiamondShape( 8 );
ImageJFunctions.show( img, "Source" )
#ImageJFunctions.show( Erosion.erode( img, StructuringElements.diamond( 8, 2, True ), 1 ), "NewSourceDecomp" )
#ImageJFunctions.show( Erosion.erode( img, StructuringElements.diamond( 8, 2, False ), 1 ), "NewSourceStraight" )
#ImageJFunctions.show( Erosion.erode( img, diamondShape, 1 ), "NewSourceSingle" )
#Full
#ImageJFunctions.show( Erosion.erodeFull( img, StructuringElements.diamond( 8, 2, True ), 1 ), "NewFullSourceDecomp" )
#ImageJFunctions.show( Erosion.erodeFull( img, StructuringElements.diamond( 8, 2, False ), 1 ), "NewFullSourceStraight" )
#ImageJFunctions.show( Erosion.erodeFull( img, diamondShape, 1 ), "NewFullSourceSingle" )
strel = StructuringElements.disk( 6, 2, 4 )
for shape in strel:
print shape
print MorphologyUtils.printNeighborhood( shape, 2 )
minVal = FloatType(0)
ImageJFunctions.show (Dilation.dilateFull( img, strel, minVal, 1 ))