You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to report that I find an issue in the imroifill.sci that
worked on the previous version of Scilab but doesn't work on 2024.0 version.
And I also present my proposed correction below.
Please confirm the issue of imroifill.sci and correct it.
result = imin;
///
maskb = im2bw(mask,0.5);
perimeter=bwborder(maskb);
interior = im2bw(mask,0.5) & ~im2bw(perimeter,0.5);
idx = find(interior);
grid = zeros(mask);
grid(idx) = 1:length(idx);
[M,N] = size(grid);
perimValues = zeros(M,N);
perimIdx = find(perimeter);
perimValues(perimIdx) = imin(perimIdx);
rightside = zeros(M,N);
rightside(2:(M-1),2:(N-1)) = perimValues(1:(M-2),2:(N-1)) + ...
perimValues(3:M,2:(N-1)) + perimValues(2:(M-1),1:(N-2)) + ...
perimValues(2:(M-1),3:N);
rightside = rightside(idx)'; // <- from rightside(idx)
i = grid(idx)'; // <- from grid(idx)
j = grid(idx)'; // <- from grid(idx)
s = 4*ones(idx)';
idx = idx';
for k = [-1 M 1 -M]
// Possible neighbors in the k-th direction
Q = grid(idx+k);
// Index of points with interior neighbors
q = find(Q)';
// Connect interior points to neighbors with -1's.
//pause
i = [i; grid(idx(q))]; // <- from grid(idx(q))'
j = [j; Q(q)];
s = [s; -ones(length(q),1)];
end
D = sparse([i,j],s);
x = D \ rightside;
result(idx) = x;
// best regards
The text was updated successfully, but these errors were encountered:
Hi,
I'd like to report that I find an issue in the imroifill.sci that
worked on the previous version of Scilab but doesn't work on 2024.0 version.
And I also present my proposed correction below.
Please confirm the issue of imroifill.sci and correct it.
// best regards
The text was updated successfully, but these errors were encountered: