i have a binery information ,how can i make an image with the help of this
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
shantanu shukla
le 27 Sep 2013
Commenté : Image Analyst
le 4 Oct 2013
[255 0 0 0 0 0 255 255 255
255 0 0 0 0 0 255 255 255
0 0 0 0 0 0 0 255 255
0 0 0 0 0 0 0 255 255
0 0 0 0 0 0 0 255 255
0 0 0 0 0 0 0 255 255
0 0 0 0 0 0 0 255 255
0 0 0 0 0 0 0 255 255
0 0 0 0 0 0 0 255 255
0 0 0 0 0 0 0 255 255
255 0 0 0 0 0 255 255 255]
2 commentaires
Image Analyst
le 4 Oct 2013
You already had two replies. A week ago. Scroll down and respond to them.
Réponse acceptée
Walter Roberson
le 27 Sep 2013
YourImage = uint8(YourArray);
image(YourImage);
colormap(gray(255))
0 commentaires
Plus de réponses (1)
Image Analyst
le 27 Sep 2013
Modifié(e) : Image Analyst
le 27 Sep 2013
That is not binary information. What you have, already, is an image. Or at least an image array , though it may not necessarily be displayed yet. If you want a binary image, you have to cast to logical:
grayScaleImage =...
[255 0 0 0 0 0 255 255 255
255 0 0 0 0 0 255 255 255
0 0 0 0 0 0 0 255 255
0 0 0 0 0 0 0 255 255
0 0 0 0 0 0 0 255 255
0 0 0 0 0 0 0 255 255
0 0 0 0 0 0 0 255 255
0 0 0 0 0 0 0 255 255
0 0 0 0 0 0 0 255 255
0 0 0 0 0 0 0 255 255
255 0 0 0 0 0 255 255 255]
binaryImage = logical(grayScaleImage)
Now you can display with imshow() or image():
imshow(binaryImage);
which will display it in the current axes, or create one and display it if no axes exists yet. I know I kind of answered the opposite of what you asked but you're not using standard terminology so I'm trying to figure out what you want.
0 commentaires
Voir également
Catégories
En savoir plus sur C4ISR dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!