Conversion of grayscale to binary Image
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
ANUSHA H P
el 17 de En. de 2022
Editada: ANUSHA H P
el 21 de En. de 2022
when a dataset containing gray scale images are converted to binary images , few images are getting complemented i.e, few images with black as background and few with white as background.
I want all images to be in a uniform way, black background and white foreground.
how to use imcomplement() for selected images in a datasset? or is there anyother way?
i have attached few sample input and their corresponding binary images from the dataset.
Thankyou in advance
0 comentarios
Respuesta aceptada
Image Analyst
el 17 de En. de 2022
There is an option for that in imbinarize to make sure you always get either the brighter thing or the darker thing:
BW = imbinarize(grayImage,'adaptive','ForegroundPolarity','dark','Sensitivity',0.4);
8 comentarios
Image Analyst
el 20 de En. de 2022
If you want the shape to better hug/follow the binary image, instead of using the convex hull, you could fill the blobs and use activecontour. See attached demo.
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!
