PIXEL VALUE NORMALIZATION 0 and 1
Mostrar comentarios más antiguos
Dear Sir/Madam,
I have DICOM images taken from the angiography device and I labeled my images using Adobe Photoshop, then painted the background with black and the part I labeled with white.
I exported the labelled images in png format from photoshop.
However, the images appearing in black and white are in RGB format, although I converted the image to binary with the MATLAB program, all numbers appear as 2 in the pixel range.
How can I make 0 and 1 pixel interval for binary images ? I would be grateful if you can help me
Best regards
Şerife Kaba
2 comentarios
Matt J
el 20 de Dic. de 2021
I suggest attaching the RGB image so that we can demonstrate.
Serife Kaba
el 21 de Dic. de 2021
Respuesta aceptada
Más respuestas (1)
yanqi liu
el 21 de Dic. de 2021
0 votos
yes,sir,may be the image file save be Photoshop get rgb format,so we read it to logical,such as 0 and 1 value
may be use
im2uint8(your_logical_label_matrix)
make the value to 255(white)、0(black)
and use
classNames = ["target","background"];
labelIDs = [255 0];
to generate pixelLabelDatastore
1 comentario
Serife Kaba
el 21 de Dic. de 2021
Categorías
Más información sobre Convert Image Type 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!