How to join between each edge? I am used Sobel Edge Detection. It will result MATLAB fill code some error. Is there any method can be used?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/149210/image.png)
the edge do not connect to each other at binary image.
how to connect each of the edge to another?
here is my output and my code
0 Commenti
Risposte (1)
Image Analyst
il 19 Apr 2015
For columns where there is no edge, just propagate the edge from the prior column. Start with the "bad" binary image, bw:
[rows, columns] = size(bw);
lastRow = rows; % Initialize
for col = 1 : columns
thisColumn = bw(:, col);
if max(thisColumn) < 1
% No white pixel found in this column
% Propagate the last row from the prior column.
bw(lastRow:end, col) = true;
end
% Update the last row.
lastRow = find(bw(:, col), 1, 'first');
end
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!