def whiteout_ramp(image, linecoords):
# Dilation enlarge the bright segments and cut them out off the original image
imagesection = image[linecoords.object]
count = 0
for i in morph.dilation(linecoords.object_matrix, morph.square(10)):
whitevalue = measurements.find_objects(i == linecoords.object_value + 1)
if whitevalue:
whitevalue = whitevalue[0][0]
imagesection[count,whitevalue.start:whitevalue.stop] = 255
count +=1
return 0
评论列表
文章目录