问题描述
我正在尝试将视网膜图像注册在其光盘的中心。为此,我需要使用霍夫变换来定位光盘的中心。我在R中编写了此代码,以仅找到一个视网膜图像样本的视盘中心。我不知道如何调整参数以适用于所有视网膜样本。因此,我在以下代码中使用的参数是通过反复试验为一个图像设置的。我的问题是:“是否有任何方法可以找到这些功能的最佳参数(isoblur,cannyEdges和hough_circle)?特别是,鉴于每个视网膜图像可能都有一个事实,我不知道如何在hough_circle中设置半径参数视盘半径不同。
library(EBImage)#For CLAHEs
library(imager)
#Read the color images
setwd("/Users/apple/Downloads/R/RetinaGraphs") #Imagedirectory
#List them
listimages <- list.files()
###########
#first sample as an example
Im1 <- load.image(listimages[1])
#Resize it to 400x400 image
resized_Im1 <- resize(Im1,400,400)
#Eextract green channels before doing CLAHE
###########
GreenChannel_I1 <- G(resized_Im1)
####Use these parameters to do CLAHE
####### The green channel was extracted and tiled into 8x8 segments
# and a clip limit of 2 was applied.
CLAHE_Retina <- clahe(GreenChannel_I1,nx= 8,ny= 8,limit = 2)
I1 <- CLAHE_Retina
plot(I1)
########### blur the image
#Using isoblur
im.blurry <- isoblur(I1,20)
plot(im.blury)
#Edge detection
CE_I1 <- cannyEdges(im.blurry,alpha = 1.2)
plot(CE_I1)
hc <- hough_circle(CE_I1,radius=32)
quartz()
plot(hc)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)