我一直在阅读有关这个主题的内容,但无法用"简明英语"来了解有关HoughCircles(特别是之后的CV_HOUGH_GRADIENT)用法和参数的想法.
什么是累加器阈值?100"投票"是正确的价值吗?
我可以找到并"掩盖"瞳孔,并通过Canny功能我的方式,但我正在努力超越,我的问题是HoughCircles功能.似乎没有找到虹膜圈,但我不知道为什么.

这就是我正在努力的功能:
def getRadius(area):
r = 1.0
r = math.sqrt(area/3.14)
return (r)
def getIris(frame):
grayImg = cv.CreateImage(cv.GetSize(frame), 8, 1)
cv.CvtColor(frame,grayImg,cv.CV_BGR2GRAY)
cv.Smooth(grayImg,grayImg,cv.CV_GAUSSIAN,9,9)
cv.Canny(grayImg, grayImg, 32, 2)
storage = cv.CreateMat(grayImg.width, 1, cv.CV_32FC3)
minRad = int(getRadius(pupilArea))
circles = cv.HoughCircles(grayImg, storage, cv.CV_HOUGH_GRADIENT, 2, 10,32,200,minRad, minRad*2)
cv.ShowImage("output", grayImg)
while circles:
cv.DrawContours(frame, circles, (0,0,0), (0,0,0), 2)
# this message is never shown, therefore I'm not detecting circles
print "circle!"
circles = circles.h_next()
return (frame)
Run Code Online (Sandbox Code Playgroud) 我正在使用Boost但是我找不到关于安装目录和web中的文件系统库的完整(或好)文档.我找到的"-ls"示例是一个很好的帮手,但这还不够.
提前致谢 :)
我尝试使用以下代码修改类型,它给了我错误代码:' ORA-02303 '.我对Oracle或PL/SQL了解不多,但我需要解决这个问题.所以我很感激任何进一步的帮助.
提前致谢.代码只是一个例子.但话说回来,我需要先检查其家属.
create or replace type A as object (
x_ number,
y_ varchar2(10),
member procedure to_upper
);
/
Run Code Online (Sandbox Code Playgroud) 在一般使用中,我应该打赌内存效率还是处理器效率?
最后,我知道必须根据软件/硬件规格.但我认为没有边界就有一个普遍的规则.
例01(内存效率):
int n=0;
if(n < getRndNumber())
n = getRndNumber();
Run Code Online (Sandbox Code Playgroud)
例02(处理器效率):
int n=0, aux=0;
aux = getRndNumber();
if(n < aux)
n = aux;
Run Code Online (Sandbox Code Playgroud)
它们只是简单的例子并写下来以表明我的意思.更好的例子将受到欢迎.
提前致谢.