While using Libor Masek Iris Recognition Code, I'm getting a particular error in segmentris.m while executing?
이전 댓글 표시
function [row, col, r] = findcircle(image,lradius,uradius,scaling, sigma, hithres, lowthres, vert, horz)
lradsc = round(lradius*scaling);
uradsc = round(uradius*scaling);
rd = round(uradius*scaling - lradius*scaling);
% generate the edge image
[I2, or] = canny(image, sigma, scaling, vert, horz);
I3 = adjgamma(I2, 1.9);
I4 = nonmaxsup(I3, or, 1.5);
edgeimage = hysthresh(I4, hithres, lowthres);
% perform the circular Hough transform
h = houghcircle(edgeimage, lradsc, uradsc);
maxtotal = 0;
% find the maximum in the Hough space, and hence
% the parameters of the circle
for i=1:rd
layer = h(:,:,i);
[maxlayer] = max(max(layer));
if maxlayer > maxtotal
maxtotal = maxlayer;
r = int32((lradsc+i) / scaling);
[row,col] = ( find(layer == maxlayer) );
row = int32(row(1) / scaling); % returns only first max value
col = int32(col(1) / scaling);
end
end

댓글 수: 2
Fatima ezzahrae
2022년 12월 21일
hi please can u send me the source code i had some problems while using labor mask code
Fatima ezzahrae
2022년 12월 21일
@Jonathan Bonaparte this is my mail fate5213te@gmail.com
답변 (1개)
Walter Roberson
2018년 9월 19일
The rd you calculate does not necessarily come out as at least 1. When it does not, then
for i=1:rd
will not execute at all, and row and col and r will not get assigned to.
(It looks to me as if houghcircle() is from some File Exchange contribution.)
It is also possible that no circles are being detected in the input image.
카테고리
도움말 센터 및 File Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!