In this work: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5480585/ Montouro et al specifies a way to segment OCT images like this:
I want to do a similar segmentation but I don't know how. This is what I tried:
# 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)
And I get this result:
It doesn't what I want.. How could I reproduce what Montuoro et al did in their work?
from How can I do a segmentation like this
No comments:
Post a Comment