我是新的OpenCV和我卡住分割部分ie。去除视网膜的光盘。
import cv2
import numpy as np
from matplotlib impt pyplot as plt
img = cv2.imread('abc.jpg',0)
# global thresholding
ret1,th1 = cv2.threshold(img,127,255,cv2.THRESH_BINARY)
# Otsu's thresholding
ret2,th2 = cv2.threshold(img,0,255,cv2.THRESH_BINARY+cv2.THRESH_OTSU)
# Otsu's thresholding after Gaussian filtering
blur = cv2.GaussianBlur(img,(5,5),0)
ret3,th3 = cv2.threshold(blur,0,255,cv2.THRESH_BINARY+cv2.THRESH_OTSU)
# plot all the images and their histograms
cv2.imwrite('output_new2.jpg', th1)
目前,我指的是这个分割部分,去掉视网膜的光盘图像,设置光盘的颜色为背景色 问题来源StackOverflow 地址:/questions/59379529/automatic-detection-and-classi%ef%ac%81cation-of-retinal-lesions-in-diabetic-retinopathy
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。