How to calculate coordinate of binary iamges boundary??
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
윤형 이
el 26 de En. de 2023
Respondida: Image Analyst
el 26 de En. de 2023
My goal is calculate the amplitude and wavelength from the binary iamges.
To do so, I want to get the coordinates of boundary line from the binary iamges.
Now I'm making code using "bwtraceboundary" function.
If you have any good ideas, please share them.
Thanks
0 comentarios
Respuesta aceptada
Image Analyst
el 26 de En. de 2023
It looks like the boundary is pretty solid and you probably just want the top row, not the sides and bottom. So in that case I'd just scan your image to find the top row. If mask is your binary image:
[rows, columns] = size(mask);
topRows = nan(1, columns);
for col = 1 : columns
t = find(mask(:, col), 1, 'first')
if ~isempty(t)
topRows(col) = t;
end
end
0 comentarios
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!