我目前正在研究超级像素分割。我正在使用简单线性迭代聚类(SLIC)。这是代码
# load the image and apply SLIC and extract (approximately)
# the supplied number of segments
image = cv2.imread(args["image"])
segments = slic(img_as_float(image), n_segments = 100, sigma = 5)
# show the output of SLIC
fig = plt.figure("Superpixels")
ax = fig.add_subplot(1, 1, 1)
ax.imshow(mark_boundaries(img_as_float(cv2.cvtColor(image, cv2.COLOR_BGR2RGB)), segments))
plt.axis("off")
plt.show()
我得到了段的输出
array([[ 0, 0, 0, ..., 7, 7, 7],
[ 0, 0, 0, ..., 7, 7, 7],
[ 0, 0, 0, ..., 7, 7, 7],
...,
[76, 76, 76, ..., 84, 84, 84],
[76, 76, 76, ..., 84, 84, 84],
[76, 76, 76, ..., 84, 84, 84]])
段中的每个值是什么意思?
牛魔王的故事
相关分类