plt.imshow(image0[:, :], extent=ext0) plt.show() plt.gray() plt.imshow(image1[:, :]) plt.show() plt.gray() plt.imshow(image2[:, :], extent=ext2) plt.show() plt.gray() plt.imshow(image3[:, :], extent=ext3) plt.show() minkowski0 = mk.functionals(image0, res0) minkowski1 = mk.functionals(image1) minkowski2 = mk.functionals(image2, res2) minkowski3 = mk.functionals(image3, res3) print(minkowski0) print(minkowski1) print(minkowski2) print(minkowski3) print([np.pi * 48**2, 48, 1 / np.pi]) print() minkowski0 = mk.functionals(image0, res0, norm=True) minkowski1 = mk.functionals(image1, norm=True) minkowski2 = mk.functionals(image2, res2, norm=True) minkowski3 = mk.functionals(image3, res3, norm=True)
#plt.show() # #plt.gray() #plt.imshow(erosion_map2[:,:],extent=ext2) #plt.show() # #plt.gray() #plt.imshow(erosion_map3[:,:],extent=ext3) #plt.show() dist0, area0, length0, euler0 = mk.functions_close(erosion_map0, res0) dist1, area1, length1, euler1 = mk.functions_close(erosion_map1) dist2, area2, length2, euler2 = mk.functions_close(erosion_map2, res2) dist3, area3, length3, euler3 = mk.functions_close(erosion_map3, res3) area, length, euler = mk.functionals(image1) plt.plot(48, area, marker="o") plt.plot(dist0, area0) plt.plot(dist1, area1) plt.plot(dist2, area2) plt.plot(dist3, area3) plt.show() plt.plot(48, length, marker="o") plt.plot(dist0, length0) plt.plot(dist1, length1) plt.plot(dist2, length2) plt.plot(dist3, length3) plt.show()
#plt.imshow(erosion_map2[:,:,128],extent=ext2) #plt.show() # #plt.gray() #plt.imshow(erosion_map3[:,:,128],extent=ext3) #plt.show() dist0, volume0, surface0, curvature0, euler0 = mk.functions_open( erosion_map0, res0) dist1, volume1, surface1, curvature1, euler1 = mk.functions_open(erosion_map1) dist2, volume2, surface2, curvature2, euler2 = mk.functions_open( erosion_map2, res2) dist3, volume3, surface3, curvature3, euler3 = mk.functions_open( erosion_map3, res3) volume, surface, curvature, euler = mk.functionals(image1) plt.plot(0, volume, marker="o") plt.plot(dist0, volume0) plt.plot(dist1, volume1) plt.plot(dist2, volume2) plt.plot(dist3, volume3) plt.show() plt.plot(0, surface, marker="o") plt.plot(dist0, surface0) plt.plot(dist1, surface1) plt.plot(dist2, surface2) plt.plot(dist3, surface3) plt.show()