Generate binary image of geometric shapes?
Mostrar comentarios más antiguos
I need a code where I can generate different geometric shapes in a form of a binary image. Please assist me as I am not very good with Matlab Image Processing.
Respuesta aceptada
Más respuestas (1)
Alka Nair
el 6 de Mayo de 2015
2 votos
Hi, For generating geometric shapes in binary images use STREL to create the structuring element, for example, suppose you want to generate a square. The steps are as follows: >>img = zeros(100,100); >>imgLogical = logical(img); >>img(50,50)=1; % fixing the initial seed point >>se1 = strel('square',12); >>im2 = imdilate(f,se1);
Please refer to the documentation for STREL at the following location: http://www.mathworks.com/help/images/ref/strel.html
1 comentario
Yashlin Naidoo
el 6 de Mayo de 2015
Categorías
Más información sobre ROI-Based Processing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!