【发布时间】:2020-08-17 12:12:40
【问题描述】:
在this work:Montouro 等人指定了一种分割 OCT 图像的方法,如下所示:
我想做一个类似的细分,但我不知道怎么做。这是我尝试过的:
# load image
img = cv2.imread('OCT.jpeg')
# define colors
color1 = (255,0,0)
color2 = (255,128,128)
color3 = (0,92,0)
color4 = (128,192,255)
color5 = (0,164,255)
color6 = (122,167,141)
color7 = (0,255,0)
color8 = (0,0,255)
# build 8 color image of size 256x1 in blocks of 32
lut = np.zeros([1, 256, 3], dtype=np.uint8)
lut[:, 0:32] = color1
lut[:, 32:64] = color2
lut[:, 64:96] = color4
lut[:, 96:128] = color5
lut[:, 128:160] = color6
lut[:, 160:192] = color7
lut[:, 192:256] = color8
# apply lut
result = cv2.LUT(img, lut)
# save result
cv2.imwrite('lut.png', lut)
cv2.imwrite('OCT_colorized.png', result)
我得到了这个结果:
这不是我想要的。我怎样才能重现 Montuoro 等人在他们的工作中所做的事情?
【问题讨论】:
-
看来您必须使用深度学习进行多类分割,请参阅此Link,希望对您有用
标签: python image computer-vision image-segmentation image-preprocessing